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

    Setting rcBounds



    I have written an ocx that just displays a bitmap, and changes this bitmap according to the setting of a property. The bitmap is representative of valve used in process control and is 16 by 16 pixels. The problem is, when the ocx is used in, say VB, upon clicking on the icon in the toolbox, the control places an image of the bitmap, oriented in the upper left hand of the rcBounds rectangle, where I want it, but the rcBounds area consists of a rectangle that is over 4 times the size of the bitmap and covers other controls in the surrounding area. Resizing the control to the bitmap dimensions cures the problem. Can I set the size of rcBounds to fit the bitmap? Any input is appreciated.

  2. #2
    Join Date
    Apr 1999
    Location
    Sussex, England
    Posts
    49

    Re: Setting rcBounds



    Try using SetWindowPos on your control. Use GetBitmap to get the dimensions of the bitmap you are using.

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