   Few Simple Questions
  1.when i load a second bitmap from a menu or a shortcut key for exemple F8it only seems to be loading the second picture only if i strech my window app.but then its seems to deleting the first bitmap picture.2.Is it possable to Delete a Textout with a button?for exemple like F9 = a cleanup button.. and if its possable how?here is my test5.cpp file codeill only paste the importent stuff... this is for the bmp problem//globalsHBITMAP g_hbmBall = NULL;HBITMAP g_hbmBall2 = NULL;//The intersource bmp files are included in .rc file and resource.h file  HDC    hdc;    PAINTSTRUCT Ps;    HFONT    font;BITMAP bm;LOGFONT LogFont;case WM_PAINT:{hdc = BeginPaint(hwnd, &ps); LogFont.lfStrikeOut = 0;   LogFont.lfUnderline = 0;   LogFont.lfHeight = 22;   LogFont.lfEscapement = 0;   LogFont.lfItalic = TRUE;   font = CreateFontIndirect(&LogFont);   HDC hdcMem = CreateCompatibleDC(hdc);   HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, g_hbmBall);    HBITMAP hbmOld2 = (HBITMAP)SelectObject(hdcMem, g_hbmBall2);   GetObject(g_hbmBall, sizeof(bm), &bm;   SelectObject(hdcMem, hbmOld);   DeleteDC(hdcMem);    SelectObject(hdc, font);   DeleteObject(font);EndPaint(hwnd,&ps);//HERE IS THE FIRST PICTURE with WM_CREATE that works fineg_hbmBall = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP1));   if(g_hbmBall == NULL)   MessageBox(hwnd, "Failed to load logo, Verify installation.", "Error", MB_OK | MB_ICONEXCLAMATION);Now here is the second bmp that makes the problem . its only work if i Strach my app window after i press the F8 button case VK_F8:{ g_hbmBall = LoadBitmap(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_BITMAP6));   if(g_hbmBall == NULL)   MessageBox(hwnd, "Failed to load Cd logo, Unavliable.", "Error", MB_OK | MB_ICONEXCLAMATION);EndPaint(hwnd,&ps);   }break;also is there a way to define where my bmp picture will be displayed on my app screen because it always generate them in the start = 0,0hope i wrote this problem in the right location :D thank you all[Edited by - Nikita21 on June 17, 2006 3:51:08 PM]
  in that case VK_F8 statement i see an EndPaint call. you can only call BeginPaint/EndPaint for the WM_PAINT message. for WM_KEYDOWN/WM_COMMAND or whatever message u use to load the bitmap, after the bitmap is loaded call InvalidateRect to post a WM_PAINT message so the bitmap is drawn after it is loaded.Y-Go   