<WindowName>.Center
Posted: Fri Mar 27, 2015 6:38 pm
Hi Claudio,
I have found difference to use C_CENTER function specially when I try with GETDESKTOPREAL at maximum size.
Difference exists at y = GetSystemMetrics(SM_CYSCREEN) thru taking rect by GetWindowRect and y = rect.bottom - rect.top thru taking rect by SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 )
Would you agree with this replacement at:
y = GetSystemMetrics(SM_CYSCREEN);
by this:
SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 );
y = rect.bottom - rect.top;
I made this changing and working in properly.
I guess that our actual C_CENTER function is considering the window's title height and do not make the right centralizing.
I have found difference to use C_CENTER function specially when I try with GETDESKTOPREAL at maximum size.
Difference exists at y = GetSystemMetrics(SM_CYSCREEN) thru taking rect by GetWindowRect and y = rect.bottom - rect.top thru taking rect by SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 )
Would you agree with this replacement at:
y = GetSystemMetrics(SM_CYSCREEN);
by this:
SystemParametersInfo( SPI_GETWORKAREA, 1, &rect, 0 );
y = rect.bottom - rect.top;
I made this changing and working in properly.
I guess that our actual C_CENTER function is considering the window's title height and do not make the right centralizing.