getting dialog size during runtime

This is a discussion on getting dialog size during runtime within the Windows Programming forums, part of the Platform Specific Boards category; i have called a dialog box up and now i want to move a control (pushbutton) to the bottom left ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    157

    getting dialog size during runtime

    i have called a dialog box up and now i want to move a control (pushbutton) to the bottom left hand corner of the dialog. so what i figured i would do is just like what i would do with a window, handle the wm_size message and take the LPARAM of it to get the sizes and then move the control according.

    so i put the wm_size message into the dialog proc but then when i ran it, it didnt do what was expected. so then i eventually tested it (with a mesage box call) and it seems that the wm_size message wasn't even handled.

    aren't there wm_size messages in dialog boxes? if not, then how do i get the dialog sizes during runtime to move controls accordingly?

    thanks!

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Are you using MFC? Here is one solution.

    ON_WM_SIZE();
    afx_msg void OnSize(UINT nType, int cx, int cy);

    Kuphryn

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Yes.

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    okay, thanks! i'll just use getclientrect. thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Heapsort
    By xENGINEERx in forum C Programming
    Replies: 2
    Last Post: 03-30-2008, 07:17 PM
  2. Dialog window size
    By xkrja in forum Windows Programming
    Replies: 1
    Last Post: 11-22-2006, 05:07 AM
  3. char problem
    By eXistenZ in forum Windows Programming
    Replies: 36
    Last Post: 02-21-2005, 05:32 AM
  4. Add a dialog box to a tab
    By axr0284 in forum Windows Programming
    Replies: 0
    Last Post: 01-10-2005, 07:38 AM
  5. Replies: 11
    Last Post: 03-25-2003, 04:13 PM

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