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

Thread: static text

  1. #1
    Guest

    static text

    hai,

    I have a created a static text at runtime

    I want to display it above a picture control which is a bitmap.

    The text i create should have a same background color that of a bitmap

    which doesnot have a uniform color. The color for the static

    text i have given in OnCtlColor() even if i use SetBkMode as transparent

    it is not workking. Please help me.
    regards
    satish


  2. #2
    Guest

    Re: static text

    You also must create a brush with the background color you want and select it into the device context, and then return the brush handle when returning from OnCtlColor. (Also you can be specific for the control you want by getting a pointer for its window from GetDlgCtrlID() using the pWnd given in the params for OnCtlColor().

    Michael Cosgrove ([email protected])



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