wince6.0 随手录

1.窗口满屏显示,最大化显示

在OnInitDialog()中:
满屏: 
int m_canvasW = GetSystemMetrics(SM_CXSCREEN);
 int m_canvasH = GetSystemMetrics(SM_CYSCREEN);
 ::SetWindowPos(this->GetSafeHwnd(),HWND_TOPMOST,0,0,m_canvasW,m_canvasH,SWP_SHOWWINDOW);
最大化: 
 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(&wndBottom,m_FullScreenRect.left,m_FullScreenRect.top,m_FullScreenRect.Width(),
 m_FullScreenRect.Height(),SWP_SHOWWINDOW);
备注:原本打算用::SHFullScreen(m_hWnd,SHFS_HIDETASKBAR);来做的,发现不知道为什么不行,貌似不支持!
而windows moible 是支持的!
 
   2.通过点击控件 打开指定目录的软件
 PROCESS_INFORMATION pi = {0};
 if (FALSE ==CreateProcess(L" //Storage Card//GPS.exe", NULL, NULL,
  NULL, FALSE, 0, NULL, NULL, NULL, &pi))
 {
  MessageBox(L"failed to load GPS software!");
 }
3. http://www.21eic.com/embed/note2279.html (世纪电子网)

你可能感兴趣的:(windows,null,WinCE)