Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Resizing Property Grid
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Resizing Property Grid

 Post Reply Post Reply
Author
Message
MLatimer View Drop Down
Newbie
Newbie


Joined: 20 June 2005
Location: United Kingdom
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote MLatimer Quote  Post ReplyReply Direct Link To This Post Topic: Resizing Property Grid
    Posted: 02 September 2005 at 3:14am
We are creating the property grid in the a CXTResizeDialog as you do in the samples. Namely:

OnInitDialog:

    SetResize(IDC_PROPERTY_GRID, SZ_TOP_LEFT, SZ_BOTTOM_RIGHT);

    // get the size of the place holder, this will be used when creating the grid.
    CRect rc;
    m_wndPlaceHolder.GetWindowRect( &rc );
    ScreenToClient( &rc );

    // create the property grid.
    if ( m_wndPropertyGrid.Create( rc, this, IDC_PROPERTY_GRID ) )

But when the dialog resizes, the property grid does not.

What actions should we take where to resize the property gid
Back to Top
Barto View Drop Down
Groupie
Groupie


Joined: 27 February 2005
Location: Germany
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote Barto Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2005 at 3:52am

my code looks like this and works fine:

BOOL CKeyboardDlg::OnInitDialog()
{
 CXTResizeDialog::OnInitDialog();

 CKeyboard::Backup();

 // get the size of the place holder, this will be used when creating the grid.
 CRect rc;
 GetDlgItem(IDC_GRID)->GetWindowRect( &rc );
 ScreenToClient( &rc );

 GetDlgItem(IDC_GRID)->DestroyWindow();

 // create the property grid.
 m_wndPropertyGrid.Create(rc, this, IDC_GRID);
 m_wndPropertyGrid.SetTheme(xtpGridThemeWhidbey);
 m_wndPropertyGrid.ShowHelp(FALSE);
 m_wndPropertyGrid.SetViewDivider(.4);

 FillGrid();

 SetResize(IDC_GRID,    SZ_TOP_LEFT,  SZ_BOTTOM_RIGHT);
 SetResize(IDOK,      &nb sp; SZ_TOP_RIGHT, SZ_TOP_RIGHT);
 SetResize(IDCANCEL,    SZ_TOP_RIGHT, SZ_TOP_RIGHT);
 SetResize(IDC_DEFAULT, SZ_TOP_RIGHT, SZ_TOP_RIGHT);

 // Load window placement
 AutoLoadPlacement(_T("CKeyboardDlg"));
 
 return TRUE;
}

 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.