BOOL bRet = FALSE;
m_d3dpp.BackBufferWidth = 0;
m_d3dpp.BackBufferHeight = 0;
GetWindowRect(hwnd, &m_rcWindow);
RECT rect = {0, 0, nWidth, nHeight};
AdjustWindowRectEx(&rect, GetWindowLong(hwnd, GWL_STYLE),
FALSE, GetWindowLong(hwnd, GWL_EXSTYLE));
SetWindowPos(hwnd, HWND_NOTOPMOST, m_rcWindow.left, m_rcWindow.top,
rect.right - rect.left, rect.bottom - rect.top,
SWP_SHOWWINDOW);
//务必释放dx资源
OnDeviceLost();
......
阅读全文