I have my app with multiple dialogs.
I need to reference my controls handle throughout my code.
Is there an easy way to obtain the handles of all my controls at the beginning of my code , so I can easily reference them later?
Ideally, this is how I would like to reference them ( and it SHOULDbe self explanatory ):
what would be ideal is if i had an array:
IDC_MYEDIT1, IDC_MYEDIT2, IDC_MYEDIT3 etc
and somehow grabbed all the handles.
Any ideas?
Thanks,
Trope
I need to reference my controls handle throughout my code.
Is there an easy way to obtain the handles of all my controls at the beginning of my code , so I can easily reference them later?
Ideally, this is how I would like to reference them ( and it SHOULDbe self explanatory ):
INVOKE SetDlgItemText, hWin, IDC_MYEDIT1, ADDR buffer2
what would be ideal is if i had an array:
IDC_MYEDIT1, IDC_MYEDIT2, IDC_MYEDIT3 etc
and somehow grabbed all the handles.
Any ideas?
Thanks,
Trope
at first you should not mess handles and identifiers - identifiers are numbers defined in program, handles are assigned by system when window of control created.
when you design dialog you can define measningful ides to the controls, eg. START+number, instead of automatic definition by rc editor counter.
if you mean handles - they can be got via getdlgitem when wm_initdialog message recieved
when you design dialog you can define measningful ides to the controls, eg. START+number, instead of automatic definition by rc editor counter.
if you mean handles - they can be got via getdlgitem when wm_initdialog message recieved
If you have an array
array dd IDC_MYEDIT1, IDC_MYEDIT2, IDC_MYEDIT3
You can do something like
If I am not wrong.
array dd IDC_MYEDIT1, IDC_MYEDIT2, IDC_MYEDIT3
You can do something like
push edi
mov edi, 2
@@:
invoke GetDlgItem, hdlg,
mov , eax
dec edi
js @B
pop edi
If I am not wrong.