Print Page | Close Window

How can i handle keydown &keyup edit box Events?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11468
Printed Date: 01 March 2025 at 12:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How can i handle keydown &keyup edit box Events?
Posted By: vijaymahajan
Subject: How can i handle keydown &keyup edit box Events?
Date 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



Replies:
Posted By: Oleg
Date Posted: 17 July 2008 at 12:36pm
Hi,
 
try this
 ON_NOTIFY(EN_CHANGE, ID_PARA_INDENT, OnIndentLeftSpin)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: vijaymahajan
Date 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.

 

 

 

 

 



Posted By: vijaymahajan
Date 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.
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net