|
From: Chris S. <CS...@Ai...> - 2003-08-12 00:22:03
|
Hi Kevin,=20 Thanks - it worked.=20 I don't have the Win32 SDK. I rely on the microsoft web page for = function documentation, if that's what you mean.=20 Regards=20 Chris=20 -----Original Message----- From: Kevin Wood [mailto:ke...@me...] Sent: Monday, 11 August 2003 11:04 PM To: dev...@li... Subject: Re: [Dev-C++] C++ dialog control Hi everyone, At 01:53 11/08/03, Chris Sroka wrote: >I have created an OK pushbutton in a dialog box via a resource script = (see=20 >code below): > >**** > > DEFPUSHBUTTON "Start", ID_START_CALC, 255, 7, 50, 14 > DEFPUSHBUTTON "OK", ID_OK, 255, 27, 50, 14 > DEFPUSHBUTTON "Cancel", ID_CANCEL, 255, 47, 50, 14 >**** There should only be one default button in a dialog box. Use PUSHBUTTON = for=20 the rest. >I am trying to grey it out and disable it, from within a callback=20 >function, while I carry out some calculations, and then enable it again = >when the calcs are complete. Buttons are windows, so you can send a message to the button to disable = it,=20 via the EnableWindow function: EnableWindow(HWND hWnd, BOOL bEnable) where hWnd is the window handle, and bEnable is set to FALSE to disable = the=20 window. >Does anyone know how to do this? I have tried SendDlgItemMessage with = the=20 >dialog's handle, the pushbutton's ID and various LPARAMs and WPARAMs = but=20 >with no success. I have also trawled www.msdn.microsoft.com but found = no=20 >suggestions. Do you have the Win32 SDK? Regards, Kev. ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/= 01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |