EVC tips

zhaozj2021-02-16  82

/ / -------------------------------------------------------------------------------------------- --------------------------- // Shield CE system desktop, each form is called // enabledesktop (false) during initialization; // Only one main form is recovered when exiting the mask enabledesktop (TRUE); // Note: Other auxiliary forms cannot recover shields! ! Only once restored main form void EnableDesktop (BOOL bEnable) {HWND hTaskBarWnd = NULL, hMenuBarWnd = NULL, hSipBtnWnd = NULL; hTaskBarWnd = :: FindWindow (_T ( "HHTaskBar"), NULL); hMenuBarWnd = :: FindWindow ( _T ("Menu_Worker"), NULL); hsipbtnwnd = :: FindWindow (_T ("ms_sipbutton"), null); if (null == hmenubarwnd || null == hmenubarwnd) Return;

if (TRUE == bEnable) {:: EnableWindow (hTaskBarWnd, TRUE); :: ShowWindow (hTaskBarWnd, SW_SHOW); :: EnableWindow (hMenuBarWnd, TRUE); :: ShowWindow (hMenuBarWnd, SW_SHOW); :: EnableWindow (hSipBtnWnd, TRUE); :: ShowWindow (hSipBtnWnd, SW_SHOW);} else {:: EnableWindow (hTaskBarWnd, FALSE); :: ShowWindow (hTaskBarWnd, SW_HIDE); :: EnableWindow (hMenuBarWnd, FALSE); :: ShowWindow (hMenuBarWnd, SW_HIDE) ;: EnableWindow (hsipbtnwnd, false) ;: ShowWindow (hsipbtnwnd, sw_hide);}} // --------------------------- ------------------------------------ // Settings System Keyboard Capslock Press and Recovery // BState = True: Analog Press (uppercase) // bstate = false: Simulation Recovery (Captap) Void SetCapslock (BOOL BSTATE) {EnableDesktop (false);

Short b; b = getKeyState;

/ * If (true == bstate && (loword (b) == 1)) || (false == bstate && (== 0))) {* / // afxMessageBox (Text ("Down ")); Keybd_event (vk_capital, 0x45, keyeventf_extendedKey | 0, 0);

KeyBD_Event (vk_capital, 0x45, keyeventf_extendedKey | Keyeventf_Keyup, 0);

转载请注明原文地址:https://www.9cbs.com/read-13900.html

New Post(0)