Fixed a few details.

This commit is contained in:
luigi__ 2009-04-09 17:59:42 +00:00
parent eedca01baa
commit 6feb15dd11
1 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,7 @@ BOOL GInfo_Init()
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hIcon = 0; wc.hIcon = 0;
wc.lpszMenuName = 0; wc.lpszMenuName = 0;
wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_BTNFACE); wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
wc.style = 0; wc.style = 0;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
@ -307,8 +307,9 @@ LRESULT GInfo_IconBoxPaint(HWND hCtl, WPARAM wParam, LPARAM lParam)
} }
else else
{ {
GetTextExtentPoint32(mem_hdc, "No icon", strlen("No icon"), &fontsize); char *noicon = "No icon";
TextOut(mem_hdc, ((w/2) - (fontsize.cx/2)), ((h/2) - (fontsize.cy/2)), "No icon", strlen("No icon")); GetTextExtentPoint32(mem_hdc, noicon, strlen(noicon), &fontsize);
TextOut(mem_hdc, ((w/2) - (fontsize.cx/2)), ((h/2) - (fontsize.cy/2)), noicon, strlen(noicon));
} }
BitBlt(hdc, 0, 0, w, h, mem_hdc, 0, 0, SRCCOPY); BitBlt(hdc, 0, 0, w, h, mem_hdc, 0, 0, SRCCOPY);