Click here to Skip to main content
15,904,339 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUsing VS 2008 Pin
Deepu Antony22-Jun-09 20:28
Deepu Antony22-Jun-09 20:28 
AnswerRe: Using VS 2008 Pin
KarstenK22-Jun-09 21:31
mveKarstenK22-Jun-09 21:31 
GeneralRe: Using VS 2008 Pin
Deepu Antony22-Jun-09 21:32
Deepu Antony22-Jun-09 21:32 
AnswerRe: Using VS 2008 Pin
Stuart Dootson22-Jun-09 21:31
professionalStuart Dootson22-Jun-09 21:31 
GeneralRe: Using VS 2008 Pin
Deepu Antony22-Jun-09 21:38
Deepu Antony22-Jun-09 21:38 
GeneralRe: Using VS 2008 Pin
Stuart Dootson22-Jun-09 23:08
professionalStuart Dootson22-Jun-09 23:08 
GeneralRe: Using VS 2008 Pin
Deepu Antony22-Jun-09 23:57
Deepu Antony22-Jun-09 23:57 
QuestionMFC Pin
p_196022-Jun-09 19:47
p_196022-Jun-09 19:47 
AnswerRe: MFC Pin
Chandrasekharan P22-Jun-09 19:51
Chandrasekharan P22-Jun-09 19:51 
GeneralRe: MFC Pin
p_196022-Jun-09 20:02
p_196022-Jun-09 20:02 
GeneralRe: MFC Pin
Chandrasekharan P22-Jun-09 20:22
Chandrasekharan P22-Jun-09 20:22 
GeneralRe: MFC Pin
p_196022-Jun-09 20:33
p_196022-Jun-09 20:33 
AnswerRe: MFC Pin
Rajesh R Subramanian22-Jun-09 21:14
professionalRajesh R Subramanian22-Jun-09 21:14 
AnswerRe: MFC Pin
Hamid_RT22-Jun-09 22:19
Hamid_RT22-Jun-09 22:19 
QuestionPreventing Sleep (sometimes) Pin
Peter Weyzen22-Jun-09 14:44
Peter Weyzen22-Jun-09 14:44 
QuestionRe: Preventing Sleep (sometimes) Pin
David Crow22-Jun-09 17:20
David Crow22-Jun-09 17:20 
AnswerRe: Preventing Sleep (sometimes) Pin
Peter Weyzen22-Jun-09 17:38
Peter Weyzen22-Jun-09 17:38 
QuestionTrying to Create a Toolbar using the class ToolBar Pin
BobInNJ22-Jun-09 8:59
BobInNJ22-Jun-09 8:59 
I am trying to create a tool bar using the class CToolBar. Maybe, I should be using the class
CToolbarCtrl. However, I want to understand both so I can make an informed decision what is best for
my application. I wrote the following code:

	BOOL status1 = toolBar.Create( this );<br />
	BOOL status2 = toolBar.LoadToolBar( IDR_TOOLBAR );<br />
	toolBar.SetButtonStyle( 0, TBBS_CHECKBOX );<br />
	toolBar.SetButtonStyle( 1, TBBS_CHECKBOX );<br />
	toolBar.SetButtonStyle( 2, TBBS_CHECKBOX );<br />
	toolBar.SetButtonStyle( 3, TBBS_CHECKBOX );<br />
	toolBar.SetButtonStyle( 4, TBBS_CHECKBOX );<br />
	toolBar.SetButtonStyle( 5, TBBS_CHECKBOX );<br />
<br />
	const UINT idArray[] = {<br />
		IDM_LINES,	IDM_RECTANGLES,	IDM_ELLIPSES,<br />
		IDM_ENLARGE,	IDM_ORG,	IDM_RESET<br />
	};<br />
<br />
	BOOL status3 = toolBar.SetButtons( idArray, 6 );<br />
	toolBar.UpdateWindow();<br />
	BOOL status4 = toolBar.ShowWindow( SW_SHOW );<br />
	toolBar.Invalidate();<br />
	this->Invalidate();


This code runs as part of the function that creates (OnCreate) the main window of the application.
The return values as stored in status1, status2, status3 and status4 are 1, 1, 1, and 4. However
no tool bar is being displayed. Please tell me what I am missing or how I should go about trying to debug this problem?

Thanks

Bob
AnswerRe: Trying to Create a Toolbar using the class ToolBar Pin
bolivar12322-Jun-09 9:30
bolivar12322-Jun-09 9:30 
GeneralRe: Trying to Create a Toolbar using the class ToolBar Pin
BobInNJ22-Jun-09 9:52
BobInNJ22-Jun-09 9:52 
GeneralRe: Trying to Create a Toolbar using the class ToolBar Pin
bolivar12322-Jun-09 10:12
bolivar12322-Jun-09 10:12 
GeneralRe: Trying to Create a Toolbar using the class ToolBar [modified] Pin
BobInNJ22-Jun-09 10:50
BobInNJ22-Jun-09 10:50 
QuestionGeneric Specialized Template Definitions Pin
Skippums22-Jun-09 8:42
Skippums22-Jun-09 8:42 
AnswerRe: Generic Specialized Template Definitions Pin
Stuart Dootson22-Jun-09 9:31
professionalStuart Dootson22-Jun-09 9:31 
GeneralRe: Generic Specialized Template Definitions Pin
Skippums23-Jun-09 3:22
Skippums23-Jun-09 3:22 

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.