========================================================== ==================================
Title: Hide the OK button of the dialog box program in the WinCE System
Abstract:
Note: Windows CE + VC2005
Date: 2010.8.9
Name: Zhu minglei
========================================================== ==================================
We can use the following function.
BOOL SHDoneButton (
HWND hwndRequester,
DWORD dwState
);
This function is provided for applications that need to dynamically show or hide the OK button based on the state of the application.
DwState: [in] Specifies the button state. SHDB_SHOW, hide the OK button; SHDB_HIDE, hide the OK button.
This function returns TRUE if it is successful and FALSE if it fails.
Code Example:
: SHDoneButton (m_hWnd, SHDB_HIDE); (MFC)
Or
BOOL SHDoneButtonExample (HWND hWnd, BOOL fShow)
{
If (fShow ){
// Show the done button when window becomes foreground
Return SHDoneButton (hWnd, SHDB_SHOW );
} Else {
// Hide the done button when window becomes foreground
Return SHDoneButton (hWnd, SHDB_HIDE );
}
}
Remarks:
Header: aygshell. h
Library: aygshell. lib
More details, see MSDN