|
-
October 5th, 2010, 04:43 AM
#1
CTabCtrl Enumeration Problem
Hi All,
I am trying to Enumerate all the child and sub child windows of a CTabCtrl window which is in external window. (Not my application)
I can successfully enumerate all the childs of the CTabCtrl window but they dont come in the perfect order of the Tab Page (Tabpage index wise).
Suppose there are Five Tab pages in CTabCtrl say A, B, C, D and E.
For every tab page there are five Dialog controls (Having class "#32770")
In each dialog controls there are some controls like Textbox, dropdownlist and ListBox etc.
When i try to enumerate them, the order of the dialog control (inside each tabpage) changes in the EnumWindow procedure.
Some times A-B-C-D-E and some times D-E-A-B-C and so on.
One thing i have noticed is that as the focus of the Tabpage in CTabCtrl changes, the enum order also changes.
Now my problem is that i want child controls of specific Tabpage, which i am not able to achieve.
Following is the Tab Enumeration Code
Code:
HWND m_fDialogs[5];
int DlgCounter=0;
BOOL CALLBACK EnumAllDialogs(HWND hwndChild,LPARAM lp)
{
char szClassName[256];
GetClassName(hwndChild,szClassName,strlen(szClassName)-1);
CString strClassName = CString(szClassName);
if(strClassName=="#32770")
{
m_fDialogs[DlgCounter] = hwndChild;
DlgCounter++;
}
return TRUE;
}
Here the order of the handles in the array changes as the focus of the Tabpage changes. I need to have the controls from the dialogs of the Tabpage 0 and 3.
Thanx for any kind of help...
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
|