Click here to Skip to main content
5,790,650 members and growing! (19,694 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » Mobile Development » Dialogs and Windows     Intermediate

Having full screen without accessing the SHFullScreen API

By hackzai

Add the full screen capability in your PocketPC application.
C++, eVC 3.0, eVC 4.0, eVC, Windows, Win Mobile, Mobile, PocketPC 2002, CE 2.11, CE 3.0, Visual Studio, Dev

Posted: 26 Oct 2002
Updated: 26 Oct 2002
Views: 111,219
Bookmarked: 28 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
13 votes for this Article.
Popularity: 3.83 Rating: 3.44 out of 5
2 votes, 18.2%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
3 votes, 27.3%
4
6 votes, 54.5%
5

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

hackzai


克仔 was graduated from Double-E, and being certified as MCSD (VS6) at spring 2003.
Occupation: Web Developer
Location: Malaysia Malaysia

Other popular Mobile Development articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 25 (Total in Forum: 25) (Refresh)FirstPrevNext
GeneralShowWindowmembermatlox3:53 14 Jul '06  
GeneralGlobal variables and hardcoded stringsmemberBuontempo1:23 30 Mar '06  
Generaluse code with C# under VS.NETmemberzrihen0:43 16 Aug '05  
GeneralRe: use code with C# under VS.NETmemberhackzai1:48 16 Aug '05  
GeneralRe: use code with C# under VS.NETmemberconversion::magro13:57 24 Sep '05  
GeneralTitlesmemberLagwagon9:52 7 Mar '05  
GeneralProblem switching back to normal modememberFfelagund2:30 23 Feb '05  
GeneralRe: Problem switching back to normal modememberhackzai21:02 23 Feb '05  
GeneralRe: Problem switching back to normal modememberFfelagund22:41 23 Feb '05  
GeneralRe: Problem switching back to normal modememberGEHI G22:21 5 May '06  
GeneralProblem on PocketPC 2003 Mobilememberseanigan8:25 5 Oct '04  
GeneralRe: Problem on PocketPC 2003 Mobilesusshackzai15:59 5 Oct '04  
GeneralRe: Problem on PocketPC 2003 MobilememberNigel626:25 1 Feb '05  
GeneralProblemmemberMukkie23:08 14 Nov '03  
GeneralRe: ProblemmemberTemplMetaProg6:52 11 Dec '03  
GeneralRe: ProblemmemberK-PAX1:33 25 Dec '03  
Generalsame in VS.Net and Win CE.Netmemberschorschii21:26 18 Aug '03  
GeneralI'd need to use full screen, but...memberlandog4:49 16 Jul '03  
GeneralRe: I'd need to use full screen, but...memberJohn M. Drescher5:24 16 Jul '03  
GeneralFullscreen with MFC?memberS.Kirr0:04 9 Apr '03  
GeneralRe: Fullscreen with MFC?memberslomoman4:44 10 Oct '03  
GeneralRe: Fullscreen with VB.net in Pocket PCmemberredman_88881:16 12 Mar '05  
GeneralWM_ACTIVATE MessagememberK-PAX14:31 9 Dec '02  
GeneralOnKillFocus / OnSetFocussussElek3:57 4 Dec '02  
Generalhow to do this in a Mulitple View ApplicationmemberR.Rajesh18:36 15 Nov '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 26 Oct 2002
Editor: Smitha Vijayan
Copyright 2002 by hackzai
Everything else Copyright © CodeProject, 1999-2009
Web13 | Advertise on the Code Project