Announcement

Collapse
No announcement yet.

Why won't the following work?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bob Zale
    replied
    Dear Mr. Wow...

    Handles aren't allowed here, only real names. We'd appreciate it if you would re-register accurately. Thanks!

    Bob Zale
    PowerBASIC Inc.


    ------------------

    Leave a comment:


  • Guest's Avatar
    Guest replied
    Thanks Jim...you suggestion worked!

    Leave a comment:


  • Jim Huguley
    replied

    In addition to Dave's comments as good coding practice. You are
    showing a modal dialog and not calling the icon functions until
    after the dialog is destroyed. Move the Dialog Show code AFTER
    the icon code.



    ------------------
    Jim..
    [email protected]

    Leave a comment:


  • Dave Navarro
    replied
    Did you check the result from LoadImage() to see if it was successful?

    Did you check the result from DIALONG SEND to see if it was successful?

    { it's called 'debugging' )

    --Dave


    ------------------
    Home of the BASIC Gurus
    www.basicguru.com

    Leave a comment:


  • Guest's Avatar
    Guest started a topic Why won't the following work?

    Why won't the following work?

    Shouldn't the following code place an icon on a DDT dialog based on the threads I've read? Instead I get my dialog but no icon. What am I doing wrong?


    #COMPILE EXE
    #INCLUDE "WIN32API.INC"
    #INCLUDE "COMDLG32.INC"

    FUNCTION PBMAIN () AS LONG

    $REGISTER NONE

    LOCAL hDlg AS LONG
    LOCAL hIcon AS LONG

    'Create a new dialog template
    DIALOG NEW 0, "blah blah blah...",,,300,50,0,0 TO hDlg

    'Display the dialog
    DIALOG SHOW MODAL hDlg

    'add an icon from a powerbasic sample program
    hIcon=Loadimage(BYVAL %Null, BYCOPY "c:\pbdll60\samples\pbnote\pbnote.ico",%Image_icon,0,0,%LR_loadfromfile OR %LR_defaultsize)
    DIALOG SEND hDlg,%WM_seticon,%Icon_big,hIcon

    END FUNCTION
Working...
X