I want to create a small win32 window which is draggable.
I tried to create a small window by using the following code where i have specified the width and height of window to be 60, 60 resp. But the created window looks like it is 120 width and 60 height i.e., it has slightly larger width. I think it has added empty title bar/caption bar and hence width became larger. I have attached the image of window for your reference. This window is draggable.
HWND hWnd = CreateWindowW(szWindowClass, NULL, WS_VISIBLE | WS_BORDER,
1200, 800, 60, 60,
nullptr, nullptr, hInstance, nullptr);
Then i changed the window style to WS_POPUP, which created window with width and height as 60 and 60 resp. But this window is not draggable. It's position is fixed. I have attached the image of window for your reference.
HWND hWnd = CreateWindowW(szWindowClass, NULL, WS_POPUP | WS_BORDER,
1200, 800, 60, 60,
nullptr, nullptr, hInstance, nullptr);
Kindly let me know what i need to change so that i can create small draggable window.