LRESULT CSetPgPaste::OnInitDialog(HWND hDlg, bool abInitial) { PasteLinesMode mode; mode = gpSet->AppStd.isPasteAllLines; checkRadioButton(hDlg, rPasteM1MultiLine, rPasteM1Nothing, (mode == plm_FirstLine) ? rPasteM1FirstLine : (mode == plm_SingleLine) ? rPasteM1SingleLine : (mode == plm_Nothing) ? rPasteM1Nothing : rPasteM1MultiLine); mode = gpSet->AppStd.isPasteFirstLine; checkRadioButton(hDlg, rPasteM2MultiLine, rPasteM2Nothing, (mode == plm_MultiLine) ? rPasteM2MultiLine : (mode == plm_FirstLine) ? rPasteM2FirstLine : (mode == plm_Nothing) ? rPasteM2Nothing : rPasteM2SingleLine); checkDlgButton(hDlg, cbClipConfirmEnter, gpSet->isPasteConfirmEnter); checkDlgButton(hDlg, cbClipConfirmLimit, (gpSet->nPasteConfirmLonger!=0)); SetDlgItemInt(hDlg, tClipConfirmLimit, gpSet->nPasteConfirmLonger, FALSE); return 0; }
LRESULT CSetPgUpdate::OnInitDialog(HWND hDlg, bool abInitial) { ConEmuUpdateSettings* p = &gpSet->UpdSet; SetDlgItemText(hDlg, tUpdateVerLocation, p->UpdateVerLocation()); checkDlgButton(hDlg, cbUpdateCheckOnStartup, p->isUpdateCheckOnStartup); checkDlgButton(hDlg, cbUpdateCheckHourly, p->isUpdateCheckHourly); checkDlgButton(hDlg, cbUpdateConfirmDownload, !p->isUpdateConfirmDownload); checkRadioButton(hDlg, rbUpdateStableOnly, rbUpdateLatestAvailable, (p->isUpdateUseBuilds==1) ? rbUpdateStableOnly : (p->isUpdateUseBuilds==3) ? rbUpdatePreview : rbUpdateLatestAvailable); checkDlgButton(hDlg, cbUpdateInetTool, p->isUpdateInetTool); SetDlgItemText(hDlg, tUpdateInetTool, p->GetUpdateInetToolCmd()); checkDlgButton(hDlg, cbUpdateUseProxy, p->isUpdateUseProxy); SetDlgItemText(hDlg, tUpdateProxy, p->szUpdateProxy); SetDlgItemText(hDlg, tUpdateProxyUser, p->szUpdateProxyUser); SetDlgItemText(hDlg, tUpdateProxyPassword, p->szUpdateProxyPassword); OnButtonClicked(hDlg, NULL, cbUpdateInetTool); // Enable/Disable command field, button '...' and ‘Proxy’ fields int nPackage = p->UpdateDownloadSetup(); // 1-exe, 2-7zip checkRadioButton(hDlg, rbUpdateUseExe, rbUpdateUseArc, (nPackage==1) ? rbUpdateUseExe : rbUpdateUseArc); wchar_t szCPU[4] = L""; SetDlgItemText(hDlg, tUpdateExeCmdLine, p->UpdateExeCmdLine(szCPU)); SetDlgItemText(hDlg, tUpdateArcCmdLine, p->UpdateArcCmdLine()); SetDlgItemText(hDlg, tUpdatePostUpdateCmd, p->szUpdatePostUpdateCmd); enableDlgItem(hDlg, (nPackage==1) ? tUpdateArcCmdLine : tUpdateExeCmdLine, FALSE); // Show used or preferred installer bitness CEStr szFormat, szTitle; INT_PTR iLen; if ((iLen = GetString(hDlg, rbUpdateUseExe, &szFormat.ms_Val)) > 0) { if (wcsstr(szFormat.ms_Val, L"%s") != NULL) { wchar_t* psz = szTitle.GetBuffer(iLen+4); if (psz) { _wsprintf(psz, SKIPLEN(iLen+4) szFormat.ms_Val, (nPackage == 1) ? szCPU : WIN3264TEST(L"x86",L"x64")); SetDlgItemText(hDlg, rbUpdateUseExe, szTitle); } } } checkDlgButton(hDlg, cbUpdateLeavePackages, p->isUpdateLeavePackages); SetDlgItemText(hDlg, tUpdateDownloadPath, p->szUpdateDownloadPath); return 0; }
void CSetPgApps::OnAppSelectionChanged() { const AppSettings* pApp = NULL; //while ((pApp = gpSet->GetAppSettings(nApp)) && pApp->AppNames) int iCur = (int)SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_GETCURSEL, 0,0); if (iCur >= 0) pApp = gpSet->GetAppSettings(iCur); if (pApp && pApp->AppNames) { if (!mb_SkipEditSet) { MSetter lockEditChange(&mb_SkipEditChange); SetDlgItemText(mh_Dlg, tAppDistinctName, pApp->AppNames); } DoFillControls(pApp); } else { SetDlgItemText(mh_Dlg, tAppDistinctName, L""); checkRadioButton(mh_Dlg, rbAppDistinctElevatedOn, rbAppDistinctElevatedIgnore, rbAppDistinctElevatedIgnore); } DoEnableControls(0); }
LRESULT CSetPgTaskbar::OnInitDialog(HWND hDlg, bool abInitial) { checkDlgButton(hDlg, cbMinToTray, gpSet->mb_MinToTray); EnableWindow(GetDlgItem(hDlg, cbMinToTray), !gpConEmu->ForceMinimizeToTray); checkDlgButton(hDlg, cbAlwaysShowTrayIcon, gpSet->isAlwaysShowTrayIcon()); Settings::TabsOnTaskbar tabsOnTaskbar = gpSet->GetRawTabsOnTaskBar(); checkRadioButton(hDlg, rbTaskbarBtnActive, rbTaskbarBtnHidden, (tabsOnTaskbar == Settings::tot_DontShow) ? rbTaskbarBtnHidden : (tabsOnTaskbar == Settings::tot_AllTabsWin7) ? rbTaskbarBtnWin7 : (tabsOnTaskbar == Settings::tot_AllTabsAllOS) ? rbTaskbarBtnAll : rbTaskbarBtnActive); checkDlgButton(hDlg, cbTaskbarOverlay, gpSet->isTaskbarOverlay); checkDlgButton(hDlg, cbTaskbarProgress, gpSet->isTaskbarProgress); // checkDlgButton(hDlg, cbCloseConEmuWithLastTab, gpSet->isCloseOnLastTabClose() ? BST_CHECKED : BST_UNCHECKED); checkDlgButton(hDlg, cbCloseConEmuOnCrossClicking, gpSet->isCloseOnCrossClick() ? BST_CHECKED : BST_UNCHECKED); checkDlgButton(hDlg, cbMinimizeOnLastTabClose, gpSet->isMinOnLastTabClose() ? BST_CHECKED : BST_UNCHECKED); checkDlgButton(hDlg, cbHideOnLastTabClose, gpSet->isHideOnLastTabClose() ? BST_CHECKED : BST_UNCHECKED); // enableDlgItem(hDlg, cbCloseConEmuOnCrossClicking, !gpSet->isCloseOnLastTabClose()); enableDlgItem(hDlg, cbMinimizeOnLastTabClose, !gpSet->isCloseOnLastTabClose()); enableDlgItem(hDlg, cbHideOnLastTabClose, !gpSet->isCloseOnLastTabClose() && gpSet->isMinOnLastTabClose()); checkDlgButton(hDlg, cbMinimizeOnLoseFocus, gpSet->mb_MinimizeOnLoseFocus); EnableWindow(GetDlgItem(hDlg, cbMinimizeOnLoseFocus), (gpSet->isQuakeStyle == 0)); checkRadioButton(hDlg, rbMinByEscAlways, rbMinByEscNever, (gpSet->isMultiMinByEsc == Settings::mbe_NoConsoles) ? rbMinByEscEmpty : gpSet->isMultiMinByEsc ? rbMinByEscAlways : rbMinByEscNever); checkDlgButton(hDlg, cbMapShiftEscToEsc, gpSet->isMapShiftEscToEsc); EnableWindow(GetDlgItem(hDlg, cbMapShiftEscToEsc), (gpSet->isMultiMinByEsc == Settings::mbe_Always)); checkDlgButton(hDlg, cbCmdTaskbarTasks, gpSet->isStoreTaskbarkTasks); checkDlgButton(hDlg, cbCmdTaskbarCommands, gpSet->isStoreTaskbarCommands); EnableWindow(GetDlgItem(hDlg, cbCmdTaskbarUpdate), (gnOsVer >= 0x601)); return 0; }
LRESULT CSetPgComspec::OnInitDialog(HWND hDlg, bool abInitial) { _ASSERTE((rbComspecAuto+cst_Explicit)==rbComspecExplicit && (rbComspecAuto+cst_Cmd)==rbComspecCmd && (rbComspecAuto+cst_EnvVar)==rbComspecEnvVar); checkRadioButton(hDlg, rbComspecAuto, rbComspecExplicit, rbComspecAuto+gpSet->ComSpec.csType); SetDlgItemText(hDlg, tComspecExplicit, gpSet->ComSpec.ComspecExplicit); SendDlgItemMessage(hDlg, tComspecExplicit, EM_SETLIMITTEXT, countof(gpSet->ComSpec.ComspecExplicit)-1, 0); _ASSERTE((rbComspec_OSbit+csb_SameApp)==rbComspec_AppBit && (rbComspec_OSbit+csb_x32)==rbComspec_x32); checkRadioButton(hDlg, rbComspec_OSbit, rbComspec_x32, rbComspec_OSbit+gpSet->ComSpec.csBits); checkDlgButton(hDlg, cbComspecUpdateEnv, gpSet->ComSpec.isUpdateEnv ? BST_CHECKED : BST_UNCHECKED); enableDlgItem(hDlg, cbComspecUpdateEnv, (gpSet->ComSpec.csType!=cst_EnvVar)); checkDlgButton(hDlg, cbComspecUncPaths, gpSet->ComSpec.isAllowUncPaths ? BST_CHECKED : BST_UNCHECKED); // Autorun (autoattach) with "cmd.exe" or "tcc.exe" ReloadAutorun(); return 0; }
LRESULT CSetPgAppear::OnInitDialog(HWND hDlg, bool abInitial) { checkDlgButton(hDlg, cbHideCaption, gpSet->isHideCaption); checkDlgButton(hDlg, cbHideCaptionAlways, gpSet->isHideCaptionAlways()); EnableWindow(GetDlgItem(hDlg, cbHideCaptionAlways), !gpSet->isForcedHideCaptionAlways()); // Скрытие рамки SetDlgItemInt(hDlg, tHideCaptionAlwaysFrame, gpSet->HideCaptionAlwaysFrame(), TRUE); SetDlgItemInt(hDlg, tHideCaptionAlwaysDelay, gpSet->nHideCaptionAlwaysDelay, FALSE); SetDlgItemInt(hDlg, tHideCaptionAlwaysDissapear, gpSet->nHideCaptionAlwaysDisappear, FALSE); checkDlgButton(hDlg, cbEnhanceGraphics, gpSet->isEnhanceGraphics); //checkDlgButton(hDlg, cbEnhanceButtons, gpSet->isEnhanceButtons); //checkDlgButton(hDlg, cbAlwaysShowScrollbar, gpSet->isAlwaysShowScrollbar); checkRadioButton(hDlg, rbScrollbarHide, rbScrollbarAuto, (gpSet->isAlwaysShowScrollbar==0) ? rbScrollbarHide : (gpSet->isAlwaysShowScrollbar==1) ? rbScrollbarShow : rbScrollbarAuto); SetDlgItemInt(hDlg, tScrollAppearDelay, gpSet->nScrollBarAppearDelay, FALSE); SetDlgItemInt(hDlg, tScrollDisappearDelay, gpSet->nScrollBarDisappearDelay, FALSE); checkDlgButton(hDlg, cbAlwaysOnTop, gpSet->isAlwaysOnTop); #ifdef _DEBUG checkDlgButton(hDlg, cbTabsInCaption, gpSet->isTabsInCaption); #else ShowWindow(GetDlgItem(hDlg, cbTabsInCaption), SW_HIDE); #endif checkDlgButton(hDlg, cbNumberInCaption, gpSet->isNumberInCaption); checkDlgButton(hDlg, cbMultiCon, gpSet->mb_isMulti); checkDlgButton(hDlg, cbMultiShowButtons, gpSet->isMultiShowButtons); checkDlgButton(hDlg, cbMultiShowSearch, gpSet->isMultiShowSearch); checkDlgButton(hDlg, cbSingleInstance, gpSetCls->IsSingleInstanceArg()); enableDlgItem(hDlg, cbSingleInstance, (gpSet->isQuakeStyle == 0)); checkDlgButton(hDlg, cbShowHelpTooltips, gpSet->isShowHelpTooltips); return 0; }
void CSetPgApps::DoFillControls(const AppSettings* pApp) { if (!pApp) { _ASSERTE(pApp); return; } checkRadioButton(mh_Dlg, rbAppDistinctElevatedOn, rbAppDistinctElevatedIgnore, (pApp->Elevated == 1) ? rbAppDistinctElevatedOn : (pApp->Elevated == 2) ? rbAppDistinctElevatedOff : rbAppDistinctElevatedIgnore); BYTE b; checkDlgButton(mh_Child, cbExtendFontsOverride, pApp->OverrideExtendFonts); checkDlgButton(mh_Child, cbExtendFonts, pApp->isExtendFonts); b = pApp->nFontBoldColor; CSetDlgLists::FillListBoxItems(GetDlgItem(mh_Child, lbExtendFontBoldIdx), CSetDlgLists::eColorIdx, b, false); b = pApp->nFontItalicColor; CSetDlgLists::FillListBoxItems(GetDlgItem(mh_Child, lbExtendFontItalicIdx), CSetDlgLists::eColorIdx, b, false); b = pApp->nFontNormalColor; CSetDlgLists::FillListBoxItems(GetDlgItem(mh_Child, lbExtendFontNormalIdx), CSetDlgLists::eColorIdx, b, false); checkDlgButton(mh_Child, cbCursorOverride, pApp->OverrideCursor); CSetPgCursor::InitCursorCtrls(mh_Child, pApp); checkDlgButton(mh_Child, cbColorsOverride, pApp->OverridePalette); // Don't add unknown palettes in the list! int nIdx = SendDlgItemMessage(mh_Child, lbColorsOverride, CB_FINDSTRINGEXACT, -1, (LPARAM)pApp->szPaletteName); SendDlgItemMessage(mh_Child, lbColorsOverride, CB_SETCURSEL, klMax(nIdx, 0), 0); checkDlgButton(mh_Child, cbClipboardOverride, pApp->OverrideClipboard); // checkDlgButton(mh_Child, cbCTSDetectLineEnd, pApp->isCTSDetectLineEnd); checkDlgButton(mh_Child, cbCTSBashMargin, pApp->isCTSBashMargin); checkDlgButton(mh_Child, cbCTSTrimTrailing, pApp->isCTSTrimTrailing); b = pApp->isCTSEOL; CSetDlgLists::FillListBoxItems(GetDlgItem(mh_Child, lbCTSEOL), CSetDlgLists::eCRLF, b, false); // PasteLinesMode mode; mode = pApp->isPasteAllLines; checkRadioButton(mh_Child, rPasteM1MultiLine, rPasteM1Nothing, (mode == plm_FirstLine) ? rPasteM1FirstLine : (mode == plm_SingleLine) ? rPasteM1SingleLine : (mode == plm_Nothing) ? rPasteM1Nothing : rPasteM1MultiLine); checkDlgButton(mh_Child, cbPasteM1Posix, (pApp->isPosixAllLines != pxm_Intact) ? BST_CHECKED : BST_UNCHECKED); mode = pApp->isPasteFirstLine; checkRadioButton(mh_Child, rPasteM2MultiLine, rPasteM2Nothing, (mode == plm_MultiLine) ? rPasteM2MultiLine : (mode == plm_FirstLine) ? rPasteM2FirstLine : (mode == plm_Nothing) ? rPasteM2Nothing : rPasteM2SingleLine); checkDlgButton(mh_Child, cbPasteM2Posix, (pApp->isPosixFirstLine != pxm_Intact) ? BST_CHECKED : BST_UNCHECKED); // checkDlgButton(mh_Child, cbCTSClickPromptPosition, pApp->isCTSClickPromptPosition); // checkDlgButton(mh_Child, cbCTSDeleteLeftWord, pApp->isCTSDeleteLeftWord); }
LRESULT CSetPgFonts::OnInitDialog(HWND hDlg, bool abInitial) { SetDlgItemText(hDlg, tFontFace, gpFontMgr->FontFaceName()); SetDlgItemText(hDlg, tFontFace2, gpFontMgr->BorderFontFaceName()); if (abInitial) { // Добавить шрифты рисованные ConEmu for (INT_PTR j = 0; j < gpFontMgr->m_RegFonts.size(); ++j) { const RegFont* iter = &(gpFontMgr->m_RegFonts[j]); if (iter->pCustom) { BOOL bMono = iter->pCustom->GetFont(0,0,0,0)->IsMonospace(); int nIdx = SendDlgItemMessage(hDlg, tFontFace, CB_ADDSTRING, 0, (LPARAM)iter->szFontName); SendDlgItemMessage(hDlg, tFontFace, CB_SETITEMDATA, nIdx, bMono ? 1 : 0); nIdx = SendDlgItemMessage(hDlg, tFontFace2, CB_ADDSTRING, 0, (LPARAM)iter->szFontName); SendDlgItemMessage(hDlg, tFontFace2, CB_SETITEMDATA, nIdx, bMono ? 1 : 0); } } CSetDlgFonts::StartEnumFontsThread(); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, tFontSizeY), CSetDlgLists::eFSizesY, gpSet->FontSizeY, true); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, tFontSizeX), CSetDlgLists::eFSizesX, gpSet->FontSizeX, true); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, tFontSizeX2), CSetDlgLists::eFSizesX, gpSet->FontSizeX2, true); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, tFontSizeX3), CSetDlgLists::eFSizesX, gpSet->FontSizeX3, true); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, lbExtendFontBoldIdx), CSetDlgLists::eColorIdx, gpSet->AppStd.nFontBoldColor, false); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, lbExtendFontItalicIdx), CSetDlgLists::eColorIdx, gpSet->AppStd.nFontItalicColor, false); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, lbExtendFontNormalIdx), CSetDlgLists::eColorIdx, gpSet->AppStd.nFontNormalColor, false); CSetDlgLists::FillListBoxItems(GetDlgItem(hDlg, tFontCharset), CSetDlgLists::eCharSets, gpFontMgr->LogFont.lfCharSet, false); } else { //TODO: Обновить значения в списках? } checkDlgButton(hDlg, cbExtendFonts, gpSet->AppStd.isExtendFonts); CSetDlgLists::EnableDlgItems(hDlg, CSetDlgLists::eExtendFonts, gpSet->AppStd.isExtendFonts); checkDlgButton(hDlg, cbFontAuto, gpSet->isFontAutoSize); MCHKHEAP checkRadioButton(hDlg, rNoneAA, rCTAA, (gpFontMgr->LogFont.lfQuality == CLEARTYPE_NATURAL_QUALITY) ? rCTAA : (gpFontMgr->LogFont.lfQuality == ANTIALIASED_QUALITY) ? rStandardAA : rNoneAA); // 3d state - force center symbols in cells checkDlgButton(hDlg, cbMonospace, BST(gpSet->isMonospace)); checkDlgButton(hDlg, cbBold, (gpFontMgr->LogFont.lfWeight == FW_BOLD) ? BST_CHECKED : BST_UNCHECKED); checkDlgButton(hDlg, cbItalic, gpFontMgr->LogFont.lfItalic ? BST_CHECKED : BST_UNCHECKED); /* Alternative font, initially created for prettifying Far Manager borders */ { checkDlgButton(hDlg, cbFixFarBorders, BST(gpSet->isFixFarBorders)); checkDlgButton(hDlg, cbFont2AA, gpSet->isAntiAlias2 ? BST_CHECKED : BST_UNCHECKED); LPCWSTR cszFontRanges[] = { L"Far Manager borders: 2500-25C4;", L"Dashes and Borders: 2013-2015;2500-25C4;", L"Pseudographics: 2013-25C4;", L"CJK: 2E80-9FC3;AC00-D7A3;F900-FAFF;FE30-FE4F;FF01-FF60;FFE0-FFE6;", NULL }; CEStr szCharRanges(gpSet->CreateCharRanges(gpSet->mpc_CharAltFontRanges)); LPCWSTR pszCurrentRange = szCharRanges.ms_Val; bool bExist = false; HWND hCombo = GetDlgItem(hDlg, tUnicodeRanges); SendDlgItemMessage(hDlg, tUnicodeRanges, CB_RESETCONTENT, 0,0); // Fill our drop down with font ranges for (INT_PTR i = 0; cszFontRanges[i]; i++) { LPCWSTR pszRange = wcsstr(cszFontRanges[i], L": "); if (!pszRange) { _ASSERTE(pszRange); continue; } SendMessageW(hCombo, CB_ADDSTRING, 0, (LPARAM)cszFontRanges[i]); if (!bExist && (lstrcmpi(pszRange+2, pszCurrentRange) == 0)) { pszCurrentRange = cszFontRanges[i]; bExist = true; } } if (pszCurrentRange && *pszCurrentRange && !bExist) SendMessageW(hCombo, CB_ADDSTRING, 0, (LPARAM)pszCurrentRange); // And show current value SetWindowText(hCombo, pszCurrentRange ? pszCurrentRange : L""); } /* Alternative font ends */ checkDlgButton(hDlg, cbFontMonitorDpi, gpSet->FontUseDpi ? BST_CHECKED : BST_UNCHECKED); checkDlgButton(hDlg, cbFontAsDeviceUnits, gpSet->FontUseUnits ? BST_CHECKED : BST_UNCHECKED); gpSetCls->mn_LastChangingFontCtrlId = 0; return 0; }
// IDD_SPG_SIZEPOS / thi_SizePos LRESULT CSetPgSizePos::OnInitDialog(HWND hDlg, bool abInitial) { _ASSERTE(gpSetCls->GetPage(thi_SizePos) == hDlg); checkDlgButton(hDlg, cbAutoSaveSizePos, gpSet->isAutoSaveSizePos); checkDlgButton(hDlg, cbUseCurrentSizePos, gpSet->isUseCurrentSizePos); ConEmuWindowMode wMode; if (gpSet->isQuakeStyle || !gpSet->isUseCurrentSizePos) wMode = (ConEmuWindowMode)gpSet->_WindowMode; else if (gpConEmu->isFullScreen()) wMode = wmFullScreen; else if (gpConEmu->isZoomed()) wMode = wmMaximized; else wMode = wmNormal; checkRadioButton(hDlg, rNormal, rFullScreen, (wMode == wmFullScreen) ? rFullScreen : (wMode == wmMaximized) ? rMaximized : rNormal); SendDlgItemMessage(hDlg, tWndWidth, EM_SETLIMITTEXT, 6, 0); SendDlgItemMessage(hDlg, tWndHeight, EM_SETLIMITTEXT, 6, 0); gpSetCls->UpdateSize(gpConEmu->WndWidth, gpConEmu->WndHeight); EnableWindow(GetDlgItem(hDlg, cbApplyPos), FALSE); SendDlgItemMessage(hDlg, tWndX, EM_SETLIMITTEXT, 6, 0); SendDlgItemMessage(hDlg, tWndY, EM_SETLIMITTEXT, 6, 0); EnablePosSizeControls(hDlg); MCHKHEAP gpSetCls->UpdatePos(gpConEmu->wndX, gpConEmu->wndY, true); checkRadioButton(hDlg, rCascade, rFixed, gpSet->wndCascade ? rCascade : rFixed); if (!abInitial) OnPostLocalize(hDlg); checkDlgButton(hDlg, cbLongOutput, gpSet->AutoBufferHeight); TODO("Надо бы увеличить, но нужно сервер допиливать"); SendDlgItemMessage(hDlg, tLongOutputHeight, EM_SETLIMITTEXT, 5, 0); SetDlgItemInt(hDlg, tLongOutputHeight, gpSet->DefaultBufferHeight, FALSE); //EnableWindow(GetDlgItem(hDlg, tLongOutputHeight), gpSet->AutoBufferHeight); // 16bit Height if (abInitial) { SendDlgItemMessage(hDlg, lbNtvdmHeight, CB_ADDSTRING, 0, (LPARAM) L"Auto"); SendDlgItemMessage(hDlg, lbNtvdmHeight, CB_ADDSTRING, 0, (LPARAM) L"25 lines"); SendDlgItemMessage(hDlg, lbNtvdmHeight, CB_ADDSTRING, 0, (LPARAM) L"28 lines"); SendDlgItemMessage(hDlg, lbNtvdmHeight, CB_ADDSTRING, 0, (LPARAM) L"43 lines"); SendDlgItemMessage(hDlg, lbNtvdmHeight, CB_ADDSTRING, 0, (LPARAM) L"50 lines"); } SendDlgItemMessage(hDlg, lbNtvdmHeight, CB_SETCURSEL, !gpSet->ntvdmHeight ? 0 : ((gpSet->ntvdmHeight == 25) ? 1 : ((gpSet->ntvdmHeight == 28) ? 2 : ((gpSet->ntvdmHeight == 43) ? 3 : 4))), 0); //-V112 checkDlgButton(hDlg, cbTryToCenter, gpSet->isTryToCenter); SetDlgItemInt(hDlg, tPadSize, gpSet->nCenterConsolePad, FALSE); checkDlgButton(hDlg, cbIntegralSize, !gpSet->mb_IntegralSize); checkDlgButton(hDlg, cbRestore2ActiveMonitor, gpSet->isRestore2ActiveMon); checkDlgButton(hDlg, cbSnapToDesktopEdges, gpSet->isSnapToDesktopEdges); return 0; }