C++ – How to change the background Image of a window in win32

cvisual c++winapi

How I can change the background image of a window at runtime in WIN32?

I have created the window using CreateWindow(). Then I have a LoadImage Button which opens a model dialog box (open file dialog)… Now I want to use the file name returned by this dialog box as the image of the window.

Best Answer

There is no native concept for the window background, you have to manually paint your image, usually in the WM_ERASEBKGND message. If you are using MFC you can check this article: http://www.codeproject.com/KB/graphics/picturewindow.aspx

Related Topic