Code =Kein error aber keine Funktion

06/08/2014 14:24 Terrat#1
Hallo,
wollte das Interface des Worldservers mal aufpappen mit einem BG bild wo ich danach Objekte plaziere.
Haupt thenor:
Code:
		case WM_PAINT:
			hdc = BeginPaint( hWnd, &ps );
			// Load the bitmap from the resource
				bmpExercising = LoadBitmap(hInst,"worldserverbg");
				if(bmpExercising=NULL)
				{
					MessageBox(NULL, "Error: Backgroundimage from Worldserver couldnt loaded!", NULL, MB_OK);
				}
				// Create a memory device compatible with the above DC variable
				MemDCExercising = CreateCompatibleDC(hdc);
					// Select the new bitmap
				SelectObject(MemDCExercising, bmpExercising);
		        
				GetObject(bmpExercising, sizeof(bm), &bm);
				// Copy the bits from the memory DC into the current dc
				BitBlt(hdc, 10, 10,bm.bmWidth, bm.bmHeight, MemDCExercising, 0, 0, SRCCOPY);

				// Restore the old bitmap
				DeleteDC(MemDCExercising);
				DeleteObject(bmpExercising);

			OnPaint( hdc );
			EndPaint( hWnd, &ps );
			break;
Es passiert nichts keine msgbox kein error :? Bild ist in der resource drin. Jemand ne idee?
06/08/2014 15:20 Mognakor#2
Debug und setz nen breakpoint bei case WM_PAINT: