mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[user32_apitest]
- Add one more testcase and fix another one for SPI_SETNONCLIENTMETRICS svn path=/trunk/; revision=54187
This commit is contained in:
parent
144e71d4b2
commit
8451dca5ee
1 changed files with 28 additions and 3 deletions
|
@ -64,11 +64,24 @@ MSG_ENTRY NcMetricsChange_chain[]={
|
|||
{2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW},
|
||||
{2,WM_GETMINMAXINFO},
|
||||
{2,WM_NCCALCSIZE},
|
||||
{2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE},
|
||||
{2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE},
|
||||
{1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW},
|
||||
{1,WM_GETMINMAXINFO},
|
||||
{1,WM_NCCALCSIZE},
|
||||
{1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE},
|
||||
{1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE},
|
||||
{0,0}};
|
||||
|
||||
MSG_ENTRY NcMetricsChange1_chain[]={
|
||||
{2,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW},
|
||||
{2,WM_GETMINMAXINFO},
|
||||
{2,WM_NCCALCSIZE},
|
||||
{2,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE},
|
||||
{1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW},
|
||||
{1,WM_GETMINMAXINFO},
|
||||
{1,WM_NCCALCSIZE},
|
||||
{1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOSIZE},
|
||||
{2,WM_SETTINGCHANGE},
|
||||
{1,WM_SETTINGCHANGE},
|
||||
{0,0}};
|
||||
|
||||
MSG_ENTRY CaptionHeight_chain[]={
|
||||
|
@ -80,7 +93,7 @@ MSG_ENTRY CaptionHeight_chain[]={
|
|||
{1,WM_WINDOWPOSCHANGING, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW},
|
||||
{1,WM_GETMINMAXINFO},
|
||||
{1,WM_NCCALCSIZE},
|
||||
{1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE},
|
||||
{1,WM_WINDOWPOSCHANGED, SENT, 0, SWP_FRAMECHANGED|SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOMOVE|SWP_NOZORDER|SWP_NOREDRAW | SWP_NOCLIENTSIZE},
|
||||
{1,WM_MOVE},
|
||||
{0,0}};
|
||||
|
||||
|
@ -88,21 +101,33 @@ static void Test_NonClientMetrics()
|
|||
{
|
||||
NONCLIENTMETRICS NonClientMetrics;
|
||||
|
||||
/* WARNING: this test requires themes and dwm to be disabled */
|
||||
|
||||
SetCursorPos(0,0);
|
||||
|
||||
/* Retrieve th non client metrics */
|
||||
NonClientMetrics.cbSize = sizeof(NONCLIENTMETRICS);
|
||||
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0);
|
||||
FlushMessages();
|
||||
COMPARE_CACHE(empty_chain);
|
||||
|
||||
/* Set the non client metric without making any change */
|
||||
SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0);
|
||||
FlushMessages();
|
||||
COMPARE_CACHE(NcMetricsChange_chain);
|
||||
|
||||
/* Set the same metrics again with the SPIF_SENDCHANGE param */
|
||||
SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, SPIF_SENDCHANGE|SPIF_UPDATEINIFILE );
|
||||
FlushMessages();
|
||||
COMPARE_CACHE(NcMetricsChange1_chain);
|
||||
|
||||
/* Slightly change the caption height */
|
||||
NonClientMetrics.iCaptionHeight += 1;
|
||||
SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0);
|
||||
FlushMessages();
|
||||
COMPARE_CACHE(CaptionHeight_chain);
|
||||
|
||||
/* Restore the original caption height */
|
||||
NonClientMetrics.iCaptionHeight -= 1;
|
||||
SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &NonClientMetrics, 0);
|
||||
FlushMessages();
|
||||
|
|
Loading…
Reference in a new issue