Re: Controls Text Strings
What about cycling through the child windows using GetWindow, and doing GetWindowText on them?
Dave
Re: Controls Text Strings
My problem is that I want this to be a generic procedure to work with ANY dialog, so I dont have a way of getting a list of the child windows - ie I don't know their resource symbols!!!
Re: Controls Text Strings
Hi.
Fisrt, try to check the control situation on Dialog by SPY++.
So, you notice something like this.
Only static text control and button have Window caption. The
other control window caption is always "".
So, after you get CWnd of any dialog by FindWidnow, you can get
all CWnd of child control by GetTopWindow and GetWindow inside
loop. You need CWnd array.
And you get Window caption by GetWidnowText. Only static and button control have Window caption.After this, you can get string length
by some CString function.(I forget)
Hope for help.
-Masaaki Onishi-
Re: Controls Text Strings
You don't need their resource symbols if you use CWnd::GetWindow. GW_CHILD gives you the first child, GW_HWNDFIRST gives you the first sibling, GW_HWNDNEXT gives you the next.
Dave