Re: initialize the Control enable/disable of dialog
> From: "tlpr2000" <tlpr2000@...>If you're using the control wrappers, the first thing you must do in
> Subject: initialize the Control enable/disable of dialog
> i'm trying to initialize my dialogbox..
> my program is using extern value 'server'..
> if 'server' is '0' or '1', i wanna to make disable editbox.
> and if 'server' is '2', enable editbox
> my code is folowing..
> i wrote my code in OnInitDialog() function like MFC
> but i met run-time error at the sentence, "serverEdit.EnableWindow
> (true);" because of IsWindow(m_hWnd)
> how do i solve this problem?
> Your help is greatly appreciated.
your OnInitDialog call is to attach them to the actual windows.
... should do it.
The reason you're getting the IsWindow() message is because unless you
Attach the controls, they're pointing at a NULL HWND.