Menu

Simple Background help

2008-09-30
2012-09-26
  • akrl adwekll

    akrl adwekll - 2008-09-30

    Hey,
    I'm pretty new to programing. I have written a few simple window applications and I was wondering how to make a background for them. Preferable using a picture I have. Is this possible? I have looked everywhere and I can't find any helpful links.

    Thanks

     
    • Ron McHugh

      Ron McHugh - 2008-10-26

      If you are writing GUI windows apps there are two common ways.

      1) Load a bitmap and use CreatePatternBrush which then can be passed as the HBRUSH parameter when initializing your WNDCLASSEX.
      (This method assumes the window will be a fixed size)

      2) Handle the WM_PAINT message in your WindowProc and blit the image into the device context.

      Check out this site for examples on the second method:
      http://www.winprog.org/tutorial/

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.