Showing a non full screen dialog under pocket pc is actually pretty easy. All you have to do is set the
m_bFullScreen member of the CDialog class to
FALSE in your dialog's constructor. It's after making a dialog non full screen that the problem begins. When you invoke any one of the SIP components, i.e. Keyboard, Transcriber, Block Recognizer etc. a dialog created in the above process will loose all its posture and will go full screen! To stop this erratic behavior, all you need to do is handle two windows messages,
WM_SETTINGCHANGE, and just call their default implementation in
So, to put it all together, I've written a dialog class that handles all these, so that you don't have to hard code all these all the time whenever you make a non full screen dialog box.
How to use
To instantly turn any
CDialog derived class into a non full screen dialog, just do the following:
CNonFSDialog header and source,
NonFSDialog.cpp to your project
- Include the
NonFSDialog.h in your dialog
- Instead of inheriting from
CDialog, you'll have to inherit from
class CNonFullScreenDialogDlg : public CNonFSDialog
- Now if you are in a search-replace mood , replace all occurrences of
CDialog in your dialogs source (cpp) with
CNonFSDialog. But if you are in a selective mode, you could only change the reference to the
CDialog class in the ctor...
CNonFullScreenDialogDlg::CNonFullScreenDialogDlg(CWnd* pParent )
: CNonFSDialog(CNonFullScreenDialogDlg::IDD, pParent)
and, in the
The reason you can get away by modifying just these two is cause only the constructor and message map have been overridden in the
CNonFSDialog dialog class.