Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CommandBarKeyDown Event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CommandBarKeyDown Event

 Post Reply Post Reply
Author
Message
Guy1 View Drop Down
Newbie
Newbie


Joined: 04 May 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guy1 Quote  Post ReplyReply Direct Link To This Post Topic: CommandBarKeyDown Event
    Posted: 22 June 2006 at 2:04pm
I am trying to use the new event (10.2 2006 Q2 release) on the command bar called 'CommandBarKeyDown'.  It fires on the keydown event as expected.
 
I want to trap each keystroke in a commandBarEdit object within a command bar and extract the text property.  The problem I am having is that the commandBar.selectedControl.Text property of the edit object does not get updated until after the keydown event completes.
 
I see the typed character on the window but the text property does not contain the character, until after the event finishes.
 
Was that the intent, and if so, can anyone suggest a solution?
 
Thanks.
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: 22 June 2006 at 5:38pm

Hi,

As workaround use Edit.EditHandle property + api  GetWindowText.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Guy1 View Drop Down
Newbie
Newbie


Joined: 04 May 2006
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guy1 Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2006 at 5:08pm
Thanks for the reply.
 
The approach I have taken is to set a logical variable in the KeyDOwn event that is picked up by the update event.  By the time the update event fires the command bar editor text attribute has been updated with the users last keystroke.
 
This seems to work for me.
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.188 seconds.