It seems this->ShowWindow(SW_HIDE) doesnot work for C++ program when it is put under OnInitDialog.
Here is the way to do it.
Step 1: define a message and function at header file:
#define MY_MESSAGE WM_USER+123
void FuncHideWindow();
Step 2: Add message to message loop
ON_MESSAGE(MY_MESSAGE, FuncHideWindow)
and delcare function:
void CKeyBoardHookTestDlg::FuncHideWindow()
{
this->ShowWindow(SW_HIDE);
}
Step 3: post message at OnInitDialog immediately after CDialog::OnInitDialog();
::PostMessage(this->m_hWnd,MY_MESSAGE,0,0);
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2008
(38)
-
▼
March
(12)
- Sample Software Testing Standards and Procedures
- How to get scan code and virtual code of hardkey?
- Virtual-Key Codes for Windows CE 5.0
- How to hide application at startup? VC++
- How to minimize application as system tray icon?
- How to make a cellphone like keybaord?
- SetTimer() inside a thread - use SetTimer API meth...
- Keybd_event in Compact Framework
- Virtual Key Codes
- Keyboard Events Simulation using keybd_event() fun...
- Windows CE Keyboard Hook (Error 31)
- Windows CE Keyboard Hook
-
▼
March
(12)
No comments:
Post a Comment