![]() |
Dialog not Resizing |
Post Reply ![]() |
Author | |
Raj.krishnan ![]() Groupie ![]() ![]() Joined: 16 January 2006 Status: Offline Points: 44 |
![]() ![]() ![]() ![]() ![]() Posted: 20 May 2006 at 4:04pm |
We have developed a dialog based application in VC++ 6.0.
We have integrated XTreme toolkit 9.81 into the application.The problem we
now face is that we are not able to resize the dialog eventhough we have derived
the dialog from CXTResize and the property of the dialog is also set
to resizing.
Resizing needs to happen in maximize mode and compact mode( Refer image attached ).
A sample application and the source code for the same is attached.Please follow the steps mentioned below.
Can you please help us to resolve this issue ASAP .
Things to be followed while using the Source code:
1) Unzip the workspace
2) Make sure that you are compiling in the debug mode ( donot do it in release mode - since we deleted few resources it will not work in release mode) 3) Give your executable path in the settings ( Projects -> Settings -> Debug Tab ) 4) After executing, a dialog will be displayed in which we are not able to resize, both in maximized mode as well as compactible mode. |
|
Raj
Software Engineer eGrabber Inc http://vcfreax.blogspot.com/ |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Some hints: 1. You totally removed all borders: ModifyStyle(WS_BORDER|WS_DLGFRAME|WS_THICKFRAME,0); So window has no border/has no nonclient area. 2. Because your dialog have no nonclient area/borders You must manually catch WM_SETCURSOR to change resize cursor and WM_LBUTTONDOWN to send WM_SYSCOMMAND to resize client sample: BOOL CToolDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) void CToolDlg::OnLButtonDown(UINT nFlags, CPoint point) return; |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Shajeer ![]() Newbie ![]() ![]() Joined: 20 January 2006 Location: India Status: Offline Points: 16 |
![]() ![]() ![]() ![]() ![]() |
Thanks oleg for your speedy reply But we are not able to resize on the top ( It is not recieving WM_LBUTTONDOWN when clicked on the top ) Please advice Can you also advice how to bring the resize gripper on the right bottom most corner.
our code ////////////// BOOL CToolDlg::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) CRect rc; if ( pt.x > rc.right - 4 ) if ( pt.x == rc.left ) if ( pt.y == rc.top ) if ( pt.y > rc.bottom -4 ) return CDialog::OnSetCursor(pWnd, nHitTest, message); void CToolDlg::OnLButtonDown(UINT nFlags, CPoint point) CPoint pt; if ( pt.x > rc.right - 4 ) if ( pt.x == rc.left ) if ( pt.y == rc.top ) if ( pt.y > rc.bottom -4 ) Thanks |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, you don't receive WM_LBUTTONDOWN for "top" border because you cantch WM_NCHITTEST and return HTCAPTION instead of HTCLIENT for top border... |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Raj.krishnan ![]() Groupie ![]() ![]() Joined: 16 January 2006 Status: Offline Points: 44 |
![]() ![]() ![]() ![]() ![]() |
Hi Oleg ,
When i try to Add a Rich Edit Control to the dialog while Resizing lots of flickering happens . We are painting the dialog with Gradient fill in WM_PAINT message so while Resizing dialog is InValidating
We tried certain methods like OnEraseBkGnd message to avoid flickering .Can you please help me to sort out the issue of flickering .
|
|
Raj
Software Engineer eGrabber Inc http://vcfreax.blogspot.com/ |
|
![]() |
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 |