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.. SetDeviceGammaRamp is not working GDI(Graphics Device Interface)를 이용해 디스플레이의 밝기값을 조절하는 작업을 gdi32.dll의 SetDeviceGammaRamp 함수를 사용하였지만 단일 모니터에서는 동작하지만 다중 모니터에서는 동작하지않는 문제가 발생. Window Update 1903 버전부터 해당 동작이 원할하지않다라는 추측을 하게되었고 해당 issues가 최근 제기되는 것을 확인하였다. 아래는 제기된 해당 이슈들. - hub.displaycal.net/forums/topic/windows-10-1903-please-read/ - github.com/Tyrrrz/LightBulb/issues/100 - zandronum.com/tracker/print_bug_page.php?bug_id=3770 사용했던 .. 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. .. [C++] 갈무리 모드(Capture mode) Effective Modern C++를 읽다 챕터 31. "기본 갈무리 모드를 피하라"는 내용을 보게되었다. 갈무리 모드(캡쳐 모드)는 람다식에서 쓰이는 아래와 같은 형태에서 [=] (int x) { return x; } [=] 와 같은 변수를 넘겨주는 형식을 의미한다. 여기서 = 는 this 포인터를 넘겨주는 것을 의미하며 아래 MSDN에서 자세한 사항을 확인할 수 있다. docs.microsoft.com/ko-kr/cpp/cpp/lambda-expressions-in-cpp?view=msvc-160 Effective Modern C++의 챕터 31에서 설명하는 기본 갈무리 모드는 아래와 같은 형태로 람다식을 사용하는 것을 피하라는 의미를 전한다. [&] // 참조(by_reference) [&] //.. 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.. OLE DB 그리고 ODBC OLEDB와 ODBC와 관련된 공부를 진행하면서 두 개의 차이가 궁금해졌고 관련 정보를 찾아 정리. 참고: 1. Comparing OLE DB and ODBC 2. OLEDB vs ODBC 3. What is the difference between OLE DB and ODBC data sources 4. ADO: ActiveX Data Objects, a book by Jason T. Roff, published by O'Reilly Media in 2001 OLEDB(Object Linking and Embedding, Database)와 ODBC(Open Database Connectivity)는 둘다 데이터베이스에 접근할 수 있는 API를 제공한다. ODBC는 Database와 Applicatio.. 이전 1 다음