I am trying to draw a hbitmap with a layeredwindow directly onto the screen. this also works now how it should, yet the left upper corner of the image is always rounded.
I’m creating the window with:
HWND hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT
, szWindowClass, 0,
WS_VISIBLE
, 150,250, width, height, 0, NULL, hInstance, NULL);
Could anyone help me please to solve this problem?
You are using
WS_VISIBLEas the window style, which is equivalent toWS_OVERLAPPED | WS_VISIBLE. Overlapped windows have rounded corners at the top.Use
WS_POPUP | WS_VISIBLEinstead.