Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Cool menus without Command Bars
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cool menus without Command Bars

 Post Reply Post Reply
Author
Message
douglashogan View Drop Down
Groupie
Groupie


Joined: 02 July 2003
Location: Switzerland
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote douglashogan Quote  Post ReplyReply Direct Link To This Post Topic: Cool menus without Command Bars
    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
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: 05 February 2006 at 4:40am

Hi,

Must work, try it.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
douglashogan View Drop Down
Groupie
Groupie


Joined: 02 July 2003
Location: Switzerland
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote douglashogan Quote  Post ReplyReply Direct Link To This Post 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
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: 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
Back to Top
douglashogan View Drop Down
Groupie
Groupie


Joined: 02 July 2003
Location: Switzerland
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote douglashogan Quote  Post ReplyReply Direct Link To This Post 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
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 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
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.078 seconds.