- Timestamp:
- Jul 9, 2012, 12:21:42 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/StealFocusViaAttachInputThread/MainDialog.h
r72 r73 97 97 const DWORD nWindowThreadIdentifier = Window.GetWindowThreadID(); 98 98 const DWORD nThreadIdentifier = GetCurrentThreadId(); 99 if(!nWindowThreadIdentifier || nWindowThreadIdentifier == nThreadIdentifier) 100 { 101 if(nWindowThreadIdentifier) 102 AtlMessageBoxEx(m_hWnd, _T("The application is supposed to steal focus from another application, so have another application running in foreground to check the stealing out!"), IDS_WARNING, MB_ICONINFORMATION | MB_OK); 103 m_nActionCountdown = 7; 104 SetTimer(TIMER_ACTION, 7250); 105 return 0; 106 } 99 107 __E(AttachThreadInput(nThreadIdentifier, nWindowThreadIdentifier, TRUE)); 100 108 GetDlgItem(IDC_EDIT).SetFocus();
Note: See TracChangeset
for help on using the changeset viewer.