- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How do I enable/disable checkboxes by using the handle for the concerned dialog box i.e not using the dlgset function.
I want to obtain the same functionality as
dlgset(dlg,IDC_checkbox,.false.,dlg_enable )
using hdlg instead of dlg.The BM_SETCHECK and BM_SETSTATE functions succeed in greying out the check box but not in disabling them.
I'd like to know how I can totally disable and grey out a check box.
Thanks.
--rswy
How do I enable/disable checkboxes by using the handle for the concerned dialog box i.e not using the dlgset function.
I want to obtain the same functionality as
dlgset(dlg,IDC_checkbox,.false.,dlg_enable )
using hdlg instead of dlg.The BM_SETCHECK and BM_SETSTATE functions succeed in greying out the check box but not in disabling them.
I'd like to know how I can totally disable and grey out a check box.
Thanks.
--rswy
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Checkbox is a window as any else. Use GetDlgItem to retrieve its handle, and then you can do with it whatever you can do with a window:
i = EnableWindow(GetDlgItem(hDlg,IDC_CHECKBOX), .FALSE.)
(Cf. ShowWindow(GetDlgItem(hDlg,IDC_CHECKBOX), SW_HIDE), MoveWindow, etc.)
Jugoslav
i = EnableWindow(GetDlgItem(hDlg,IDC_CHECKBOX), .FALSE.)
(Cf. ShowWindow(GetDlgItem(hDlg,IDC_CHECKBOX), SW_HIDE), MoveWindow, etc.)
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page