![]() |
How can i handle keydown &keyup edit box Events? |
Post Reply ![]() |
Author | |
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() Posted: 17 July 2008 at 1:45am |
Hello,
I want to handle Edit Box's event.I tried with mfc event handler ON_ENCHANGE(),But it didnt worked.
Also i tried with ON_XTP_EXECUTE(),that too is not working.
I want to handle the keydown and keyup events of edit box.
For that,we had our own class,which was derived from CWnd when we were not using toolkit. That class was handling the keydown and keyup events for edit box.
now i want to derive one class representing the edit box,that class will handle the keydown and keyup events. If i derive my class from CXTPControl,will it be possible? Because i saw one function there Onhookkeydown(),But couldnt got the idea to use it for both events.Also i didnt got any event for your edit box.
Please guide me accordingly.
Thanks And Regards,
Vijay
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
try this
ON_NOTIFY(EN_CHANGE, ID_PARA_INDENT, OnIndentLeftSpin)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
Hello, With this,i will get the Event handler for that Edit box. But How can i get the OnKeyDown and OnKeyUp events of Edit box. If i derive one class from CXTPControlEdit or CXTPControl,i couldnt define the OnKeyDown and OnKeyUp windows messages in it,as it is not derived from CWnd.
And as my edit boxes are on ribbon bar,other edit box classes also not working. What can be a possible solution for this?
The solution you have given is giving me only the event of edit box.
But still many limitations are there on handling the edit box,because it is not treated as a window while putting on ribbon.
i didnt tried but with the event handler you given above,i think the OnKeyDown() message can be traced through the NMHDR structures code variable. if it works,well and good.But still one problem remains,how can we trace OnKeyUp() event?
Please guide me accordingly.
Thanks And Regards,
Vijay.
|
|
![]() |
|
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
Please answer this querry.Lot of my work is pending for this.
Thanks And Regards,
Vijay Mahajan,
Senior software developer,
pxlsoft Pvt Ltd,mumbai.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |