Win32 API provides many styles for window creating and I’m looking for a style that can remove a one-pixel border from the window that I created with this code:
DWORD dwExtStyle = 0;
DWORD dwStyle = WS_POPUPWINDOW;
m_hWnd = CreateWindowEx(
dwExtStyle,
className,
windowName,
dwStyle,
300,
300,
100,
100,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(m_hWnd, SW_SHOW);
and I got the result:

What combination of flags can remove the black border from the window.
Just use
WS_POPUPinstead ofWS_POPUPWINDOW.The macro
WS_POPUPWINDOWis actually a set of flags:The
WS_BORDERflag is the one responsible of your black square.