Print Page | Close Window

UpdateError in PropertyPage using SetResize

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=11898
Printed Date: 13 September 2025 at 6:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: UpdateError in PropertyPage using SetResize
Posted By: ichbinweg
Subject: UpdateError in PropertyPage using SetResize
Date Posted: 20 August 2008 at 6:30am
Hi Forum,

i still have problems with SetResize and the Update Mechanism of the backround in a dialog. This time the problem occurs in a PropertyPage. If i resize the main window the PropertyPage doesn't actualize its background.

Is there any special command which forces Classes derived from CXTResizeDialog to update the dialog-background?

Or do i have to implement some other mfc functions (move, paint, ...) to force correct

thx for helping out...


-------------
greetings Sebastian



Replies:
Posted By: Oleg
Date Posted: 20 August 2008 at 8:34am
Hi,
 
Small sample that illustrates problem will be great. Now I have no idea  what do you see and what did you try.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ichbinweg
Date Posted: 20 August 2008 at 9:24am
Hi Oleg,
Thx for fast reply, the problem occurs because some templates get to large for the screen/display if the resolution isn't high enough.

I had to remove the resizable functionality and use scrollbars instead, so that all controls can be reached by the user...

Ok, here some code snippets:

MyPropertyPage::OnInitDialog
{
    [...]
    // get actual size of dialog
    GetWindowRect(m_rect);
    m_nScrollPosHeight = 0;
    m_nScrollPosWidth = 0;

SetResize(IDC_LISTCTRL_ANMELDUNGEN_TEILNEHMERLISTE,    SZ_TOP_LEFT, SZ_BOTTOM_RIGHT);
   
    //Labels links
    SetResize(IDC_STATIC1,                            SZ_BOTTOM_LEFT,  SZ_BOTTOM_LEFT);
    SetResize(IDC_STATIC2,                            SZ_BOTTOM_LEFT,  SZ_BOTTOM_LEFT);
    )
    [...] // Resizing all my Controls

    // If the Dialog is greater than the screen i want to use scrollbars -
    // In this case the ResizeFunction is not desired,
    // because Controls get smaller than in the Ressource Editor defined.
    // width
    int cx = GetSystemMetrics(SM_CXSCREEN);
    // height
    int cy = GetSystemMetrics(SM_CYSCREEN);

    if(m_rect.bottom > cy || m_rect.right > cx)
    {
       // SetResize nicht erwünscht, da Scrollbalken her müssen!
       RemoveAllControls();
    }

}

For the scrollbar functionality i implemented the OnSize, OnHScroll and OnVScroll as described in http://support.microsoft.com/?scid=kb%3Ben-us%3B262954&x=14&y=12 - How to create a resizable dialog box with scroll bars in Visual C++ . I did this already successfully for a modal Dialog - the Update Problems dissapeared by using the removeAllControls() function of CXTResizeDialog class...

I guess my implementation of scrollbar should come out of XtremeToolkitPro and not out of mfc/Windows - hopefully i expressed myself clear enough...



-------------
greetings Sebastian


Posted By: ichbinweg
Date Posted: 21 August 2008 at 3:26am
Hi Forum,

Maybe somebody could recommend me one of the example-projects in ToolkitPro, which contains a resizable PropertyPage with controlbars... or something similar?
thx Sebastian


-------------
greetings Sebastian



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net