// DnMakeFullPatch.cpp : ÀÀ¿ë ÇÁ·Î±×·¥¿¡ ´ëÇÑ Å¬·¡½º µ¿ÀÛÀ» Á¤ÀÇÇÕ´Ï´Ù. // #include "stdafx.h" #include "DnMakeFullPatch.h" #include "DnMakeFullPatchDlg.h" #include "LogWnd.h" #include "BugReporter.h" #pragma comment( lib, "dbghelp.lib" ) #ifdef _DEBUG #define new DEBUG_NEW #endif // CDnMakeFullPatchApp BEGIN_MESSAGE_MAP(CDnMakeFullPatchApp, CWinApp) ON_COMMAND(ID_HELP, &CWinApp::OnHelp) END_MESSAGE_MAP() // CDnMakeFullPatchApp »ý¼º CDnMakeFullPatchApp::CDnMakeFullPatchApp() { // TODO: ¿©±â¿¡ »ý¼º Äڵ带 Ãß°¡ÇÕ´Ï´Ù. // InitInstance¿¡ ¸ðµç Áß¿äÇÑ ÃʱâÈ­ ÀÛ¾÷À» ¹èÄ¡ÇÕ´Ï´Ù. } // À¯ÀÏÇÑ CDnMakeFullPatchApp °³Ã¼ÀÔ´Ï´Ù. CDnMakeFullPatchApp theApp; void TokenizeA( const std::string& str, std::vector& tokens, const std::string& delimiters /* = " " */ ) { // ¸Ç ù ±ÛÀÚ°¡ ±¸ºÐÀÚÀÎ °æ¿ì ¹«½Ã std::string::size_type lastPos = str.find_first_not_of( delimiters, 0 ); // ±¸ºÐÀÚ°¡ ¾Æ´Ñ ù ±ÛÀÚ¸¦ ã´Â´Ù std::string::size_type pos = str.find_first_of( delimiters, lastPos ); while( std::string::npos != pos || std::string::npos != lastPos ) { // tokenÀ» ã¾ÒÀ¸´Ï vector¿¡ Ãß°¡ÇÑ´Ù tokens.push_back( str.substr( lastPos, pos - lastPos ) ); // ±¸ºÐÀÚ¸¦ ¶Ù¾î³Ñ´Â´Ù. "not_of"¿¡ ÁÖÀÇÇ϶ó lastPos = str.find_first_not_of( delimiters, pos ); // ´ÙÀ½ ±¸ºÐÀÚ°¡ ¾Æ´Ñ ±ÛÀÚ¸¦ ã´Â´Ù pos = str.find_first_of( delimiters, lastPos ); } } // CDnMakeFullPatchApp ÃʱâÈ­ BOOL CDnMakeFullPatchApp::InitInstance() { BugReporter::ReportingServerInfo info; info.szServerURL = "http://192.168.0.20/bugreport/bugprocess.aspx"; gs_BugReporter.SetReportingServerInfo(info); gs_BugReporter.Enable(); LogWnd::CreateLog(); CString szCmdLine; szCmdLine = m_lpCmdLine; if ( szCmdLine.IsEmpty() == FALSE ) { CDnMakeFullPatchDlg dlg; std::vector tokens; TokenizeA( std::string(szCmdLine.GetBuffer()), tokens, std::string(" ") ); if ( tokens.size() != 2 ) return FALSE; dlg.m_szEditPath = tokens[0].c_str(); dlg.m_szEditOutFolder = tokens[1].c_str(); dlg.DropFolder(tokens[0].c_str()); dlg.Build(); return TRUE; } // ÀÀ¿ë ÇÁ·Î±×·¥ ¸Å´ÏÆä½ºÆ®°¡ ComCtl32.dll ¹öÀü 6 ÀÌ»óÀ» »ç¿ëÇÏ¿© ºñÁÖ¾ó ½ºÅ¸ÀÏÀ» // »ç¿ëÇϵµ·Ï ÁöÁ¤ÇÏ´Â °æ¿ì, Windows XP »ó¿¡¼­ ¹Ýµå½Ã InitCommonControlsEx()°¡ ÇÊ¿äÇÕ´Ï´Ù. // InitCommonControlsEx()¸¦ »ç¿ëÇÏÁö ¾ÊÀ¸¸é âÀ» ¸¸µé ¼ö ¾ø½À´Ï´Ù. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // ÀÀ¿ë ÇÁ·Î±×·¥¿¡¼­ »ç¿ëÇÒ ¸ðµç °ø¿ë ÄÁÆ®·Ñ Ŭ·¡½º¸¦ Æ÷ÇÔÇϵµ·Ï // ÀÌ Ç׸ñÀ» ¼³Á¤ÇϽʽÿÀ. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinApp::InitInstance(); AfxEnableControlContainer(); // Ç¥ÁØ ÃʱâÈ­ // ÀÌµé ±â´ÉÀ» »ç¿ëÇÏÁö ¾Ê°í ÃÖÁ¾ ½ÇÇà ÆÄÀÏÀÇ Å©±â¸¦ ÁÙÀÌ·Á¸é // ¾Æ·¡¿¡¼­ ÇÊ¿ä ¾ø´Â ƯÁ¤ ÃʱâÈ­ // ·çƾÀ» Á¦°ÅÇØ¾ß ÇÕ´Ï´Ù. // ÇØ´ç ¼³Á¤ÀÌ ÀúÀåµÈ ·¹Áö½ºÆ®¸® ۸¦ º¯°æÇϽʽÿÀ. // TODO: ÀÌ ¹®ÀÚ¿­À» ȸ»ç ¶Ç´Â Á¶Á÷ÀÇ À̸§°ú °°Àº // ÀûÀýÇÑ ³»¿ëÀ¸·Î ¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù. SetRegistryKey(_T("·ÎÄà ÀÀ¿ë ÇÁ·Î±×·¥ ¸¶¹ý»ç¿¡¼­ »ý¼ºµÈ ÀÀ¿ë ÇÁ·Î±×·¥")); CDnMakeFullPatchDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: ¿©±â¿¡ [È®ÀÎ]À» Ŭ¸¯ÇÏ¿© ´ëÈ­ »óÀÚ°¡ ¾ø¾îÁú ¶§ ó¸®ÇÒ // Äڵ带 ¹èÄ¡ÇÕ´Ï´Ù. } else if (nResponse == IDCANCEL) { // TODO: ¿©±â¿¡ [Ãë¼Ò]¸¦ Ŭ¸¯ÇÏ¿© ´ëÈ­ »óÀÚ°¡ ¾ø¾îÁú ¶§ ó¸®ÇÒ // Äڵ带 ¹èÄ¡ÇÕ´Ï´Ù. } // ´ëÈ­ »óÀÚ°¡ ´ÝÇûÀ¸¹Ç·Î ÀÀ¿ë ÇÁ·Î±×·¥ÀÇ ¸Þ½ÃÁö ÆßÇÁ¸¦ ½ÃÀÛÇÏÁö ¾Ê°í ÀÀ¿ë ÇÁ·Î±×·¥À» ³¡³¾ ¼ö ÀÖµµ·Ï FALSE¸¦ // ¹ÝȯÇÕ´Ï´Ù. return FALSE; }