Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - UpdateError in PropertyPage using SetResize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UpdateError in PropertyPage using SetResize

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


Joined: 14 August 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ichbinweg Quote  Post ReplyReply Direct Link To This Post Topic: UpdateError in PropertyPage using SetResize
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
ichbinweg View Drop Down
Newbie
Newbie


Joined: 14 August 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ichbinweg Quote  Post ReplyReply Direct Link To This Post 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 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
Back to Top
ichbinweg View Drop Down
Newbie
Newbie


Joined: 14 August 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ichbinweg Quote  Post ReplyReply Direct Link To This Post 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
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.047 seconds.