Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Wrapper function for sprintf, strcpy, strcat? PinPopular
Stephen Hewitt20-Jun-09 21:54
Stephen Hewitt20-Jun-09 21:54 
GeneralWelcome in the CP's Memorable Quotes list. Pin
CPallini21-Jun-09 0:22
mveCPallini21-Jun-09 0:22 
GeneralRe: Welcome in the CP's Memorable Quotes list. Pin
Stephen Hewitt21-Jun-09 3:34
Stephen Hewitt21-Jun-09 3:34 
AnswerRe: Wrapper function for sprintf, strcpy, strcat? Pin
David Crow22-Jun-09 4:21
David Crow22-Jun-09 4:21 
QuestionLink Errors Pin
Muhammad Hassan Haider20-Jun-09 7:25
Muhammad Hassan Haider20-Jun-09 7:25 
AnswerRe: Link Errors Pin
Stuart Dootson20-Jun-09 14:38
professionalStuart Dootson20-Jun-09 14:38 
AnswerRe: Link Errors Pin
«_Superman_»20-Jun-09 17:14
professional«_Superman_»20-Jun-09 17:14 
QuestionTrying to create a Tool bar using the class CToolBar Pin
BobInNJ20-Jun-09 7:02
BobInNJ20-Jun-09 7:02 
I am attempting to understand how to use the class CToolBar. Therefore, I wrote some sample
code that is suppose to create a tool bar. However, the tool bar is not being displayed. The
definition of the tool bar is in my class CMainWindow and is defined as follows:
CToolBar toolBar;

Here is the code that I use to create the tool bar:

<br />
	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 />
	toolBar.SetButtons( idArray, 6 );<br />
	toolBar.ShowWindow( SW_SHOW );<br />
	toolBar.SetSizes( CSize(48,42 ), CSize( 40, 19 ) );


The return value from Create is 1 and the return value from LoadToolBar is 1. The return value from SetButtons is 1. The return value from ShowWindow is 16. I am interpreting these return values to mean that all went well. However, the tool bar is not being displayed. I am hoping that somebody out there can tell me what I am doing wrong.

Thanks

Bob
Questiontext on a toolbar button not vertically centered Pin
AnantheswarG20-Jun-09 4:29
AnantheswarG20-Jun-09 4:29 
QuestionRead coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 1:51
Omar Al Qady20-Jun-09 1:51 
AnswerRe: Read coefficients of linear equations into 2d array Pin
chandu00420-Jun-09 2:01
chandu00420-Jun-09 2:01 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 2:23
Omar Al Qady20-Jun-09 2:23 
GeneralRe: Read coefficients of linear equations into 2d array Pin
chandu00420-Jun-09 2:41
chandu00420-Jun-09 2:41 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Luc Pattyn20-Jun-09 2:46
sitebuilderLuc Pattyn20-Jun-09 2:46 
GeneralRe: Read coefficients of linear equations into 2d array Pin
chandu00420-Jun-09 2:54
chandu00420-Jun-09 2:54 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 3:16
Omar Al Qady20-Jun-09 3:16 
GeneralRe: Read coefficients of linear equations into 2d array Pin
chandu00420-Jun-09 3:27
chandu00420-Jun-09 3:27 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 3:39
Omar Al Qady20-Jun-09 3:39 
GeneralRe: Read coefficients of linear equations into 2d array Pin
ProtoBytes20-Jun-09 4:06
ProtoBytes20-Jun-09 4:06 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 4:22
Omar Al Qady20-Jun-09 4:22 
AnswerRe: Read coefficients of linear equations into 2d array Pin
suthakar5620-Jun-09 2:10
suthakar5620-Jun-09 2:10 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 2:33
Omar Al Qady20-Jun-09 2:33 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Luc Pattyn20-Jun-09 2:49
sitebuilderLuc Pattyn20-Jun-09 2:49 
GeneralRe: Read coefficients of linear equations into 2d array Pin
Omar Al Qady20-Jun-09 2:58
Omar Al Qady20-Jun-09 2:58 
AnswerRe: Read coefficients of linear equations into 2d array Pin
«_Superman_»20-Jun-09 2:45
professional«_Superman_»20-Jun-09 2:45 

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.