|
-
October 5th, 1999, 05:41 AM
#1
how to send keyboard inputs...
Hi,
when a propertysheet is active, I want to call another exe , by pressing function key F2. I called propertysheet using DoModal().
Advice please.
Rohini.
-
October 5th, 1999, 02:26 PM
#2
Re: how to send keyboard inputs...
1. Try to map wm_char message
afx_msg void OnChar( UINT nChar, UINT nRepCnt, UINT nFlags )
2. During its handling check for F2 .
3. If it is F2 then use -
int _execl( const char *cmdname, const char *arg0, ... const char *argn, NULL );
method to execute other process .
4. But u have to close ur property sheet during execl because model dialog box are working with user thread and have to finish the call .. Else create ur property sheet modeless.
-
October 6th, 1999, 01:51 AM
#3
Re: how to send keyboard inputs...
Hi,
You can also catch the key down message by overloading the virtual function
CWnd::PreTranslateMessage(MSG* pMsg);
in your class.
In that function , you can check for F2 key down
by using the following condition
if(pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_F2)
{
// call your external application
}
Anand
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|