Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void ClientResize(HWND hWnd, int nWidth, int nHeight)
- {
- RECT rcClient, rcWind;
- POINT ptDiff;
- GetClientRect(hWnd, &rcClient);
- GetWindowRect(hWnd, &rcWind);
- ptDiff.x = (rcWind.right - rcWind.left) - rcClient.right;
- ptDiff.y = (rcWind.bottom - rcWind.top) - rcClient.bottom;
- MoveWindow(hWnd,rcWind.left, rcWind.top, nWidth + ptDiff.x, nHeight + ptDiff.y, TRUE);
- }
- void ClientResize(HWND hWnd, int nWidth, int nHeight)
- {
- RECT rcClient, rcWind;
- POINT ptDiff;
- GetClientRect(hWnd, &rcClient);
- GetWindowRect(hWnd, &rcWind);
- ptDiff.x = (rcWind.right - rcWind.left) - rcClient.right;
- ptDiff.y = (rcWind.bottom - rcWind.top) - rcClient.bottom;
- MoveWindow(hWnd,rcWind.left, rcWind.top, nWidth + ptDiff.x, nHeight + ptDiff.y, TRUE);
- }
- void ClientResize(HWND hWnd, int nWidth, int nHeight)
- {
- RECT rcClient, rcWind;
- POINT ptDiff;
- GetClientRect(hWnd, &rcClient);
- GetWindowRect(hWnd, &rcWind);
- ptDiff.x = (rcWind.right - rcWind.left) - rcClient.right;
- ptDiff.y = (rcWind.bottom - rcWind.top) - rcClient.bottom;
- MoveWindow(hWnd,rcWind.left, rcWind.top, nWidth + ptDiff.x, nHeight + ptDiff.y, TRUE);
- }
- int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
- GetClientRect(hWnd, &rcClient);
- GetWindowRect(hWnd, &rcWind);
- int border_thickness = ((rcWind.right - rcWind.left) - rcClient.right)/2;
Add Comment
Please, Sign In to add comment