Wince full screen method

Source: Internet
Author: User

; Modify the taskbar P: V-j '^ h
[Hkey_local_machinesoftwaremicrosoftshellautohide] mk3sd0ydl ~ A5i
"Default" = DWORD: 1 C & Z "O $ C" lw1p: N: m4y
[Hkey_local_machinesoftwaremicrosoftclock]
"Show_clock" = DWORD: 0
[Hkey_local_machinesoftwaremicrosoftshellontop] # y6r * uB-F3S8u ([
"Default" = DWORD: 0q | ^. X: s1o6 [8z

Or:
1. Remove the title bar of styles from the dialog attribute.
2. Add the following during dialog initialization:
Int ifullwidth = getsystemmetrics (sm_cxscreen );
Int ifullheight = getsystemmetrics (sm_cyscreen );
: Setwindowpos (this-> m_hwnd, hwnd_topmost, 0, 0, ifullwidth, ifullheight, swp_noownerzorder | swp_showwindow );

There are similar methods for Pocket PC

Full Screen mode for MFC pocketpc applications vs1lm 'k8bg # K # G! H

Dialog Box-based full screen mode for MFC pocketpc applications; h u RH # d @. G. B
R f * z, V * o8z7ch + Z ^ V
1. You need to translate the entire window up to 26 pixels to reach the top of the screen, and use the shfullscreen () function to hide the taskbar; A4 _; DMZ "h} t

Add the following statement to the oninitdialog () function:
Rect RC; + ib7} 3dwr 'q
Getwindowrect (& rc); m, IR, g (| 8nv |
RC. Top-= 26;
Movewindow (RC. Left, RC. Top, RC. Right, RC. Bottom, false); // move up 26 pixels
Shfullscreen (this-> m_hwnd, shfs_hidetaskbar); // hide the taskbar
'Z; F & [d7i5t/m
2. Prevent the taskbar from appearing when the input panel is used;

Description: According to msdn, wm_setting_change and wm_activate messages are sent during the Input Panel activity. You need to manually take over the processing of the two messages to keep the full screen. Y5x #} 5 K: ^
In the MFC class, the cdialog class is directly derived from the cwnd class, so you can directly add a function here.

In the dialog box class * DLG. h header file of the main program, add these two items (declare these two functions): pyt6b, y
// Implementation
Protected:
Hicon m_hicon;/T4 {en! T6/B
'J ~ U ~ V {+ k} X
// Generated message map functions: AA "_ 6 [ja $ x
// {Afx_msg (cfullscreendialogdlg)
Virtual bool oninitdialog ();
Virtual void onsettingchange (); =======================================================> 1
Afx_msg void onactivate (uint nstate, cwnd * pwndother, bool bminimized); ==========> 2
//} Afx_msg $ ^ g3zbu, w r (k) g6j + V
Declare_message_map ()

In the main program dialog box class * DLG. cpp implementation file, make the following changes: ^ W (B K {f}
(1) Add in message ing
Begin_message_map (cfullscreendialogdlg, cdialog) BV @ (o! Ag $ A) kk
// {Afx_msg_map (cfullscreendialogdlg) 'aha7z}
On_wm_settingchange () ==========================================================> 1N @ C * q; ZJ.] ve
On_wm_activate () ========================================================== ====> 2
//} Afx_msg_map; YTN y1z B
End_message_map ()

Manually add these two functions: u5bi? |; ^
Void cfullscreendialogdlg: onsettingchange () 2s0df-bmyz/Z
{
} 1 [{'x E/L-R'
E * q5l ^ B
Void cfullscreendialogdlg: onactivate (uint nstate, cwnd * pwndother, bool bminimized) 1bt _! U [XR
{
Cwnd: onactivate (nstate, pwndother, bminimized); // note that we {B $ NTQ is inherited from cwnd.
Shfullscreen (this-> m_hwnd, shfs_hidetaskbar);} % PA '0b) xx3mi
}

After such modification, whether the Input Panel or the hotkey is used to run other programs, the returned results can be kept in full screen. $ Ym7e? | D

Additional:
If a developer wants to block the exit by pressing the ESC and enter keys, add the pretranslatemessage function 8wa 'u2li * B (X; wcx

Bool cfullscreendialogdlg: retranslatemessage (MSG * PMSG) ebv2_1g "N1 ^
{
If (PMSG-> message = wm_keydown )@? GK! U y' m
{
If (PMSG-> wparam = vk_return) return true; // enter u0k8p n0xt | 4 ^
If (PMSG-> wparam = vk_escape) return true; * O. nv1 ?) 'J * P
}
Return cdialog: retranslatemessage (PMSG );
} J * w8e/F f5s? QP # B

MFC program for document/View Structure
/} A ^) 'v
Here, cmainframe is derived from cwnd. Just like this, you can modify it in mainframe. | HJ & JC. {9w4z
Move the functions in oninitdialog () to oncreate.
Here wm_activate and wm_settingchange can be added using the Class Wizard.
Then manually change onsettingchange to the void type.
2 ^ (k e # v R; d
For Win32 programs, the example shellapidemo provided by the ppc2003 SDK will be explained!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.