15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


A Resizeable Dialog Bar

kvasilak@cyberoptics.com
Tuesday, November 12, 1996

     Environment: Win95 VC++4.1
     
     Is it possible to resize a Dialog Bar when it is undocked? I have 
     created it with code like this:
     
     m_pGraphBar = new CBarGraph(m_pMainWnd);
     
     BOOL ok = m_pGraphBar->Create( m_pMainWnd, CBRS_BOTTOM|CBRS_FLYBY| 
     CBRS_SIZE_DYNAMIC,IDD_GRAPHBAR);
     
     m_pGraphBar->EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); 
     pMainFrame->DockControlBar(m_pGraphBar);
     
     CBarGraph is a Class derived from CDialogBar as discussed previously 
     around here.
     
     When The DialogBar is undocked I see the resizing arrows when I try to 
     resize and Spy++ shows WM_WINDOWPOSCHANGING Messages are going to the 
     Dialog.
     
     As you can see I have 'CBRS_SIZE_DYNAMIC' Flag set. 
     
     Question:
     
     Is it possible to handle WM_WINDOWPOSCHANGING in a CDialogBar class? 
     Class Lizzard doesnt Show it.
     
     
     Keith V



Dong Chen -- d_chen@ix.netcom.com
Wednesday, November 13, 1996

[Mini-digest: 3 responses]

At 04:08 PM 11/12/96 -0600, you wrote:
>     Environment: Win95 VC++4.1
>     
>     Is it possible to resize a Dialog Bar when it is undocked? 

/* snip */

Read the C/C++ KBase article Q143255: How to make a resizable dialog bar. It
might help.
--
Dong
d_chen@ix.netcom.com

-----From: cugr1@gd.swissptt.ch (Cunningham Graham, IT347)


Have you overridden CalcDynamicLayout() in your CDialogBar derived class?
Take a look at an article on the msdn =22How to make a resizable dialog   =
Bar=22 to see sample code.
regards
-----From: Dave_Rabbers@Quinton-Eng.CCMAIL.CompuServe.COM
     
Look instead at overriding CalcDynamicLayout.  Handling WM_WINDOWPOSCHANGING 
within a CDialogBar would not directly affect the size of the CMiniFrameWnd.  
However, controlling the size of your dialog bar through CalcDynamicLayout will 
affect the CMiniFrameWnd size.

Note that CalcDynamicLayout is a member of CControlBar, the base class to 
CDialogBar.  Override away.




| Вернуться в корень Архива |