Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to enable get "Delete" in the keyboa (Read 3112 times)
Joanna
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 15th, 2006
How to enable get "Delete" in the keyboa
Jun 23rd, 2006 at 6:03am
Print Post  


Hi,
Now, I have another problem: I use a flowchart in a childframe of a MDI program, and then the flowchart have no responce when click down the "Delete" key in the keyboard.

This problem have been referred in the Guide of Flowchart, but I still don't understand of that part.
???
So can you help me to solve this problem? Thank you very much!

The code I have done as follow:

m_FlowChart.put_KeyboardFlags(0, TRUE);        //fHandleDelInTranslAcc

void CGUIView::KeyDownFlowChart(long KeyCode, long Shift)
{
    MSG* pMsg;
    f(pMsg->lParam == VK_DELETE)
    {
       IOleInPlaceActiveObjectImpl<CFlowChart>::TranslateAccelerator(pMsg);
    }
   
}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to enable get "Delete" in the ke
Reply #1 - Jun 23rd, 2006 at 7:44am
Print Post  
Hi,

Set the fHandleKeyDownInTranslAcc flag to.

Stoyan
  
Back to top
 
IP Logged
 
Joanna
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 15th, 2006
Re: How to enable get "Delete" in the ke
Reply #2 - Jun 25th, 2006 at 11:27pm
Print Post  
Hi,

Now, I have set the flags as true as follow, but the "delete" key still doesn't work.

m_FlowChart.put_KeyboardFlags(2, TRUE);  //fHandleKeyDownInTranslAcc = 2
m_FlowChart.put_KeyboardFlags(0, TRUE);        //fHandleDelInTranslAcc = 0

In the FlowChart's Guide, it said as follow:
For such situations (when the control is placed inside a VB user control or in a VB MDI child window), FlowChartX allows processing the keyboard events in its implementation of the COM IOleInPlaceActiveObjectImpl::TranslateAccelerator() method. If you notice that the control does not process key presses as expected or does not fire the KeyDown event, consider enabling the following flags:
fHandleDelInTranslAcc
fHandleArrowsInTranslAcc
fHandleKeyDownInTranslAcc


But I have set these flags as true, it still dosen't work. Do I still do some other operation?

Thank you!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to enable get "Delete" in the ke
Reply #3 - Jun 26th, 2006 at 6:12am
Print Post  
Then it seems the WM_KEYDOWN message does not reach the flowchart at all, neither through the Windows message queue nor via IOleInPlaceActiveObject.

If you can detect that message yourself, you can pass it to the flowchart through IOleInPlaceActiveObject, or just call DeleteObject for the currently selected objects.

Stoyan
« Last Edit: Jun 26th, 2006 at 9:14am by Stoyo »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint