Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Is it possible to get Ctrl name during runtime (or similar)?
Is it possible to get Ctrl name during runtime (or similar)? [message #13103] |
Tue, 11 December 2007 10:45 |
alex100
Messages: 118 Registered: November 2007
|
Experienced Member |
|
|
Env: winxp, u++ 2007.1
Hi,
Suppose the following:
I have a modal dialog with 2 EditStrings (with names edField1 and edField2) and one EditInt (with name edField3) and I want to do different things if the focus is on EditStrings or in the EditInt.
I can diferentiate the EditInt from EditString with the following code:
EditInt *pEditInt=NULL;
EditString *pEditStr=NULL;
pEditStr=dynamic_cast<EditString *>(GetFocusCtrl());
if(pEditStr) //It is one of the edit strings
{
...
}
pEditInt=dynamic_cast<EditInt*>(GetFocusCtrl());
if(pEditInt) //It is the EditInt
{
...
}
How can I know if the focus is in the edField1 or in edField2?
Many thanks
Alex
|
|
|
|
|
Goto Forum:
Current Time: Tue May 21 17:13:48 CEST 2024
Total time taken to generate the page: 0.01797 seconds
|