Changeset 57 for trunk/dll


Ignore:
Timestamp:
Nov 4, 2018, 10:38:51 PM (7 years ago)
Author:
Gregg Young
Message:

Add a -p command line switch to allow use of the default PM Print screen behavior (capture to printer)

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/gotchdll.c

    r50 r57  
    3232HWND    hwndFrame;
    3333HMODULE hMod;
     34BOOL    usePMps;
    3435
    35 void EXPENTRY InitDLL (HAB hab, HWND hwnd)
     36void EXPENTRY InitDLL (HAB hab, HWND hwnd, BOOL g_usePMps)
    3637{
    3738    habDLL = hab;
    3839    hwndFrame = hwnd;
     40    usePMps = g_usePMps;
    3941    DosLoadModule (NULL, 0, "GOTCHDLL", &hMod);
    4042}
     
    7577
    7678    }
    77     else if ((usScan == VK_PRINTSCRN || CHAR4FROMMP(pqmsg->mp1) == 93 )) {
     79    else if ((usScan == VK_PRINTSCRN || CHAR4FROMMP(pqmsg->mp1) == 93 ) &&
     80            (usFlags & KC_SHIFT)) {
    7881        if (usFlags & KC_KEYUP) {
    7982            WinPostMsg (hwndFrame, WM_COMMAND,
     
    8184            return TRUE;
    8285        }
    83 
     86    }
     87    else if (!usePMps && (usScan == VK_PRINTSCRN ||
     88                          CHAR4FROMMP(pqmsg->mp1) == 93 )) {
     89        if (usFlags & KC_KEYUP) {
     90            WinPostMsg (hwndFrame, WM_COMMAND,
     91                        MPFROM2SHORT (WID_PB_SETCAPTURETYPE,0), 0);
     92            return TRUE;
     93        }
    8494    }
    8595    return FALSE;
  • trunk/dll/gotchdll.h

    r10 r57  
    66#endif
    77
    8 extern void EXPENTRY InitDLL (HAB hab, HWND hwnd);
     8extern void EXPENTRY InitDLL (HAB hab, HWND hwnd, BOOL g_usePMps);
    99extern void EXPENTRY StartInputHook (void);
    1010extern void EXPENTRY StopInputHook (void);
Note: See TracChangeset for help on using the changeset viewer.