📄 readme.txt
字号:
This example demonstates how to use a bitmap as the background for your window. you don't need to respond to WM_PAINT.
files included:
-bmp.asm :source file
-bmp.exe :compiled exe
-rsrc.rc :the resource file
-tweety78.bmp :the bmp used as the background for your window
(i took it from Iczelion's tutorial #25)
ml /c /coff bmp.asm
rc rsrc.rc
link /SUBSYSTEM:WINDOWS bmp.obj rsrc.res
When registering your class using RegisterClassEx you pass a pointer to a WNDCLASSEX structure,
the field hbrBackground lets you specify the class background brush that window will use to paint the background of your window.
what you will do is use LoadBitmap to load the bitmap resource & pass the handle of the bitmap to
CreatePatternBrush function. This function will return a handle to a brush that we will copy to
the hbrBackground member of the WNDCLASSEX structure.
remember to use DeleteObject when your window recieves WM_DESTROY.
email : expedition78@hotmail.com
by Manowar.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -