본문 바로가기

개발/Client Side

(11)
윈도우 프로그래밍 디버깅 방법 outputdebugstring 으로 로그 기록 debug view 툴로 메시지 확인 가능
[MFC] 빈 폴더 삭제(delete empty folder) void CTestDlg::OnOK() { // TODO: Add extra validation here DelEmptyFolder("C:\\Documents and Settings\\이윤기\\바탕 화면\\수동\\drmone.war"); CDialog::OnOK(); } BOOL CTestDlg::DelEmptyFolder(CString strPath) { CFileFind finder; int nValidCnt = 0; BOOL bWorking = finder.FindFile(strPath + "\\*.*"); while (bWorking) { bWorking = finder.FindNextFile(); if(finder.IsDots()) continue; else if(finder.IsDirector..
[MFC] CFolderDialog 예제 TCHAR szDestPath[MAX_PATH]; LPCTSTR lpszTitle = _T( "Select the root folder for the browse dialog:" ); UINT uFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI; CFolderDialog dlgRoot(lpszTitle, szDestPath, this, uFlags ); if( dlgRoot.DoModal() == IDOK ) { lstrcpy(szDestPath, dlgRoot.GetFolderPath()); }
[MFC] 디렉토리 recursive 탐색 소스 코드 첫번째 예제 void __stdcall EnumDirectory(LPCTSTR lpPath) { if(lpPath == NULL) return ; TCHAR szPath[560] = {0, }; wsprintf(szPath, _T("%s"), lpPath); if(szPath[_tcslen(szPath) - 1] == '\\') szPath[_tcslen(szPath) - 1] = NULL; TCHAR szFindPath[560] = {0, }; wsprintf(szFindPath, _T("%s\\*.*"), szPath); WIN32_FIND_DATA wfd; ZeroMemory(&wfd, sizeof(WIN32_FIND_DATA)); TCHAR szFilePath[560] = {0, }; HANDLE..
VMWare에서 MacOS X 해상도 바꾸기 vmware tools가 설치되지 않으므로 다음의 방법으로 해상도를 바꾼다. /Library/Preferences/SystemConfiguration/com.apple.Boot.plist 이 파일을 찾아서 연 후 다음 항목을 추가한다. 해상도 값과 depth 값은 기호에 맞게 변경한다. Graphics Mode 1600x1200x32 * 이 파일을 편집할 때는 root 권한이 있어야 함.
VC6 -> VS 2005 변환 후 wchar_t 문제 VC6로 개발된 프로젝트를 VS 2005로 변환한 후 빌드하면 wchar_t 관련해서 변환할 수 없다는 오류가 쏟아지는 경우가 있다. 이유는 다음과 같다. VC6에서는 WCHAR 사용시 네이티브 타입이 unsigned short 타입인데 반해, VS 2005 이상에서는 WCHAR 사용시 네이티브 타입을 wchar_t로 사용한다고 한다. 결국 네이티브 타입이 서로 달라서 문제가 생기는 것이다. 이것을 해결하려면 프로젝트 속성을 변경하면 된다. 프로젝트 속성 화면으로 들어가서 [언어] -> wchar_t을 기본 제공 형식으로 처리 옵션을 "아니오"로 바꾸고 다시 빌드하면 된다. 이 옵션을 아니오로 바꾸면 VS2005에서도 WCHAR를 unsigned short 로 인식하게 되는 것이다. 그렇다면 리눅스에서는..
Visual Studio 2008에서 IA64(Itanium) 빌드하려면 To install IA64 platform-specific libraries, compilers, and tools, install the Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5, and ensure that IA64 Compilers and Libraries are selected on the Installation Options screen. 이렇게 써있어서 해봐도 Itanium 빌드 옵션이 나타나지 않음... 결국 professional 버전을 지우고 Team System 에디션을 설치했더니 Itanium 빌드 옵션이 보임!!
[아이폰 개발] 도움말 보기 option 키 누른 상태에서 도움말 보고자 하는 항목 더블클릭... 대략적인 설명과 샘플코드 등의 링크가 나옴