nanogui: Create buttons in microwin
Subject:
Re: [nanogui] Create buttons in microwin
From:
"Greg Haerr" ####@####.####
Date:
9 Aug 2006 04:31:07 +0100
Message-Id: <04d301c6bb64$2ce6ba40$6401a8c0@winXP>
: static HWND hOk;
: TCHAR* item = TEXT("BUTTON");
: TCHAR* label = TEXT("OK");
:
: hOk = CreateWindow(item, label, WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE, 0,
GetSystemMetrics(SM_CYSCREEN)-26, 120, 26, hWnd, (HMENU)IDOK, 0, 0L);
: ShowWindow(hOk, SW_SHOWNORMAL);
The code looks fine, I can only think perhaps the GetSystemMetrics
isn't returning a valid value for the y coordinate, perhaps change
x,y to hard values. Of course, hWnd needs to be valid.
There's no need for the ShowWindow, since you already
list WS_VISIBLE in the flags.
Regards,
Greg