Click here to Skip to main content
Click here to Skip to main content
Go to top

Having full screen without accessing the SHFullScreen API

, 26 Oct 2002
Rate this:
Please Sign up or sign in to vote.
Add full screen capability in your PocketPC applications.

Introduction

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.

Background

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.

Using the code

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);

Points of interest

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. Smile | :)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

CT CHANG
Web Developer
Malaysia Malaysia
Hackzai was graduated from Double-E, and being certified as MCSD (VS6) at spring 2003. But move forward with ASP.NET, VB.NET, C#, Silverlight, LINQ, XML

Comments and Discussions

 
GeneralShowWindow Pinmembermatlox14-Jul-06 2:53 
GeneralGlobal variables and hardcoded strings PinmemberBuontempo30-Mar-06 0:23 
Generaluse code with C# under VS.NET Pinmemberzrihen15-Aug-05 23:43 
GeneralRe: use code with C# under VS.NET Pinmemberhackzai16-Aug-05 0:48 
GeneralRe: use code with C# under VS.NET Pinmemberconversion::magro24-Sep-05 12:57 
GeneralTitles PinmemberLagwagon7-Mar-05 8:52 
GeneralProblem switching back to normal mode PinmemberFfelagund23-Feb-05 1:30 
GeneralRe: Problem switching back to normal mode Pinmemberhackzai23-Feb-05 20:02 
What value you get for the hWndTaskBar?
 
HACKZAI~ YOUR BUSINESS NEED, OUR CUSTOM MADE
GeneralRe: Problem switching back to normal mode PinmemberFfelagund23-Feb-05 21:41 
GeneralRe: Problem switching back to normal mode PinmemberGEHI G5-May-06 21:21 
GeneralRe: Problem switching back to normal mode PinmemberDuqueFP17-Mar-09 10:08 
GeneralProblem on PocketPC 2003 Mobile Pinmemberseanigan5-Oct-04 7:25 
GeneralRe: Problem on PocketPC 2003 Mobile Pinsusshackzai5-Oct-04 14:59 
GeneralRe: Problem on PocketPC 2003 Mobile PinmemberNigel621-Feb-05 5:25 
GeneralProblem PinmemberMukkie14-Nov-03 22:08 
GeneralRe: Problem PinmemberTemplMetaProg11-Dec-03 5:52 
GeneralRe: Problem PinmemberK-PAX25-Dec-03 0:33 
Generalsame in VS.Net and Win CE.Net Pinmemberschorschii18-Aug-03 20:26 
GeneralI'd need to use full screen, but... Pinmemberlandog16-Jul-03 3:49 
GeneralRe: I'd need to use full screen, but... PinmemberJohn M. Drescher16-Jul-03 4:24 
QuestionFullscreen with MFC? PinmemberS.Kirr8-Apr-03 23:04 
AnswerRe: Fullscreen with MFC? Pinmemberslomoman10-Oct-03 3:44 
GeneralRe: Fullscreen with VB.net in Pocket PC Pinmemberredman_888812-Mar-05 0:16 
GeneralWM_ACTIVATE Message PinmemberK-PAX9-Dec-02 13:31 
GeneralOnKillFocus / OnSetFocus PinsussElek4-Dec-02 2:57 

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 27 Oct 2002
Article Copyright 2002 by CT CHANG
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid