enabling/disabling checkboxes

enabling/disabling checkboxes

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.

2 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Jugoslav Dujic

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 www.xeffort.com

Accedere per lasciare un commento.