HI, one question...
what api can i use when i want to dissable some button from my Dialog, and what to enable?
Well, I didn't use dialogs so I'm not shure that this would help, but you can use EnableWindow for any window (as long as you know it's handle).
Regards,
Nick
hi TNick, thanks for answering.
No, i was try to use EnableWindow but failed, thats only for Window,Dialog
anyone sugest something?
Quote from: trodon on November 18, 2006, 07:50:25 PM
hi TNick, thanks for answering.
No, i was try to use EnableWindow but failed, thats only for Window,Dialog
anyone sugest something?
EnableWindow work for windows and controls.
invoke EnableWindow, hButton, FALSE ; or TRUE
If it fails, the problem must be elsewhere.
::)
invoke SendDlgItemMessage, hDlg,IDB_BTN,WM_ENABLE,FALSE,NULL
..or..
invoke GetDlgItem, hDlg,IDB_BTN
invoke SendMessage, eax,WM_ENABLE,FALSE,NULL
..or..
invoke GetDlgItem, hDlg,IDB_BTN
invoke EnableWindow, eax,FALSE
(which just calls the SendMessage as above.)
Replace the FALSE with TRUE, to enable - obviously :wink
WM_ENABLE is a notification, not a message: LINK (http://msdn2.microsoft.com/en-gb/library/ms632621.aspx).
Here is a small function i use in my own applications:
EnableControl PROC hWnd:HWND, nIDDlgItem:DWORD, bEnable:DWORD
invoke GetDlgItem, hWnd, nIDDlgItem
invoke EnableWindow, eax, bEnable
ret
EnableControl ENDP
Hope this helps, Ehtyar.
well i must say thank you all :U