Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How can i handle keydown &keyup edit box Events?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can i handle keydown &keyup edit box Events?

 Post Reply Post Reply
Author
Message
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Topic: How can i handle keydown &keyup edit box Events?
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2008 at 12:36pm
Hi,
 
try this
 ON_NOTIFY(EN_CHANGE, ID_PARA_INDENT, OnIndentLeftSpin)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2008 at 1:59am

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.

 

 

 

 

 

Back to Top
vijaymahajan View Drop Down
Groupie
Groupie
Avatar

Joined: 16 June 2008
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote vijaymahajan Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2008 at 4:37am
Please answer this querry.Lot of my work is pending for this.
 
Thanks And Regards,
Vijay Mahajan,
Senior software developer,
pxlsoft Pvt Ltd,mumbai.
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.219 seconds.