Page 1 of 1

PostPosted: Mon Dec 30, 2002 3:54 am
by FrappyDan
I know how to create a button that's not enabled but what kind of a message can you send to a button to disable it? I didn't see this code in the ceapi.


PostPosted: Mon Dec 30, 2002 11:17 am
by guy
Use the EnableWindow() function to enable and disable controls:

EnableWindow(HWND hWnd, BOOL bEnable) ;

hWnd Is the window handle for the control. Use gethwnd() to convert from PocketC guiid to a window handle.
bEnable should be TRUE to enable the control and FALSE to disable the control.

The documentation for this function is in the Keyboard section of the Microsoft online CE API documentation.

You can't send a message to enable or disable a control.

PocketC CE API interface:
PCForm and CE API forum: