Windows Mobile 全屏對話方塊

2021-09-30 03:24:17 字數 1496 閱讀 4443

1. 完全全屏

在oninitdialog() 方法中呼叫如下**:

m_bfullscreen = false;

cdialog::oninitdialog();

// call shinitdialog with flags for full screen.

shinitdlginfo shidi;

shidi.dwmask = shidim_flags;

shidi.dwflags = shidif_fullscreennomenubar;

shidi.hdlg = m_hwnd;

::shinitdialog(&shidi);

// todo: add extra initialization here.

//::commandbar_show(m_pwndemptycb->m_hwnd, false);

// shfullscreen fails if dialog box is not foreground.

setforegroundwindow(); 

shfullscreen(m_hwnd, shfs_hidetaskbar | shfs_hidesipbutton);

// resize the window over the taskbar area.

#define menu_height 26

rect rect;

getwindowrect(&rect);

rect.top -= menu_height;

movewindow(&rect, true);

上面一段**可以實現完全的全屏, 但是我使用的過程中發現對話方塊的標題欄消失了..不知道為什麼..

2. 客戶區全屏

chikconfigdlg configdlg;

crect rc;

setrect( &rc, 0, 0, getsystemmetrics( sm_cxscreen ), getsystemmetrics( sm_cyscreen ) );

// 用來隱藏選單欄的

//hwnd hcommandbarwnd = ::findwindoww( _t("menu_worker"), null );

//::commandbar_show(hcommandbarwnd, false);

::shfullscreen( configdlg.m_hwnd, shfs_hidetaskbar | shfs_hidestarticon | shfs_hidesipbutton );

::movewindow( configdlg.m_hwnd, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, false );

int_ptr nresponse = configdlg.domodal();

if ( nresponse == idok )

{呼叫上面一段**, 建立的chikconfigdlg 對話方塊就是在客戶區內全屏的.

windows mobile 定製全屏視窗與選單欄

定製全屏視窗 定製全屏視窗 shinitdlginfo shidi hwnd hdlg m hwnd create a done button and size it.shidi.dwmask shidim flags shidi.dwflags shidif fullscreennomenubar...

Windows Mobile 全屏對話方塊

1.完全全屏 在oninitdialog 方法中呼叫如下 m bfullscreen false cdialog oninitdialog call shinitdialog with flags for full screen.shinitdlginfo shidi shidi.dwmask sh...

windows mobile下實現非全屏視窗顯示

切換到別的視窗再返回後,出現全屏顯示的問題,已解決。初始化中 將視窗居中顯示。實現方法 建立如下dialog,繼承它的dialog都是非全屏視窗。nonfsdialog.h pragma once cnonfsdialog dialog class cnonfsdialog public cdial...