본문 바로가기

programing150

IOCP를 쓰는데 완료 쪽으로 안넘어 올 경우 확인 해 볼것 - Overlapped 구조체 변수중 핸들이 NULL 인지 - Read나 Write함수의 파일 핸들이 유효한지 (파일이 안열렸다거나 도중에 파일이 닫혔다거나) 2017. 6. 22.
[Gdi plus] 이미지 띄우기 #include #include #pragma comment(lib,"gdiplus.lib") using namespace Gdiplus; ULONG_PTR m_pGdiPlus; // 초기화 GdiplusStartupInput gdiplusStartupInput; GdiplusStartup(&m_pGdiPlus, &gdiplusStartupInput, NULL); // 마무리 GdiplusShutdown(m_pGdiPlus); // 이미지 띄우기 Image cLoadingImage(L"Image.jpg"); if (cLoadingImage.GetLastStatus() == Ok) { HDC hdc = ::GetDC(NULL); // hWnd : 해당 윈도우, NULL : 전체 화면 Graphics gra.. 2017. 5. 25.
쉼표 연산자 - , 연산자는 양쪽에 있는 식을 왼쪽에서 오른쪽 순서로 실행하고 오른쪽에 있는 식의 값을 가진다. - , 연산자의 가장 일반적인 사용 예는 for 루프의 증분 식이다. 쉼표는 함수 인수 목록과 같은 일부 컨텍스트에서 구분 기호로 사용될 수 있다. 쉼표를 구분 기호로 사용하는 경우와 연산자로 사용하는 경우는 완전히 다르기 때문에 둘을 혼동하지 않도록 주의해야 한다. - , 연산자의 우선 순위는 가장 마지막이다. // cpp_comma_operator.cpp #include int main () { int i = 10, b = 20, c= 30; i = b, c; printf("%i\n", i); // 20 출력 i = (b, c); printf("%i\n", i); // 30 출력 } https://ms.. 2017. 5. 24.
항상 위에 (TopMost) ::SetWindowPos(this->m_hWnd, HWND_TOPMOST, nX, nY, nWidth, nHeight, NULL); 함수를 사용하면된다 풀려면 ::SetWindowPos(this->m_hWnd, HWND_NOTOPMOST, nX, nY, nWidth, nHeight, NULL); 2017. 5. 23.