LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {
HDC hdc{};
PAINTSTRUCT ps{};
int i{};
int* ptr = NULL;
TCHAR str[128]{};
switch (iMessage) {
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
ptr = (int*)VirtualAlloc(NULL, sizeof(int) * 10, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
if (ptr != NULL) {
for (i = 0; i < 10; i++) {
wsprintfW(str, TEXT("%d"), ptr[i] = i * 2);
TextOut(hdc, 10, i * 20, str, lstrlenW(str));
}
VirtualFree(ptr, _msize(ptr), MEM_DECOMMIT); // C6250°æ°í Ç¥½Ã
VirtualFree(ptr, 0, MEM_RELEASE);
}
EndPaint(hWnd, &ps);
return(0);
case WM_DESTROY:
PostQuitMessage(0);
return(0);
}
DefWindowProcW(hWnd, iMessage, wParam, lParam);
}
¹ØÁÙ±×Àº ºÎºÐ¿¡¼ ÀÚ²Ù¸¸ C6250 ¸Þ¸ð¸® ´©¼ö °æ°í°¡ ¶ß´Âµ¥ ÇØ°á¹æ¹ýÀ» ¾Ë°í½Í½À´Ï´Ù. ºÐ¸í Ã¥¿¡´Â È®Á¤µÈ ¸Þ¸ð¸®¸¦ ÇØÁ¦ÇÏ·Á¸é È®Á¤ ÇØÁ¦ ÈÄ ¿¹¾àÇØÁ¦¶ó°í ½á Àִµ¥ ¿Ö ¸Þ¸ð¸® ´©¼ö °æ°í°¡ ¶ß´ÂÁö ¾Ë°í½ÍÀ¸¸ç, ÇØ°á¹æ¹ýÀ» ¹«¾ùÀÎÁö ¾Ë°í½Í½À´Ï´Ù.
´äº¯ºÎʵ右´Ï´Ù.

±è¹Î¼ö
403 Forbidden403 Forbidden |
|