How to get all controls of current dialog?
-
There is a dialog and it has more than one controls.I want to get all these controls to set or change some their properties at runtime. To do this , i use that code.
CWnd* pChildWnd = wnd->GetWindow(GW_CHILD); while ( pChildWnd ) { // other code here pChildWnd = pChildWnd->GetWindow(GW_HWNDNEXT); }
But i can't get controls and this while loop enters infinite loop. Please help me to get all controls. Thanks. -
There is a dialog and it has more than one controls.I want to get all these controls to set or change some their properties at runtime. To do this , i use that code.
CWnd* pChildWnd = wnd->GetWindow(GW_CHILD); while ( pChildWnd ) { // other code here pChildWnd = pChildWnd->GetWindow(GW_HWNDNEXT); }
But i can't get controls and this while loop enters infinite loop. Please help me to get all controls. Thanks.mehmetned wrote:
There is a dialog and it has more than one controls.I want to get all these controls...
Can't you use
EnumChildWindows()
?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
There is a dialog and it has more than one controls.I want to get all these controls to set or change some their properties at runtime. To do this , i use that code.
CWnd* pChildWnd = wnd->GetWindow(GW_CHILD); while ( pChildWnd ) { // other code here pChildWnd = pChildWnd->GetWindow(GW_HWNDNEXT); }
But i can't get controls and this while loop enters infinite loop. Please help me to get all controls. Thanks.See How to set a font for all child windows[^] of course its for change font but it is helpful for you.
-
See How to set a font for all child windows[^] of course its for change font but it is helpful for you.
-
Its good news for me it was helpful for you. ;)
-
Its good news for me it was helpful for you. ;)
Hamid. wrote:
Its good news for me it was helpful for you.
Hows life going dude... evrything ok at your END
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You