How to put background picture in Windows DialogBox?

0 like 0 dislike
7 views
There is a DialogBox with drop down menus and buttons. The task is to insert the picture in this Dialog window background:
image

Here is a cropped chat Resouce file
#include
#include "WindowSettings.h" // for IDC_?, IDD_DLG

// Dialog Box Template for IDD_DLG
//
IDD_DLG DIALOGEX 200, 100, 200, 350
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION DLG_NAME
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
LTEXT "Display Device", IDC_STATIC, 10, 5, 50, 10
COMBOBOX IDC_DIS, 10, 15, 180, 64, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Resolution", IDC_STATIC, 10, 35, 50, 10
COMBOBOX IDC_RES, 10, 45, 180, 50, CBS_DROPDOWNLIST | WS_DISABLED | WS_VSCROLL | WS_TABSTOP
DEFPUSHBUTTON "Go", IDC_GO, 40, 205, 50, 15, WS_DISABLED
PUSHBUTTON "Cancel", IDCANCEL, 110, 205, 50, 15
END


Maybe there are some useful tutorials? Search did not help, and leads her into the dark forest.
Thank you!
by | 7 views

4 Answers

0 like 0 dislike
It is necessary to dig towards processing the WM_ERASEBKGND message. Standard handler fills the background of the window assigned to the window BRUSH-eat to replace the background, need to handle this message in the dialog procedure. And always from the handler to return TRUE, otherwise the default handler will continue to pour standard background color.
\r
If that — write in lichku, I will help.
by
0 like 0 dislike
Thank you all! The problem is solved! I wonder if someone can show the code
Special thanks Dervish66 for help in solving
by
0 like 0 dislike
Write code and mark that as the answer. For and section.
by
0 like 0 dislike
Not blaming anyone, just about Windows User Experience Interaction Guidelines in their applications need not forget. So, for the future.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
28,643 users