std::string to std::wstring 한글 std::string to std::wstring 헤더 파일 // Util.h #pragma once #include namespace Util { #ifdef _UNICODE std::wstring to_wstring(const std::string& str); std::string to_string(const std::wstring& str); #endif } 소스 파일 // Util.cpp #include "Util.h" #ifdef _UNICODE std::wstring Util::to_wstring(const std::string& str) { std::wstring buf; const int strLength = MultiByteToWideChar(CP_ACP, NULL, str.c_st.. MFC Dialog 로드 이벤트 OnPaint 함수를 다이얼로그가 로드되었을때 메시지 처리하기 위해 C#의 Window Loaded 같은 이벤트 처리가 필요, Dialog 로드시 이벤트 처리를 진행. 아래 url을 참고 stackoverflow.com/questions/269462/mfc-execute-code-right-after-dialog-is-shown-net-equivalent-of-form-shown MFC - execute code right after dialog is shown (.NET equivalent of Form.Shown) I'm doing some small changes to C++ MFC project. I'm .NET developer so Windows programming is new to me. .. CImage로 이미지 로드하는 다양한 방법 MFC register image to mfc forms when buttons clicked. 1. CImage.Draw() void CEx1ImageDlg::OnBnClickedBtnImage() { CRect rect; m_staticPCImage.GetClientRect(&rect); CImage image; LPCTSTR filename = _T("res\\image\\test.jpg"); HRESULT hResult = image.Load(filename); if (FAILED(hResult)) { AfxMessageBox(_T("ERROR: Failed to load")); return; } HDC hdc = ::GetDC(m_staticPCImage.m_hWnd); image.Draw(hd.. 이전 1 다음