If you don't want the default windows mobile behavior you will need to call the function SHDoneButton.
It takes three possible arguments:
SHDB_HIDE
- which is the default and WM most likely displays the 'X' button and will minimize your app when it's pressed. Also note on some devices the 'X' button will send aWM_QUIT
to your application.SHDB_SHOW
- will show a 'ok' button and will send a IDOKWM_COMMAND
to your window when pressed.SHDB_SHOWCANCEL
- will show a 'x' button and will send a IDCANCELWM_COMMAND
to your window when pressed.