Click here to Skip to main content
Licence CPOL
First Posted 26 Oct 2002
Views 147,656
Downloads 295
Bookmarked 39 times

Having full screen without accessing the SHFullScreen API

By | 26 Oct 2002 | Article
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. :)

License

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

About the Author

hackzai

Web Developer

Malaysia Malaysia

Member

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

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralShowWindow Pinmembermatlox2:53 14 Jul '06  
GeneralGlobal variables and hardcoded strings PinmemberBuontempo0:23 30 Mar '06  
Generaluse code with C# under VS.NET Pinmemberzrihen23:43 15 Aug '05  
GeneralRe: use code with C# under VS.NET Pinmemberhackzai0:48 16 Aug '05  
GeneralRe: use code with C# under VS.NET Pinmemberconversion::magro12:57 24 Sep '05  
GeneralTitles PinmemberLagwagon8:52 7 Mar '05  
GeneralProblem switching back to normal mode PinmemberFfelagund1:30 23 Feb '05  
GeneralRe: Problem switching back to normal mode Pinmemberhackzai20:02 23 Feb '05  
GeneralRe: Problem switching back to normal mode PinmemberFfelagund21:41 23 Feb '05  
GeneralRe: Problem switching back to normal mode PinmemberGEHI G21:21 5 May '06  
GeneralRe: Problem switching back to normal mode PinmemberDuqueFP10:08 17 Mar '09  
GeneralProblem on PocketPC 2003 Mobile Pinmemberseanigan7:25 5 Oct '04  
GeneralRe: Problem on PocketPC 2003 Mobile Pinsusshackzai14:59 5 Oct '04  
GeneralRe: Problem on PocketPC 2003 Mobile PinmemberNigel625:25 1 Feb '05  
GeneralProblem PinmemberMukkie22:08 14 Nov '03  
GeneralRe: Problem PinmemberTemplMetaProg5:52 11 Dec '03  
GeneralRe: Problem PinmemberK-PAX0:33 25 Dec '03  
Generalsame in VS.Net and Win CE.Net Pinmemberschorschii20:26 18 Aug '03  
GeneralI'd need to use full screen, but... Pinmemberlandog3:49 16 Jul '03  
GeneralRe: I'd need to use full screen, but... PinmemberJohn M. Drescher4:24 16 Jul '03  
QuestionFullscreen with MFC? PinmemberS.Kirr23:04 8 Apr '03  
AnswerRe: Fullscreen with MFC? Pinmemberslomoman3:44 10 Oct '03  
GeneralRe: Fullscreen with VB.net in Pocket PC Pinmemberredman_88880:16 12 Mar '05  
GeneralWM_ACTIVATE Message PinmemberK-PAX13:31 9 Dec '02  
GeneralOnKillFocus / OnSetFocus PinsussElek2:57 4 Dec '02  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120528.1 | Last Updated 27 Oct 2002
Article Copyright 2002 by hackzai
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid