Click here to Skip to main content
6,293,171 members and growing! (12,031 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, Windows, PocketPC 2002, Visual Studio, Dev
Posted:26 Oct 2002
Views:121,848
Bookmarked:31 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
14 votes for this article.
Popularity: 4.05 Rating: 3.53 out of 5
2 votes, 16.7%
1

2

3
3 votes, 25.0%
4
7 votes, 58.3%
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


Member
克仔 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:

  • Writing Your Own GPS Applications: Part 2
    In part two of the series, the author of "GPS.NET" teaches developers how to write GPS applications suitable for the real world by mastering GPS precision concepts. Source code includes a working NMEA interpreter and sample high-precision application in C# and VB.NET.
  • Writing Your Own GPS Applications: Part I
    What is it that GPS applications need to be good enough to use for in-car navigation? Also, how does the process of interpreting GPS data actually work? In this three-part series, I will cover both topics and give you the skills you need to write a commercial-grade GPS application.
  • Learn How to Find GPS Location on Any SmartPhone, and Then Make it Relevant
    A step by step tutorial for getting GPS from any SmartPhone, even without GPS built in, and then making location useful.
  • Pocket 1945 - A C# .NET CF Shooter
    An article on Pocket PC game development
  • iPhone UI in Windows Mobile
    It's an interface that works with transparency effects. As a sample I used an interface just like the iPhone one. In this tutorial I am explaining how simple is working with transparency on Windows Mobile.
Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 26 (Total in Forum: 26) (Refresh)FirstPrevNext
GeneralShowWindow Pinmembermatlox3:53 14 Jul '06  
GeneralGlobal variables and hardcoded strings PinmemberBuontempo1:23 30 Mar '06  
Generaluse code with C# under VS.NET Pinmemberzrihen0:43 16 Aug '05  
GeneralRe: use code with C# under VS.NET Pinmemberhackzai1:48 16 Aug '05  
GeneralRe: use code with C# under VS.NET Pinmemberconversion::magro13:57 24 Sep '05  
GeneralTitles PinmemberLagwagon9:52 7 Mar '05  
GeneralProblem switching back to normal mode PinmemberFfelagund2:30 23 Feb '05  
GeneralRe: Problem switching back to normal mode Pinmemberhackzai21:02 23 Feb '05  
GeneralRe: Problem switching back to normal mode PinmemberFfelagund22:41 23 Feb '05  
GeneralRe: Problem switching back to normal mode PinmemberGEHI G22:21 5 May '06  
GeneralRe: Problem switching back to normal mode PinmemberDuqueFP11:08 17 Mar '09  
GeneralProblem on PocketPC 2003 Mobile Pinmemberseanigan8:25 5 Oct '04  
GeneralRe: Problem on PocketPC 2003 Mobile Pinsusshackzai15:59 5 Oct '04  
GeneralRe: Problem on PocketPC 2003 Mobile PinmemberNigel626:25 1 Feb '05  
GeneralProblem PinmemberMukkie23:08 14 Nov '03  
GeneralRe: Problem PinmemberTemplMetaProg6:52 11 Dec '03  
GeneralRe: Problem PinmemberK-PAX1:33 25 Dec '03  
Generalsame in VS.Net and Win CE.Net Pinmemberschorschii21:26 18 Aug '03  
GeneralI'd need to use full screen, but... Pinmemberlandog4:49 16 Jul '03  
GeneralRe: I'd need to use full screen, but... PinmemberJohn M. Drescher5:24 16 Jul '03  
GeneralFullscreen with MFC? PinmemberS.Kirr0:04 9 Apr '03  
GeneralRe: Fullscreen with MFC? Pinmemberslomoman4:44 10 Oct '03  
GeneralRe: Fullscreen with VB.net in Pocket PC Pinmemberredman_88881:16 12 Mar '05  
GeneralWM_ACTIVATE Message PinmemberK-PAX14:31 9 Dec '02  
GeneralOnKillFocus / OnSetFocus PinsussElek3:57 4 Dec '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
Web19 | Advertise on the Code Project