Click here to Skip to main content
13,351,896 members (88,692 online)
Click here to Skip to main content
Add your own
alternative version


35 bookmarked
Posted 7 Sep 2002

A Non Full-Screen Dialog Class for Windows CE

, 7 Sep 2002
Rate this:
Please Sign up or sign in to vote.
This article describes a non full screen dialog class that does not switch to full screen when the SIP is activated.


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_ACTIVATE and WM_SETTINGCHANGE, and just call their default implementation in CWnd.

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:

  1. Add CNonFSDialog header and source, NonFSDialog.h and NonFSDialog.cpp to your project
  2. Include the CNonFSDialog header NonFSDialog.h in your dialog
    #include "NonFSDialog.h"
  3. Instead of inheriting from CDialog, you'll have to inherit from CNonFSDialog.
    // Assuming dialog class name is CNonFullScreenDialogDlg
    class CNonFullScreenDialogDlg : public CNonFSDialog
  4. 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 dialog
    CNonFullScreenDialogDlg::CNonFullScreenDialogDlg(CWnd* pParent /*=NULL*/)
    	: /*CDialog*/CNonFSDialog(CNonFullScreenDialogDlg::IDD, pParent)
    and, in the BEGIN_MESSAGE_MAP macro...
    BEGIN_MESSAGE_MAP(CNonFullScreenDialogDlg, /*CDialog*/CNonFSDialog)
    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.


This article, along with any associated source code and files, is licensed under The BSD License


About the Author

Tanzim Husain
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralOne little thx for one little sentence Pin
HeapWalker15-Dec-03 5:32
memberHeapWalker15-Dec-03 5:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180111.1 | Last Updated 8 Sep 2002
Article Copyright 2002 by Tanzim Husain
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid