nanogui: Create buttons in microwin


Previous by date: 9 Aug 2006 04:31:07 +0100 Re: how to access frame buffer, Greg Haerr
Next by date: 9 Aug 2006 04:31:07 +0100 Re: segmentation fault while running applications on imx21 lite kit CSB535FS, Greg Haerr
Previous in thread: 9 Aug 2006 04:31:07 +0100 Create buttons in microwin, tan yongzai
Next in thread:

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


Previous by date: 9 Aug 2006 04:31:07 +0100 Re: how to access frame buffer, Greg Haerr
Next by date: 9 Aug 2006 04:31:07 +0100 Re: segmentation fault while running applications on imx21 lite kit CSB535FS, Greg Haerr
Previous in thread: 9 Aug 2006 04:31:07 +0100 Create buttons in microwin, tan yongzai
Next in thread:


Powered by ezmlm-browse 0.20.