I have a university assignment for my programming class to set up a C++/Win32API script which would use tiny windows to show an analog clock.
All fine and dandy but I cannot figure out how to resize a window to less than ~17 px.
I tried to handle the
case WM_GETMINMAXINFO:
{
MINMAXINFO* mmi = (MINMAXINFO*)lParam;
mmi->ptMinTrackSize.x = 1; // doesn't do anything below 18-20
mmi->ptMinTrackSize.y = 1; // same as above
return 0;
}
yet the window doesn't want to resize below around 17 pixels in width or height.
I use the following code to create the windows
hWnd = CreateWindowEx(
WS_EX_TOOLWINDOW,
szWindowClass,
_T( "tool" ),
WS_EX_TOOLWINDOW,
300 + ( 20 * i ), // x
150, // y
1, // width
1, // height
NULL,
NULL,
hInstance,
NULL
);
SetWindowLong(hWnd, GWL_STYLE, 0); // remove borders
the orange boxes are 18 little windows that I tried to create: