CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Can we use OnDrawItem for dynamically created CStatic objects ?

  1. #1
    Join Date
    Dec 2019
    Posts
    13

    Can we use OnDrawItem for dynamically created CStatic objects ?

    The main problem is a CStatic Object is created dynamically & when I'm changing the background of entire dialog to white, the background of dialog changes except the CStatic Object.

    Also if CStatic Object background is white, then it is not visible on the screen.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    19,732

    Re: Can we use OnDrawItem for dynamically created CStatic objects ?

    Yes, you can. Just derive your own class from CStatic and handle any message you need (WM_PAINT, WM_CTLCOLOR, ...)
    Victor Nijegorodov

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)