wince MFC視窗全屏

2021-06-06 20:04:36 字數 1201 閱讀 3643

wince的mfc程式視窗全屏,在initdialog函式裡面加:

crect m_fullscreenrect;   //全屏區域

crect windowrect;

getwindowrect(&windowrect);

crect clientrect;

repositionbars(0, 0xffff, afx_idw_pane_first, reposquery, &clientrect);

clienttoscreen(&clientrect);

int nfullwidth = getsystemmetrics(sm_cxscreen);

int nfullheight = getsystemmetrics(sm_cyscreen);

m_fullscreenrect.left = windowrect.left-clientrect.left;

m_fullscreenrect.top = windowrect.top-clientrect.top;

m_fullscreenrect.right = windowrect.right-clientrect.right+nfullwidth;

m_fullscreenrect.bottom = windowrect.bottom-clientrect.bottom+nfullheight;

this->setwindowpos(this->getwindow(gw_owner), m_fullscreenrect.left,

m_fullscreenrect.top, m_fullscreenrect.width(),

m_fullscreenrect.height(), swp_showwindow);

//hide the taskbar

hwnd htask = ::findwindow(text("hhtaskbar"), null);

if (htask)

另外,在程式退出前需要恢復工作列的顯示:

//show the taskbar

hwnd htask = ::findwindow(text("hhtaskbar"), null);

if (htask)

該操作我放在析構函式中。

win32的則需要對應的修改下。

上述**在ce5.0上測試通過。

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

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

Qt子視窗全屏顯示

qt全屏顯示函式 window.showfullscreen qt最大化顯示函式 window.showmaximized qt最小化顯示函式 window.showminimized qt固定尺寸顯示函式 window.resize x,y 子視窗全屏顯示 將要全屏的qt主視窗中的子視窗呼叫函式 ...

Qt子視窗全屏顯示

子視窗全屏顯示 將要全屏的qt主視窗中的子視窗呼叫函式 setwindowflags qt dialog 然後呼叫 showfullscreen 函式將子視窗全屏顯示。也就是先將子視窗全屏顯示前設定為頂級視窗,然後進行全屏顯示。應為 showfullscreen 函式只對頂級視窗有效。如果要還原為普...