Changeset 73


Ignore:
Timestamp:
Jul 9, 2012, 12:21:42 AM (9 years ago)
Author:
roman
Message:
 
Location:
trunk/Utilities/StealFocusViaAttachInputThread
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/StealFocusViaAttachInputThread/MainDialog.h

    r72 r73  
    9797                                        const DWORD nWindowThreadIdentifier = Window.GetWindowThreadID();
    9898                                        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                                        }
    99107                                        __E(AttachThreadInput(nThreadIdentifier, nWindowThreadIdentifier, TRUE));
    100108                                        GetDlgItem(IDC_EDIT).SetFocus();
  • trunk/Utilities/StealFocusViaAttachInputThread/StealFocusViaAttachInputThread_i.c

    r72 r73  
    77
    88 /* File created by MIDL compiler version 7.00.0555 */
    9 /* at Sun Jul 08 13:39:19 2012
     9/* at Mon Jul 09 10:20:32 2012
    1010 */
    1111/* Compiler settings for StealFocusViaAttachInputThread.idl:
  • trunk/Utilities/StealFocusViaAttachInputThread/StealFocusViaAttachInputThread_i.h

    r72 r73  
    55
    66 /* File created by MIDL compiler version 7.00.0555 */
    7 /* at Sun Jul 08 13:39:19 2012
     7/* at Mon Jul 09 10:20:32 2012
    88 */
    99/* Compiler settings for StealFocusViaAttachInputThread.idl:
Note: See TracChangeset for help on using the changeset viewer.