bmpbackground

所属分类:Windows编程
开发工具:Asm
文件大小:26KB
下载次数:19
上传日期:2007-07-17 19:18:15
上 传 者idthrow
说明:  Use Brush Demo for beginners

文件列表:
bmp.asm (2093, 2000-02-06)
bmp.exe (82432, 2000-02-06)
RSRC.RC (66, 2000-02-06)
tweety78.bmp (78978, 1996-01-01)

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.

近期下载者

相关文件


收藏者