Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Window maximize and Minimize Pin
002comp2-Jun-09 19:06
002comp2-Jun-09 19:06 
GeneralRe: Window maximize and Minimize Pin
Naveen2-Jun-09 19:11
Naveen2-Jun-09 19:11 
GeneralRe: Window maximize and Minimize Pin
002comp2-Jun-09 20:36
002comp2-Jun-09 20:36 
GeneralRe: Window maximize and Minimize Pin
Naveen2-Jun-09 20:48
Naveen2-Jun-09 20:48 
GeneralRe: Window maximize and Minimize Pin
002comp2-Jun-09 21:21
002comp2-Jun-09 21:21 
GeneralRe: Window maximize and Minimize Pin
002comp2-Jun-09 22:48
002comp2-Jun-09 22:48 
QuestionCDockablePane without Close button PinPopular
VCsamir2-Jun-09 18:23
VCsamir2-Jun-09 18:23 
AnswerRe: CDockablePane without Close button Pin
laiboy6-Feb-10 1:41
laiboy6-Feb-10 1:41 
That is easy!

There has two space to do this.

For example, you derive a class CFileViewWnd from CDockablePane.

Create an instance.
CFileViewWnd m_wndFileView;

1. When you create the pane.use this.
The default create method is

virtual BOOL CreateEx(DWORD dwStyleEx, LPCTSTR lpszCaption, CWnd* pParentWnd, const RECT& rect, BOOL bHasGripper, UINT nID, DWORD dwStyle, DWORD dwTabbedStyle = AFX_CBRS_REGULAR_TABS, DWORD dwControlBarStyle = AFX_DEFAULT_DOCKING_PANE_STYLE, CCreateContext* pContext = NULL);

the AFX_DEFAULT_DOCKING_PANE_STYLE defined is
static const DWORD AFX_DEFAULT_DOCKING_PANE_STYLE = AFX_CBRS_FLOAT | AFX_CBRS_CLOSE | AFX_CBRS_RESIZE | AFX_CBRS_AUTOHIDE;

So, you can remove the create flags "AFX_CBRS_CLOSE"
like this.

m_wndFileView.Create( strFileViewWnd, this, CRect( 0, 0, 200, 200 ), TRUE, ID_PANE_FILEVIEW_WND, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT | CBRS_FLOAT_MULTI, AFX_CBRS_REGULAR_TABS, AFX_CBRS_FLOAT | AFX_CBRS_RESIZE | AFX_CBRS_AUTOHIDE ) )

It's OK!

2. Use the method GetControlBarStyle() and SetControlBarStyle( dwStyle )

DWORD dwStyle = m_wndFileView.GetControlBarStyle();
dwStyle &= ~( AFX_CBRS_CLOSE | AFX_CBRS_FLOAT );
m_wndFileView.SetControlBarStyle( dwStyle );

It's OK !

Enjoy It !
http://blog.csdn.net/laiboy
GeneralRe: CDockablePane without Close button Pin
Alexandre GRANVAUD16-May-11 23:09
Alexandre GRANVAUD16-May-11 23:09 
QuestionHow to design a decoder in C++? Pin
kapardhi2-Jun-09 18:04
kapardhi2-Jun-09 18:04 
AnswerRe: How to design a decoder in C++? Pin
CPallini2-Jun-09 21:22
mveCPallini2-Jun-09 21:22 
AnswerRe: How to design a decoder in C++? Pin
Stuart Dootson2-Jun-09 22:55
professionalStuart Dootson2-Jun-09 22:55 
GeneralRe: How to design a decoder in C++? Pin
kapardhi3-Jun-09 18:35
kapardhi3-Jun-09 18:35 
GeneralRe: How to design a decoder in C++? Pin
Stuart Dootson3-Jun-09 21:33
professionalStuart Dootson3-Jun-09 21:33 
GeneralRe: How to design a decoder in C++? Pin
kapardhi4-Jun-09 3:27
kapardhi4-Jun-09 3:27 
GeneralRe: How to design a decoder in C++? Pin
Stuart Dootson4-Jun-09 3:31
professionalStuart Dootson4-Jun-09 3:31 
GeneralRe: How to design a decoder in C++? [modified] Pin
kapardhi4-Jun-09 3:49
kapardhi4-Jun-09 3:49 
GeneralRe: How to design a decoder in C++? Pin
Stuart Dootson4-Jun-09 3:59
professionalStuart Dootson4-Jun-09 3:59 
GeneralRe: How to design a decoder in C++? Pin
kapardhi4-Jun-09 21:03
kapardhi4-Jun-09 21:03 
GeneralRe: How to design a decoder in C++? Pin
Stuart Dootson4-Jun-09 21:45
professionalStuart Dootson4-Jun-09 21:45 
GeneralRe: How to design a decoder in C++? Pin
kapardhi5-Jun-09 0:05
kapardhi5-Jun-09 0:05 
GeneralRe: How to design a decoder in C++? Pin
Stuart Dootson5-Jun-09 0:23
professionalStuart Dootson5-Jun-09 0:23 
QuestionUrgent! Smart house with SMS project Pin
ericyeoh2-Jun-09 16:33
ericyeoh2-Jun-09 16:33 
QuestionRe: Urgent! Smart house with SMS project Pin
CPallini2-Jun-09 21:39
mveCPallini2-Jun-09 21:39 
QuestionMFC Process Pin
duongcntt4b2-Jun-09 15:39
duongcntt4b2-Jun-09 15:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.