Print Page | Close Window

Cool menus without Command Bars

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=3599
Printed Date: 10 November 2025 at 1:32am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Cool menus without Command Bars
Posted By: douglashogan
Subject: Cool menus without Command Bars
Date Posted: 04 February 2006 at 5:20am

Hi

I have a dialog based application based on CXTResizeDialog. I also use the taskpanel control on one side. I want to use the flat "cool" menus. Is it possible from a dialog based application? Does there have to be some connection with the command bars architecture?

Regards

Douglas



-------------
Regards
Douglas Hogan



Replies:
Posted By: Oleg
Date Posted: 05 February 2006 at 4:40am

Hi,

Must work, try it.



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


Posted By: douglashogan
Date Posted: 05 February 2006 at 8:08am

OK,

so I derive from CXTPDialogBase<CXTResizDialog> instead of CXTResizeDialog.

Next problem: I override the WM_CTL_COLOR message and draw the dialog background in a different color, However, the gripper on the bottom right border is painted in dialog gray. Is it possible to customize this color.

 



-------------
Regards
Douglas Hogan


Posted By: Oleg
Date Posted: 06 February 2006 at 12:17am

Unfortnutelly it is standard MS control, that don't send WM_CTL_COLOR to fill its background.

Solution is

1. create dialog with xtResizeNoSizeIcon parameter

2. Manually add some custom gripper class derived from CWnd and draw it as gripper.

3. Add it:

/ Create the size icon if it already doesn't exist.
  if (!::IsWindow(m_scSizeIcon.m_hWnd))
  {
   CXTPClientRect rcIcon(m_pWnd);
   rcIcon.OffsetRect(-1, -1);
   rcIcon.left = rcIcon.right - XTAuxData().cxSmIcon;
   rcIcon.top = rcIcon.bottom - XTAuxData().cySmIcon;

   m_scSizeIcon.Create(WS_CHILD | WS_VISIBLE | SBS_SIZEGRIP,
    rcIcon, m_pWnd, IDC_SIZEICON);
  }

  m_scSizeIcon.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0,
   SWP_NOSIZE | SWP_NOMOVE | SWP_FRAMECHANGED);

  SetResize(IDC_SIZEICON, SZ_REPOS(1));



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


Posted By: douglashogan
Date Posted: 18 February 2006 at 8:00am

Another issue, is it possible to use the docking panes system in a dialog based application? It appears not, as InstalldockingPanes () need a CFrameWnd derived class as a parameter.

Is there another way?



-------------
Regards
Douglas Hogan


Posted By: Oleg
Date Posted: 20 February 2006 at 10:33am

yes, it is not possible....  :(

You can try CFrameWnd + CFormView instead of CDialog to allow ToolBars/Docking Panes.



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



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