Click here to Skip to main content
15,900,511 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Debugging multiple processes within a visual studio solution Pin
Eugen Podsypalnikov23-Nov-10 6:02
Eugen Podsypalnikov23-Nov-10 6:02 
AnswerRe: Debugging multiple processes within a visual studio solution Pin
«_Superman_»23-Nov-10 7:16
professional«_Superman_»23-Nov-10 7:16 
QuestionListing DLL Exports Pin
softwaremonkey23-Nov-10 5:23
softwaremonkey23-Nov-10 5:23 
AnswerRe: Listing DLL Exports PinPopular
Eugen Podsypalnikov23-Nov-10 5:54
Eugen Podsypalnikov23-Nov-10 5:54 
GeneralRe: Listing DLL Exports Pin
softwaremonkey23-Nov-10 6:09
softwaremonkey23-Nov-10 6:09 
AnswerRe: Listing DLL Exports Pin
«_Superman_»23-Nov-10 7:21
professional«_Superman_»23-Nov-10 7:21 
AnswerRe: Listing DLL Exports Pin
Luc Pattyn23-Nov-10 8:23
sitebuilderLuc Pattyn23-Nov-10 8:23 
QuestionPutting CMFCToolBar in CFormView problem Pin
Harsh Shankar23-Nov-10 1:13
Harsh Shankar23-Nov-10 1:13 

Hi Guys,
Need help in the current task..
I was  trying to put a CMFCToolBar inside the CFormView and i thought will have no problems and used the code bellow. Now this form view is to be kept a Dockable pane. But while doing this i got few problems. To put the toolbar in the FormView, i did this..
The TOOLBAR in the RC File is like this..



IDR_TOOLBAR1 TOOLBAR 16, 16
BEGIN
	BUTTON	IDC_BTN_1
	BUTTON	IDC_BTN_2
	BUTTON	IDC_BTN_3
END



The InitialUpdate of the FormView Derived class is like this: - 



<span style="COLOR: blue">void</span> CMyFormView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();
	CWnd *pWnd	= NULL;
	CRect rcPos;
	<span style="COLOR: blue">if</span>(!m_wndToolView.Create(<span style="COLOR: blue">this</span>, AFX_DEFAULT_TOOLBAR_STYLE, IDR_TOOLBAR1))
	{
		TRACE0(<span style="COLOR: #a31515">"Failed to Create Dialog Toolbar\n"</span>);
	}
	m_wndToolView.LoadToolBar(IDR_TOOLBAR1, 0, 0, TRUE <span style="COLOR: green">/* Is locked */</span>);
	m_wndToolView.CleanUpLockedImages();
	m_wndToolView.LoadBitmap(IDR_TOOLBAR1, 0, 0, TRUE <span style="COLOR: green">/* Locked */</span>);
	m_wndToolView.SetPaneStyle(m_wndToolView.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | WS_CHILD | WS_TABSTOP);
	m_wndToolView.SetPaneStyle(m_wndToolView.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT));
	m_wndToolView.SetOwner(<span style="COLOR: blue">this</span>);
	CSize szToolBar = m_wndToolView.CalcFixedLayout( FALSE, TRUE ); <span style="COLOR: green">// returning CSize(69,24).. which should have been CSize(48, 16)</span>
}


Now a few problems i am getting are: -
1. The Toolbar images are not coming proper
2. The Update of the Toolbar items is not coming.


HARSH

Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.

AnswerRe: Putting CMFCToolBar in CFormView problem Pin
Eugen Podsypalnikov23-Nov-10 5:45
Eugen Podsypalnikov23-Nov-10 5:45 
QuestionRe: Putting CMFCToolBar in CFormView problem Pin
Harsh Shankar24-Nov-10 2:54
Harsh Shankar24-Nov-10 2:54 
AnswerRe: Putting CMFCToolBar in CFormView problem Pin
Eugen Podsypalnikov24-Nov-10 21:42
Eugen Podsypalnikov24-Nov-10 21:42 
QuestionRequired resource [modified] Pin
MsmVc22-Nov-10 22:59
MsmVc22-Nov-10 22:59 
AnswerRe: Required resource Pin
Richard MacCutchan22-Nov-10 23:34
mveRichard MacCutchan22-Nov-10 23:34 
GeneralRe: Required resource Pin
MsmVc23-Nov-10 0:30
MsmVc23-Nov-10 0:30 
GeneralRe: Required resource Pin
Richard MacCutchan23-Nov-10 0:47
mveRichard MacCutchan23-Nov-10 0:47 
GeneralRe: Required resource Pin
MsmVc23-Nov-10 0:49
MsmVc23-Nov-10 0:49 
GeneralRe: Required resource Pin
Richard MacCutchan23-Nov-10 1:44
mveRichard MacCutchan23-Nov-10 1:44 
GeneralRe: Required resource Pin
MsmVc23-Nov-10 17:34
MsmVc23-Nov-10 17:34 
GeneralRe: Required resource Pin
Richard MacCutchan23-Nov-10 21:33
mveRichard MacCutchan23-Nov-10 21:33 
QuestionRe: Required resource Pin
David Crow23-Nov-10 3:06
David Crow23-Nov-10 3:06 
QuestionRe: Required resource Pin
David Crow23-Nov-10 3:08
David Crow23-Nov-10 3:08 
AnswerRe: Required resource Pin
Richard MacCutchan23-Nov-10 3:21
mveRichard MacCutchan23-Nov-10 3:21 
QuestionProblem Initialising derived class Pin
Still learning how to code22-Nov-10 22:33
Still learning how to code22-Nov-10 22:33 
QuestionRe: Problem Initialising derived class Pin
CPallini22-Nov-10 22:43
mveCPallini22-Nov-10 22:43 
AnswerRe: Problem Initialising derived class Pin
Still learning how to code23-Nov-10 0:14
Still learning how to code23-Nov-10 0:14 

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.