CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Posts
    5

    How to change background color

    Am vb chap with little knowlege of vc/mfc/subclassing

    I am using an API call CreateWindowsEx function
    to create an windows with SysAnimate32 Class
    I want to change the background color of this
    window
    I have set dwexstyle to WS_EX_TRANSPARENT
    I have also tried setwindowlong and
    setbkmode,setbkcolor
    but nothing seems to working !
    any help would be appriciated


  2. #2
    Join Date
    Jun 1999
    Location
    Germany
    Posts
    343

    Re: How to change background color

    Hi,
    SetBkColor is only for Text - OutPut.
    But if you want to change the BK color of the window, you must handle the message
    WM_CTLCOLOR
    There, you can return your self - defined brush ( use a CBrush - object - member varaiable in your window class)
    Good luck


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured