|
-
October 25th, 1999, 01:35 PM
#1
runtime creation -- help
How do I create a static control at runtime using
createwindow() without giving all hardcoded coordinates?
For instance a string is loaded from the resource file using loadstring(), and I'd like to create a static control with the string as the label but using the actual width and height of the label as the width and height in createwindow()..
LoadString(resource, STR,
achStatic,sizeof(achStatic));
hwndCtl = CreateWindow("static", achStatic,
WS_CHILD | WS_VISIBLE | WS_GROUP,
18, 13, width, height hwnd, (HMENU)-1, null, NULL);
SendMessage(hwndCtl, WM_SETFONT, (WPARAM) lpFolderData->hFont, MAKELPARAM(TRUE, 0));
how do I calculate the width and height of achStatic? Obviously, this has to do with I18N of my program.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|