void InitTree(LPFOLDERDATA lpFolderData, LPFILTER_ITEM lpFilterList) { g_lpFolderData = lpFolderData; g_lpFilterList = lpFilterList; InitFolders(); /* this will subclass the treeview (where WM_DRAWITEM gets sent for the header control) */ g_lpTreeWndProc = (WNDPROC)(LONG)(int)GetWindowLong(GetTreeView(), GWL_WNDPROC); SetWindowLong(GetTreeView(), GWL_WNDPROC, (LONG)TreeWndProc); }
void CLeftView::OnInitialUpdate() { CTreeView::OnInitialUpdate(); // TODO: You may populate your TreeView with items by directly accessing // its tree control through a call to GetTreeCtrl(). // Æú´õ ³»¿ëÀ» ÃʱâÈ ½ÃŲ´Ù. CStringArray driveNames; // ÄÄÇ»ÅÍ¿¡ ÇöÀç ¼³Á¤µÇ¾îÁ® ÀÖ´Â ¸ðµç // µð½ºÅ© µå¶óÀ̺êÀÇ À̸§µéÀ» ¾ò¾î³»´Â »ç¿ëÀÚ Á¤ÀÇ ÇÔ¼ö GetDriveNames(&driveNames); // µð½ºÅ© µå¶óÀ̺êµéÀ» Æ®¸®ºä¿¡ ÃʱâÈ InitFolders(&driveNames); }
Preferences::Preferences(void) { LOGI("Initializing Preferences"); ScanPrefMaps(); // sanity-check the table memset(fValues, 0, sizeof(fValues)); SetPrefBool(kPrAddIncludeSubFolders, true); SetPrefBool(kPrAddStripFolderNames, false); SetPrefBool(kPrAddOverwriteExisting, false); SetPrefLong(kPrAddTypePreservation, 1); // kPreserveTypes SetPrefLong(kPrAddConvEOL, 1); // kConvEOLType InitFolders(); // set default add/extract folders; overriden by reg SetPrefLong(kPrExtractConvEOL, 0); // kConvEOLNone SetPrefBool(kPrExtractConvHighASCII, true); SetPrefBool(kPrExtractIncludeData, true); SetPrefBool(kPrExtractIncludeRsrc, false); SetPrefBool(kPrExtractIncludeDisk, true); SetPrefBool(kPrExtractEnableReformat, false); SetPrefBool(kPrExtractDiskTo2MG, false); SetPrefBool(kPrExtractAddTypePreservation, true); SetPrefBool(kPrExtractAddExtension, false); SetPrefBool(kPrExtractStripFolderNames, false); SetPrefBool(kPrExtractOverwriteExisting, false); // SetPrefBool(kPrViewIncludeDataForks, true); // SetPrefBool(kPrViewIncludeRsrcForks, false); // SetPrefBool(kPrViewIncludeDiskImages, false); // SetPrefBool(kPrViewIncludeComments, false); SetPrefBool(kPrConvFileEmptyFolders, true); // string kPrOpenArchiveFolder // string kPrAddFileFolder // string kPrExtractFileFolder SetPrefLong(kPrVolumeFilter, 0); //SetPrefBool(kPrVolumeReadOnly, true); SetPrefLong(kPrCassetteAlgorithm, 0); // string kPrOpenWAVFolder SetPrefBool(kPrMimicShrinkIt, false); SetPrefBool(kPrBadMacSHK, false); SetPrefBool(kPrReduceSHKErrorChecks, false); SetPrefBool(kPrCoerceDOSFilenames, false); SetPrefBool(kPrSpacesToUnder, false); SetPrefBool(kPrPasteJunkPaths, true); SetPrefBool(kPrBeepOnSuccess, true); SetPrefBool(kPrQueryImageFormat, false); SetPrefBool(kPrOpenVolumeRO, true); SetPrefBool(kPrOpenVolumePhys0, false); SetPrefBool(kPrProDOSAllowLower, false); SetPrefBool(kPrProDOSUseSparse, true); SetPrefLong(kPrCompressionType, DefaultCompressionType()); SetPrefLong(kPrMaxViewFileSize, 1024*1024); // 1MB SetPrefBool(kPrNoWrapText, false); SetPrefBool(kPrHighlightHexDump, false); SetPrefBool(kPrHighlightBASIC, false); SetPrefBool(kPrConvHiResBlackWhite, false); SetPrefLong(kPrConvDHRAlgorithm, 1); // latched SetPrefBool(kPrRelaxGfxTypeCheck, true); SetPrefBool(kPrDisasmOneByteBrkCop, false); SetPrefBool(kPrConvMouseTextToASCII, false); //SetPrefBool(kPrEOLConvRaw, true); SetPrefBool(kPrConvTextEOL_HA, true); SetPrefBool(kPrConvPascalText, true); SetPrefBool(kPrConvPascalCode, true); SetPrefBool(kPrConvCPMText, true); SetPrefBool(kPrConvApplesoft, true); SetPrefBool(kPrConvInteger, true); SetPrefBool(kPrConvBusiness, true); SetPrefBool(kPrConvGWP, true); SetPrefBool(kPrConvText8, true); SetPrefBool(kPrConvGutenberg, true); SetPrefBool(kPrConvAWP, true); SetPrefBool(kPrConvADB, true); SetPrefBool(kPrConvASP, true); SetPrefBool(kPrConvSCAssem, true); SetPrefBool(kPrConvDisasm, true); SetPrefBool(kPrConvHiRes, true); SetPrefBool(kPrConvDHR, true); SetPrefBool(kPrConvSHR, true); SetPrefBool(kPrConvPrintShop, true); SetPrefBool(kPrConvMacPaint, true); SetPrefBool(kPrConvProDOSFolder, true); SetPrefBool(kPrConvResources, true); InitTempPath(); // set default for kPrTempPath SetPrefString(kPrExtViewerExts, L"gif; jpg; jpeg"); SetPrefLong(kPrLastOpenFilterIndex, 0); SetPrefString(kPrViewTextTypeFace, L"Courier New"); SetPrefLong(kPrViewTextPointSize, 10); long width = 680 + /* exact width for 80-column text */ ::GetSystemMetrics(SM_CXVSCROLL); long height = 516; /* exact height for file viewer to show IIgs graphic */ if (GetSystemMetrics(SM_CXSCREEN) < width) width = GetSystemMetrics(SM_CXSCREEN); if (GetSystemMetrics(SM_CYSCREEN) < height) height = GetSystemMetrics(SM_CYSCREEN); // may overlap system bar //width = 640; height = 480; SetPrefLong(kPrFileViewerWidth, width); SetPrefLong(kPrFileViewerHeight, height); SetPrefLong(kPrDiskImageCreateFormat, -1); }