Answer the question
In order to leave comments, you need to log in
Why is the window drawn to the left and higher than it should?
Hello everyone, I have such a question, I create a window for my program and I want it to appear above the start menu from the bottom right, size 480 * 320, I wrote the code
SystemParametersInfo(SPI_GETWORKAREA, 0, &WorkAreaSize, 0);
UINT xWindowsSize = 480;
UINT yWindowsSize = 320;
UINT yPosition = WorkAreaSize.bottom - WorkAreaSize.top - yWindowsSize;
UINT xPosition = WorkAreaSize.right - WorkAreaSize.left - xWindowsSize;
HWND hWnd = CreateWindow(THIS_CLASSNAME, TEXT("Title"), WS_SYSMENU | WS_CAPTION,
xPosition, yPosition, xWindowsSize, yWindowsSize, NULL, NULL, hInst, NULL);
if (!hWnd) {
MessageBox(NULL, L"Can't create window!", TEXT("Warning!"), MB_ICONERROR | MB_OK | MB_TOPMOST);
return 1;
}
Answer the question
In order to leave comments, you need to log in
In 10, there is a transparent frame around the window, like just 7 pixels each. Now I’m not sitting at the 10th, but in my opinion if you take a screenshot of the active window, then the window will get into the picture and a little more from all sides. Here it is (transparent frame) is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question