Resizing controls on a dialog

This is a discussion on Resizing controls on a dialog within the Windows Programming forums, part of the Platform Specific Boards category; I have a dialog that is created from a definition in a resource file with a call to CreateDialog. It ...

  1. #1
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916

    Resizing controls on a dialog

    I have a dialog that is created from a definition in a resource file with a call to CreateDialog. It has a resizing border, and only one control - a Treeview control that takes up the entire window. I know that I need to handle WM_SIZE when the window gets resized and tell the Treeview control that it needs to change its size as well, but I'm missing two critical pieces of information. I can't figure out how to get a handle to the Treeview control (I communicate with it using SendDlgItemMessage()), and I can't figure out what message to send it once I have its handle. How do I do this?
    Away.

  2. #2
    Tropical Coder Darryl's Avatar
    Join Date
    Mar 2005
    Location
    Cayman Islands
    Posts
    503
    I'll just point you at a tutorial that does the same thing except it's using a edit control, but everything else is exactly the same.

    http://www.winprog.org/tutorial/app_one.html

  3. #3
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Quote Originally Posted by Darryl
    I'll just point you at a tutorial that does the same thing except it's using a edit control, but everything else is exactly the same.

    http://www.winprog.org/tutorial/app_one.html
    edit: whoops, should have read the whole thing. Sorry.
    Last edited by confuted; 06-16-2005 at 11:52 AM.
    Away.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    First, try GetDlgItem() and pass in the tree view ID. Otherwise, you have to enumerate all controls in the window.

    Kuphryn

  5. #5
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Ah, there we go. GetDlgItem() was exactly what I was looking for. Thanks!
    Away.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting data from Dialog Box Controls
    By jmd15 in forum Windows Programming
    Replies: 2
    Last Post: 08-05-2005, 05:56 PM
  2. Edit controls of a dialog from another dialog...
    By Snake in forum Windows Programming
    Replies: 9
    Last Post: 07-01-2005, 03:18 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 03:42 PM
  4. common dialog controls
    By lambs4 in forum Windows Programming
    Replies: 2
    Last Post: 11-05-2002, 07:33 PM
  5. Diff between window controls and dialog controls
    By Garfield in forum Windows Programming
    Replies: 13
    Last Post: 01-18-2002, 05:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21