cocos2d-x win32 全屏

 HWND    hDesk;     
 RECT    rc;     
 hDesk   =    GetDesktopWindow();     
 GetWindowRect(hDesk, &rc);     
 SetWindowLong(m_hWnd, GWL_STYLE, WS_BORDER);     
 
 SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, rc.right, rc.bottom, SWP_SHOWWINDOW); 
 ShowWindow(hDesk,SW_SHOWMAXIMIZED);

cocos2d-x从手机游戏到PC端游 - ♂苹果 - 眼睛想旅行



eglView->setFrameSize(480, 320);

==>

RECT rcWindow;
 HWND xxtmp = eglView->getHWnd();
 GetWindowRect(xxtmp,&rcWindow);
 int w = (int)rcWindow.right;
 int h = (int)rcWindow.bottom;
 eglView->setFrameSize(w, h);

cocos2d-x从手机游戏到PC端游 - ♂苹果 - 眼睛想旅行


pEGLView->setDesignResolutionSize(480,320, kResolutionExactFit); 

你可能感兴趣的:(cocos2d-x win32 全屏)