1

I've noticed that once a window is created using "CreateWindowEx" with x=0, y=0 position coordinates, window does not appear to be located in the the 0,0 corner of the screen. Instead it appears at the x=9, y=0.

  • I'm using a single monitor.
  • I'm not modyfing it's position anywhere else.
  • Window is created as an overlapped parent window.
  • When window is created, WM_MOVE get's called with x=8, y=31. (Those are "client-area" coordinates)

(It's a bit strange that WM_MOVE y coordinate is 31px but in the screenshot you can see that it should be ~38px...)

enter image description here

Window is created by:

mHandle = ::CreateWindowEx(WS_EX_APPWINDOW, CLASS_NAME, APP_NAME, WS_OVERLAPPEDWINDOW, 0, 0, mWidth, mHeight, HWND_DESKTOP, nullptr, mInstance, this);

Any ideas on what I might be doing wrong? What might be the reason?

Gediminas
  • 1,830
  • 3
  • 27
  • 47

0 Answers0