|
DEVMODE devmode = {0};
devmode.dmSize = sizeof(DEVMODE);
devmode.dmFields = DM_DISPLAYORIENTATION;
::ChangeDisplaySettingsEx(NULL, &devmode, NULL, CDS_TEST, NULL);
int Screen_x,Screen_y;
devmode.dmDisplayOrientation = DMDO_90;
devmode.dmFields = DM_DISPLAYORIENTATION;
::ChangeDisplaySettingsEx(NULL, &devmode, NULL, CDS_RESET, NULL);
Screen_x = GetSystemMetrics(SM_CXSCREEN);
Screen_y = GetSystemMetrics(SM_CYSCREEN);
::MoveWindow(this->m_hWnd,0,0,Screen_x,Screen_y,TRUE);
屏幕翻转代码,但这个代码的前提是驱动支持,PS:驱动自己可以写得出来的哈.
在没有驱动支持的条件下要实现的话,可能会比较麻烦,我暂时也不清楚有啥子其他好方法. |
|