So the topic says it all.

What would be the best approach to do something like that and the easiest way to determine what class (Atom?) each child belongs to?

My DLG contains 3 edit fields, 3 buttons (including checkbox), 1 combo box, and numerous static controls.

I wish to fill them up with values in the WM_INITDIALOG message.

So what is the best way to difrenciate window classes? A hint on what to use to find the diffrent classes will be apreciated as EnumChildWindows (i Think) will be used to retrieve each window's handle hopefully in the Dialog Box.

Thank you,
Black iCE
Posted on 2004-09-02 10:02:29 by Black iCE
Hello,

Maybe I've misunderstood something, but why not using a simple GetDlgItem, which will give you the Handles for whatever control you want ?

Once you've got the handle you can fill your edit boxes at the INITDIALOG with a SetWindowText (or some equivalent SendMessage or API).




.const
IDC_EDT1 equ 1000

.data
szText BYTE "Dummy text...",0

.data?
hEdt1 DWORD ?

.code

;//cut
.if uMsg==WM_INITDIALOG
invoke GetDlgItem,hWin,IDC_EDT1
mov hEdt1,eax
invoke SetWindowText,hEdt1, addr szText
;...



P.S: SetDlgItemText doesn't require a control handle (just the Window handle)

Regards, Neitsa.
Posted on 2004-09-02 10:07:53 by Neitsa
Hi :)

Neitsa is right, but for a little thing: the SetDlgItemText procedure takes 3 parameters, the dialog handle, the control ID (as set in the resource script), and the text itself.
Posted on 2004-09-02 16:28:50 by QvasiModo
Thank you Neitsa & QvasiModo. It would have taken me some time figuring out how to do that. As you can see from my first post that i was WAY off the mark. Thank you all.

Black iCE
Posted on 2004-09-03 01:17:17 by Black iCE