Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mainwin.cpp

    r30 r10  
    1818 ***/
    1919
    20 // ** CreateMainWindow **************************************************** /*FOLD00*/
     20// ** CreateMainWindow **************************************************** /*fold00*/
    2121
    2222HWND CreateMainWindow (VOID)
    2323{
    24 #ifdef _QUIET_
    25 //#if 1
    26     hwndFrame = WinLoadDlg (HWND_OBJECT, NULLHANDLE, NULL, GETMODULE,
    27                             ID_DLG_MAIN, NULL);
    28 #else
    2924    hwndFrame = WinLoadDlg (HWND_DESKTOP, NULLHANDLE, NULL, GETMODULE,
    3025                            ID_DLG_MAIN, NULL);
    31 #endif
    3226    OldFrameWP = WinSubclassWindow (hwndFrame, FrameProcedure);
    3327
     
    7670}
    7771
    78 // ** Drag **************************************************************** /*FOLD00*/
     72// ** Drag **************************************************************** /*fold00*/
    7973
    8074VOID Drag (HWND hwnd)
     
    116110}
    117111
    118 // ** FrameProcedure ****************************************************** /*FOLD00*/
     112// ** FrameProcedure ****************************************************** /*fold00*/
    119113
    120114MRESULT EXPENTRY FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
     
    279273            break;
    280274
    281         case WID_PB_SETCAPTURETYPE:
    282             //int capType;
    283 
    284             switch (pset->QuerySSWCaptureType ())
    285             {
    286             case CAP_WINDOWINT:
    287                 WinSendMsg (hwndFrame, WM_COMMAND,
    288                             MPFROM2SHORT (WID_PB_WINDOWINTERIOR,0), 0);
    289             case CAP_SCREENREGION:
    290                 WinSendMsg (hwndFrame, WM_COMMAND,
    291                             MPFROM2SHORT (WID_PB_SCREENREGION,0), 0);
    292             case CAP_WINDOW:
    293                 WinSendMsg (hwndFrame, WM_COMMAND,
    294                             MPFROM2SHORT (WID_PB_WINDOW,0), 0);
    295             default:
    296                WinSendMsg (hwndFrame, WM_COMMAND,
    297                             MPFROM2SHORT (WID_PB_SCREEN,0), 0);
    298             }
    299             break;
    300 
    301275        case WID_PB_SCREEN:
    302276            usCap = CAP_SCREEN;
    303 #ifdef _QUIET_
    304 //#if 1
    305             WinShowWindow (g_hwndSettingsDialog, FALSE);
    306             // WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); //Needs to go to the setting dialog
    307             // Replace current global with pset->GetSettingDialogHwnd () or such
    308             // Need for all 4 cases;
    309 #endif
    310277            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
    311278            break;
     
    313280        case WID_PB_SCREENREGION:
    314281            usCap = CAP_SCREENREGION;
    315 #ifdef _QUIET_
    316 //#if 1
    317             WinShowWindow (g_hwndSettingsDialog, FALSE);
    318 #endif
    319282            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
    320283            break;
     
    322285        case WID_PB_WINDOWINTERIOR:
    323286            usCap = CAP_WINDOWINT;
    324 #ifdef _QUIET_
    325 //#if 1
    326             WinShowWindow (g_hwndSettingsDialog, FALSE);
    327 #endif
    328287            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
    329288            break;
     
    331290        case WID_PB_WINDOW:
    332291            usCap = CAP_WINDOW;
    333 #ifdef _QUIET_
    334 //#if 1
    335             WinShowWindow (g_hwndSettingsDialog, FALSE);
    336 #endif
    337292            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
    338293            break;
     
    359314
    360315        usState = STATE_WAITFORHIDE;
    361 
    362         if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN) {
    363 #ifdef _QUIET_
    364             hwndParent = WinQueryFocus(HWND_DESKTOP);
    365 #else
    366             hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP );
    367 #endif
    368         }
    369 #ifndef _QUIET_
    370 //#if 0
    371316        if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW))
    372317            WinShowWindow (WinQueryWindow (hwnd, QW_PARENT), FALSE);
    373318        else
    374 #endif
    375319            WinSendMsg (hwnd, UM_WINDOWHIDDEN, 0,0);
    376320        return MRESULT (FALSE);
     
    402346            {
    403347                usState = STATE_WINDOWSELECTED;
    404                 int rc = saymsg2(1, hwnd,  "Capture", "Do you wish to continue?");
    405                
    406                 if (rc == 1)
    407                     WinPostMsg (hwnd, UM_WINDOWSELECTED,
    408                                 MPFROMHWND (HWND_DESKTOP),
    409                                 MPFROMHWND (HWND_DESKTOP));
    410                 if (rc == 2)
    411                     WinSendMsg (hwnd, UM_ABORT, 0,0);
    412                 if (rc == 3) {
    413                     pset->Dialog ();
    414                     WinPostMsg (hwnd, UM_WINDOWSELECTED,
    415                                 MPFROMHWND (HWND_DESKTOP),
    416                                 MPFROMHWND (HWND_DESKTOP));
    417                 }
     348                WinPostMsg (hwnd, UM_WINDOWSELECTED,
     349                            MPFROMHWND (HWND_DESKTOP),
     350                            MPFROMHWND (HWND_DESKTOP));
    418351            }
    419352            else
     
    484417                                                             FALSE));
    485418            hwndCap = HWND (mp1);
    486             if (usCap != CAP_SCREENREGION && usCap != CAP_SCREEN)
    487                 hwndParent = HWND (mp2);
     419            hwndParent = HWND (mp2);
    488420            if (pset->SerialCapture ())
    489421            {
     
    546478            // capture the window to a bitmap and save this
    547479            if (usCap == CAP_SCREENREGION)
    548                 hbm = CaptureWindow (hwndCap, hwndParent, &rcl, FALSE);
    549             else if (usCap == CAP_SCREEN)
    550                 hbm = CaptureWindow (hwndCap, hwndParent, NULL, FALSE);
     480                hbm = CaptureWindow (hwndCap, hwndParent, &rcl, TRUE);
    551481            else
    552482                hbm = CaptureWindow (hwndCap, hwndParent, NULL, TRUE);
     
    582512            WinSetCapture (HWND_DESKTOP, NULLHANDLE);
    583513
    584         pset->Load ();
    585 
    586514        WinSendMsg (hwndSnapshot, UM_STOPCAPTURE, 0,0);
    587515        WinStopTimer (hab, hwnd, ulTimer);
    588 #ifdef _QUIET_
    589 //#if 1
    590         // ? FIXME to give option to reshow window.
    591         if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW))
    592             WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0);
    593         else if (WinIsWindow ( hab, g_hwndSettingsDialog) &&
    594             ! WinIsWindowVisible (g_hwndSettingsDialog))
    595             WinShowWindow (g_hwndSettingsDialog, TRUE);
    596         pset->HideWindow (TRUE);
    597 #else
     516
    598517        // re-show the windows if they are hidden
    599518        // FIXME using global hwndFrame is pretty yukki
     
    602521        if (! WinIsWindowVisible (hwndSnapshot) && pset->SnapshotWindow ())
    603522            WinShowWindow (hwndSnapshot, TRUE);
    604 #endif
     523
    605524        WinEnableWindow (hwnd, TRUE);
    606525        WinSetActiveWindow (HWND_DESKTOP, hwnd);
Note: See TracChangeset for help on using the changeset viewer.