How to draw image on a window?
I have created a window with createwindow() api using VS2005 in C++ on Windows Vista My requirement is to draw an image (of any format) on that window. I am not using any MFC in this application. not exactly sure what is your problem: draw a bitmap on the form, or you would like know how to work with various image formats, or both. Anyways below is an example of how you could load a bitmap and draw it on the form: HBITMAP hBitmap = NULL; LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; switch (message) { <...> case WM_CREATE: hBitmap =