Results 1 to 3 of 3

Thread: hwnd, hdc, parent

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    1
    I'm trying to make a custom control that can be dropped onto any form or into any picture box and create a grid either under or over whatever controls and graphics are already there. I have it mostly worked out, but I'm having some trouble getting the parents width & height.

    I know that through API calls, I can get a parents hwnd & hdc. Once I have those, is there a way to get the width of that parent either through another api call (or even something much more mundane?) without setting it implicitly from the parent?

    Thanks much!

    Jody

  2. #2
    Junior Member
    Join Date
    Jul 2000
    Posts
    19
    if you want to get the controls height/width, im sure GetwindowRect will do that. As long as you have its handle and hdc

  3. #3
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    It's Much Easier than that, Usercontrol.Parent.Height gives the parent height, Usercontrol.Parent.Width gives the parent width.

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