Home » U++ Library support » U++ Widgets - General questions or Mixed problems » GetType() ???
GetType() ??? [message #1945] |
Tue, 28 March 2006 16:04 |
jchaves13
Messages: 6 Registered: March 2006 Location: Brasil
|
Promising Member |
|
|
I want get type of Widget (EditField, EditDate, DocEdit...), but no found way to do.
|
|
|
|
|
Re: GetType() ??? [message #1949 is a reply to message #1947] |
Tue, 28 March 2006 17:44 |
jchaves13
Messages: 6 Registered: March 2006 Location: Brasil
|
Promising Member |
|
|
I have created a mechanism, with KeyHook(), that (like console apps) when the user hit <ENTER> key, the focus move to next ctrl, but in some ctrl (like DocEdit) I want ignore that action.
After post the question, I make some tests with HotKey() instead of KeyHook(), and get better results, for this case. But, I believe that is a good thinks know this.
Thanks, and sorry my bad english.
|
|
|
|
Re: GetType() ??? [message #1951 is a reply to message #1949] |
Tue, 28 March 2006 18:00 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
jchaves13 wrote on Tue, 28 March 2006 10:44 | I have created a mechanism, with KeyHook(), that (like console apps) when the user hit <ENTER> key, the focus move to next ctrl, but in some ctrl (like DocEdit) I want ignore that action.
After post the question, I make some tests with HotKey() instead of KeyHook(), and get better results, for this case. But, I believe that is a good thinks know this.
|
Well, for such case I would recommend to use dynamic_cast, like
Ctrl *q = ....
if(dynamic_cast<DocEdit *>(q)) {
// ... q is (or is derived from) DocEdit
}
Anyway, U++ keyboard routing is specifically designed in a way that should make similar tasks quite easy - that is perhaps why you have succeded with HotKey, that is the right way.
Mirek
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 28 04:32:19 CEST 2024
Total time taken to generate the page: 0.01966 seconds
|