|
-
September 23rd, 1999, 07:51 AM
#1
Weird question??
Hi there.
mybe its a dumb question
but iv been wondering about it for a while.
i try to build some activeX control.
so far its working fine.
but my question is (not about activeX YET..)
when i edit my dialog boxes in the dialog editor (Vc6)
i can put all kind of controls (not activeX controls)
lets say that i put 5 radios 5 check boxes and 5 edit boxes.
how can i enum (or something like that) the control get its HWND or CWnd* and then SORT them by type.
i need to create dynamic list for each control
is it possible to do so?
thanks
kishk91
[email protected]
http://www.path.co.il
ICQ: 13610258
-
September 23rd, 1999, 09:54 AM
#2
Re: Weird question??
Hi,
Maybe this code might help.
in the OnInitDialog
::EnumChildWindows(this->m_hWnd, EnumChildProc, 0);
and for the callback function
BOOL CALLBACK EnumChildProc(HWND hWnd, LPARAM lParam)
{
char szClassName[64];
::GetClassName(hWnd, szClassName, sizeof(szClassName));
if (!(lstrcmpi("button", szClassName)))
{
lStyle = GetWindowLong(hWnd, GWL_STYLE);
if ( ((lStyle & BS_AUTORADIOBUTTON) == BS_AUTORADIOBUTTON) ||
((lStyle & BS_RADIOBUTTON) == BS_RADIOBUTTON) )
{
...
}
else
{
...
}
}
// "edit"
}
Good Luck
Paul
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
|