buttin VC++
-
Hi all I have a modeless dialogbox which is created in a SDI applic on which i have few ownerdraw buttons on one button i have written F4 and my requirement is when ever i click alt key on the keyboard along woth F4 button on the dialog About dialog box of EditView should open , what all messages do i need to send to my application to gennerate this event, i am making use of pretranslate message to check if the alt key is pressed on the key board void MyDialog::OnButtonF4() { CTrailView *pView = (CTrailView *)((CMainFrame*)GetParent())->GetActiveView(); if(0x8000 ==(0x8000 & GetKeyState(18))) { pView->SendMessage(WM_SYSKEYDOWN, 18, 1); pView->SendMessage(WM_SYSKEYDOWN, 115, 1); pView->SendMessage(WM_SYSKEYUP, 115, 1); pView->SendMessage(WM_KEYUP, 18, 1); } } BOOL MyDialog::PreTranslateMessage(MSG* pMsg) { if( pMsg->message == WM_SYSKEYDOWN && pMsg->wParam == 18) { CTrailView *pView = (CTrailView *)((CMainFrame*)GetParent())->GetActiveView(); pView->SendMessage(WM_SYSKEYDOWN,18,0); } if( pMsg->message == WM_SYSKEYUP && pMsg->wParam == 18) { CTrailView *pView = (CTrailView *)((CMainFrame*)GetParent())->GetActiveView(); pView->SendMessage(WM_KEYUP,18,0); } return CDialog::PreTranslateMessage(pMsg); } can any one help me what to write in Alt key fuction or F4 func or in PreTranslte message Request to all to continue this