![]() |
Platforms, Frameworks & Libraries »
Mobile Development »
Dialogs and Windows
Intermediate
Having full screen without accessing the SHFullScreen APIBy hackzaiAdd the full screen capability in your PocketPC application. |
C++, eVC 3.0, eVC 4.0, Windows, PocketPC 2002, Visual Studio, Dev
|
|
Advanced Search |
|
|
|
||||||||||||||||
This article shows you how to make a full screen PocketPC application by removing the taskbar, menubar, SIP button as well as reposition the input panel by your own code.
If you're a Win32 application developer, then you'll be pretty familiar about the two main APIs that I have use in this sample code.
FindWindow
MoveWindow As well as, a seldom used API in most of you daily work with, SystemParametersInfo.
There are only two functions that you require to include into your project workspace and they are:
InitFullScreen(void)
DoFullScreen(bool) When you access the InitFullScreen, it will get the current desktop window working area followed by setting the working area to 240 x 320 (full screen in PocketPC). Subsequently, it will locate the TaskBar, InputPanel (SIP) and the SIP button window handle and store the original window working area with the respective defined window class.
NOTE: The TaskBar, SIP Button and InputPanel window class can be found with the Spy++ tool bundle with the eVC++ IDE.
Later, you you access the DoFullScreen, it will move the TaskBar, SIP Button to the button of the windows working area (320). Which there will not be visible in the newly defined window working area (240 x 320) and vice-versa.
For more detail of the code, please refer to the FullScreen.h/cpp. Where all the routine job was done within this two function.
Below is the first step you need to do before accessing the above mentioned functions:
/*
Add the following code into your main project header or cpp file.
*/
extern RECT rtDesktop;
extern RECT rtNewDesktop;
extern RECT rtTaskBar;
extern int InitFullScreen (void);
extern int DoFullScreen (bool);
Second, you require to call the InitFullScreen function under the WM_CREATE message as:
case WM_CREATE:
// Initialize full screen capability
InitFullScreen();
Now, you're ready to switch your application between full and non-full screen mode by the following code:
// Switch to full screen mode
DoFullScreen(true);
// Switch to non-full screen mode
DoFullScreen(false);
After you step through the sample code, you will learn most of the controls in MS Windows can easily be over taken by other applications provided you have successfully obtained the respective window handle (HWND).
Hence, you can start having fun by messing all the controls around your desktop. :)
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 26 Oct 2002 Editor: Smitha Vijayan |
Copyright 2002 by hackzai Everything else Copyright © CodeProject, 1999-2009 Web19 | Advertise on the Code Project |