TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Dean Roddey
from: Simon Ewins
date: 1994-11-08 23:45:32
subject: WinCreateDlg

Feeling really thick here but anyway...

I am still having difficulty getting this going the way I want. Here is the
(very basic) dialog...

DLGTEMPLATE DBOX_DLG PRELOAD MOVEABLE DISCARDABLE               
BEGIN                                                           
    DIALOG  "", DBOX_DLG, 87, 94, 236, 41, WS_VISIBLE           
    BEGIN                                                       
        LTEXT           "", DBOX_TEXT, 4, 23, 181, 8            
        ENTRYFIELD      "", DBOX_ENTRY, 6, 8, 177, 8, ES_MARGIN 
        PUSHBUTTON      "Okay", DID_OK, 192, 23, 40, 14         
        PUSHBUTTON      "Cancel", DID_CANCEL, 192, 5, 40, 14    
    END                                                         
END                                                             

What I want to do is simply change the LTEXT (DBOX_TEXT) field so that I
can use the above over and over again with different prompts as required. I
have no difficulty setting and retrieving the DBOX_ENTRY field values. Here
is the code that doesn't work based on the message that I got from you
earlier...

    hwdlg=WinLoadDlg(HWND_DESKTOP,hwnd,dBoxDlgProc,0L,DBOX_DLG,NULL); 
    htext=WinQueryWindow(hwdlg,DBOX_TEXT);                            
    WinSetWindowText(htext,"The prompt I want to use:");               
    WinProcessDlg(hwdlg);                                             
    WinDestroyWindow(hwdlg);                                          

The compiler (Watcom v10.0) doesn't throw up so I know the syntax is okay
(don't I?), the box always appears and my entries are saved as expected but
the prompt is always empty.

I am sure that I am missing something simple and/or obvious but the forest
seems to be hidden by the trees.

Any help gratefully accepted...

(BTW, I am looking for the issue of OS/2 Developer that you referred to but
so far no luck.)

.:..  FidoNET :: Simon Ewins 1:250/664
.:.. InterNET :: simon{at}axaxa.tor250.org

---

* Origin: A_X_A_X_A :: Where only reality matters :: (1:250/664)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 250/664 601 99 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.