![]() |
UpdateError in PropertyPage using SetResize |
Post Reply ![]() |
Author | |
ichbinweg ![]() Newbie ![]() Joined: 14 August 2008 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
ichbinweg ![]() Newbie ![]() Joined: 14 August 2008 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
|
ichbinweg ![]() Newbie ![]() Joined: 14 August 2008 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
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
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |