Click here to Skip to main content
15,908,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPlease help me regarding LoadCursor and SetCursor Pin
ptr_Electron2-Jun-09 21:18
ptr_Electron2-Jun-09 21:18 
Question3D border for Edit control Pin
Benjamin Bruno2-Jun-09 19:30
Benjamin Bruno2-Jun-09 19:30 
AnswerRe: 3D border for Edit control Pin
Naveen2-Jun-09 20:18
Naveen2-Jun-09 20:18 
Questionquestion regarding sockets Pin
mkrtchyanmarianna2-Jun-09 19:12
mkrtchyanmarianna2-Jun-09 19:12 
AnswerRe: question regarding sockets Pin
Stuart Dootson2-Jun-09 22:06
professionalStuart Dootson2-Jun-09 22:06 
QuestionHow to free unsigned long pointer variable? Pin
VCProgrammer2-Jun-09 19:05
VCProgrammer2-Jun-09 19:05 
AnswerRe: How to free unsigned long pointer variable? Pin
Naveen2-Jun-09 20:03
Naveen2-Jun-09 20:03 
QuestionWindow maximize and Minimize Pin
002comp2-Jun-09 18:45
002comp2-Jun-09 18:45 
AnswerRe: Window maximize and Minimize Pin
Naveen2-Jun-09 18:56
Naveen2-Jun-09 18:56 
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 

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.