Changeset 170 for trunk/mainwin.cpp


Ignore:
Timestamp:
Sep 22, 2025, 10:04:44 PM (3 weeks ago)
Author:
Gregg Young
Message:

Rework Gotcha's dialogs to work better with the new font sizing in WPS. Replace some global variables with more C++ alternatives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mainwin.cpp

    r122 r170  
    171171                             SWP_SHOW | SWP_MOVE | SWP_SIZE | SWP_ZORDER);
    172172#endif
    173             HMQ hmq;
    174             BOOL bUniCodeFont = FALSE;
    175             CHAR ucFont[FACESIZE];
     173            HMQ hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
    176174   
    177175            if (pset->GetLangID() == RU) {
    178                 hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
    179176                WinSetCp(hmq, 866);
    180                 bUniCodeFont = TRUE;
    181177            }
    182178            else if (pset->GetLangID() == CZ || pset->GetLangID() == PL) {
    183                 hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
    184179                WinSetCp(hmq, 852);
    185                 bUniCodeFont = TRUE;
    186180            }
    187181            else {
    188                 hmq = WinQueryWindowULong( hwnd, QWL_HMQ);
    189182                WinSetCp(hmq, 850);
    190183            }
    191    
     184#if 0
    192185            if (pset->GetLangID() == RU || pset->GetLangID() == CZ || pset->GetLangID() == PL) {
    193186                strcpy(ucFont, "9.Times New Roman MT 30");
     
    198191                WinSetPresParam(hwnd, PP_FONTNAMESIZE, strlen(ucFont) + 1, ucFont);
    199192            }
     193#endif
    200194        }
    201195#ifdef _QUIET_
     
    205199                           MPFROMLONG (pset->DelayedCapture ()),
    206200                           MPFROMLONG (0));
    207         WinSetFocus( WinWindowFromID (g_hwndPage0, WID_RB_FILE), FALSE );
     201        WinSetFocus( WinWindowFromID (pset->GethwndPage0(), WID_RB_FILE), FALSE );
    208202        return MRESULT (FALSE);
    209203#else
     
    346340            usCap = CAP_SCREEN;
    347341#ifdef _QUIET_
    348             WinShowWindow (g_hwndSettingsDialog, FALSE);
     342            WinShowWindow (pset->GethwndSettingsDialog(), FALSE);
    349343#endif
    350344            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
     
    354348            usCap = CAP_SCREENREGION;
    355349#ifdef _QUIET_
    356             WinShowWindow (g_hwndSettingsDialog, FALSE);
     350            WinShowWindow (pset->GethwndSettingsDialog(), FALSE);
    357351#endif
    358352            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
     
    362356            usCap = CAP_WINDOWINT;
    363357#ifdef _QUIET_
    364             WinShowWindow (g_hwndSettingsDialog, FALSE);
     358            WinShowWindow (pset->GethwndSettingsDialog(), FALSE);
    365359#endif
    366360            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
     
    370364            usCap = CAP_WINDOW;
    371365#ifdef _QUIET_
    372             WinShowWindow (g_hwndSettingsDialog, FALSE);
     366            WinShowWindow (pset->GethwndSettingsDialog(), FALSE);
    373367#endif
    374368            WinSendMsg (hwnd, UM_PREPARECAPTURE, 0,0);
     
    540534    case WM_TIMER:
    541535        ulCountdown --;
    542        
     536#ifndef _QUIET_
    543537        if( ulCountdown % 20 == 0 )
    544538            WinSendMsg (hwndSnapshot, UM_COUNTDOWN,
    545539                        MPFROMLONG (ulCountdown), 0);
     540#endif
    546541        if (pset->DelayCountdown () && !pset->SerialCapture ())
    547542            DoCountdown (ulCountdown);
     
    626621        // ? FIXME to give option to reshow window.
    627622        if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW))
    628             WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0);
    629         else if (WinIsWindow ( hab, g_hwndSettingsDialog) &&
    630             ! WinIsWindowVisible (g_hwndSettingsDialog))
    631             WinShowWindow (g_hwndSettingsDialog, TRUE);
     623            WinSendMsg (pset->GethwndSettingsDialog(), WM_CLOSE, 0,0);
     624        else if (WinIsWindow ( hab, pset->GethwndSettingsDialog()) &&
     625            ! WinIsWindowVisible (pset->GethwndSettingsDialog()))
     626            WinShowWindow (pset->GethwndSettingsDialog(), TRUE);
    632627        pset->HideWindow (TRUE);
    633628#else
     
    649644    LogDebug( "MainWin:WindowProcedure:WinDefWindowProc->0x%04x", msg );
    650645#endif
    651     if (hwnd ==  g_hwndPage0)
     646    if (hwnd == pset->GethwndPage0())
    652647        return WinDefDlgProc (hwnd, msg, mp1, mp2);
    653648    else
Note: See TracChangeset for help on using the changeset viewer.