Hi Everybody,
I am using RadASM with the MASM32 complier to learn assembly programming. My question today is about handles for objects on my dialog box. Something here is confusing me.... The tutorial I am working on is talking about having an edit box on a 'dialog as main' dialog. To create an edit box on my dialog I wrote something like....
.if iMsg==WM_CREATE
invoke CreateWindowEX (........)
Hi Lightman,
Welcome on board.
If the dialog you are building in RadAsm is in fact a dialog and not a low level CreateWindowEx() and you have used a resource editor to construct the dialog you get the dialog handle from the DlgProc that processes its messages and you get the edit control handle if you need it from its resource ID then call an API GetDlgItem()
invoke GetDlgItem,hDlg,125
mov hEdit, eax
In this example hDlg is supplied by the Dlgproc and the edit control ID number is 125. The return value is the edit control handle.
Hi,
Many thanks for that.
I works!! I can now get the handle given the item ID.
Regards,
Lightman