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.
Printable View
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.
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.
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