Click here to Skip to main content
16,011,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDetect network connection? Pin
lynchspawn20-Dec-05 4:42
lynchspawn20-Dec-05 4:42 
AnswerRe: Detect network connection? Pin
Blake Miller20-Dec-05 7:53
Blake Miller20-Dec-05 7:53 
AnswerRe: Detect network connection? Pin
PJ Arends20-Dec-05 8:10
professionalPJ Arends20-Dec-05 8:10 
AnswerRe: Detect network connection? Pin
lynchspawn20-Dec-05 8:28
lynchspawn20-Dec-05 8:28 
QuestionRe: Detect network connection? Pin
David Crow20-Dec-05 10:28
David Crow20-Dec-05 10:28 
AnswerRe: Detect network connection? Pin
ThatsAlok20-Dec-05 18:06
ThatsAlok20-Dec-05 18:06 
QuestioneVC++ 4.0 to SQL Server 2000 Pin
rbrad1234520-Dec-05 4:05
rbrad1234520-Dec-05 4:05 
QuestionSizing Toolbar buttons (Win32) Pin
Ward20-Dec-05 4:04
Ward20-Dec-05 4:04 
Hi,

My problem is that I can't make the size of the toolbar buttons right.

This is my code:

HWND CreateMyToolbar(HWND hWnd)<br />
{<br />
	HWND hToolbar;<br />
	hToolbar = NULL;<br />
	hToolbar = CreateWindowEx(0,TOOLBARCLASSNAME,"MyToolbar",WS_CHILD|WS_VISIBLE|TBSTYLE_TOOLTIPS ,0,0,0,0,hWnd,0,g_hInstance,NULL);<br />
	if(hToolbar)<br />
	{<br />
		SendMessage(hToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);<br />
		TBBUTTON tbb[1];<br />
		TBADDBITMAP tbab;<br />
		tbab.hInst = HINST_COMMCTRL;<br />
		tbab.nID = IDB_STD_LARGE_COLOR;		<br />
		SendMessage(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&tbab);<br />
		<br />
		ZeroMemory(tbb, sizeof(tbb));<br />
		<br />
		tbb[0].iBitmap = STD_FILENEW;<br />
		tbb[0].fsState = TBSTATE_ENABLED;<br />
		tbb[0].fsStyle = TBSTYLE_BUTTON;<br />
		tbb[0].idCommand = IDM_FILENEW;	<br />
		<br />
		SendMessage(hToolbar, TB_ADDBUTTONS, sizeof(tbb)/sizeof(TBBUTTON), (LPARAM)&tbb);<br />
		return hToolbar;<br />
	}<br />
	return NULL;<br />
	<br />
}


I've set the IDB_STD_LARGE_COLOR imagelist, but in the result the button image is clipped on the bottom.

Can someone show me how to do this right?

thanks in advance,

Ward
AnswerRe: Sizing Toolbar buttons (Win32) Pin
Ward21-Dec-05 0:45
Ward21-Dec-05 0:45 
QuestionHow to print contents of a control (say edit control), which is in a Dialog Pin
Vairamuthu. G.20-Dec-05 3:36
Vairamuthu. G.20-Dec-05 3:36 
AnswerRe: How to print contents of a control (say edit control), which is in a Dialog Pin
Ward20-Dec-05 4:23
Ward20-Dec-05 4:23 
QuestionError in strcpy Pin
vikas amin20-Dec-05 3:02
vikas amin20-Dec-05 3:02 
AnswerRe: Error in strcpy Pin
khan++20-Dec-05 3:12
khan++20-Dec-05 3:12 
AnswerRe: Error in strcpy Pin
Ted Ferenc20-Dec-05 3:15
Ted Ferenc20-Dec-05 3:15 
AnswerRe: Error in strcpy Pin
RChin20-Dec-05 3:17
RChin20-Dec-05 3:17 
AnswerRe: Error in strcpy Pin
toxcct20-Dec-05 3:22
toxcct20-Dec-05 3:22 
GeneralRe: Error in strcpy Pin
vikas amin20-Dec-05 3:29
vikas amin20-Dec-05 3:29 
GeneralRe: Error in strcpy Pin
Smith#20-Dec-05 3:40
Smith#20-Dec-05 3:40 
AnswerRe: Error in strcpy Pin
Bob Stanneveld20-Dec-05 3:38
Bob Stanneveld20-Dec-05 3:38 
AnswerRe: Error in strcpy Pin
Blake Miller20-Dec-05 4:22
Blake Miller20-Dec-05 4:22 
GeneralRe: Error in strcpy Pin
toxcct20-Dec-05 4:35
toxcct20-Dec-05 4:35 
GeneralRe: Error in strcpy Pin
Blake Miller20-Dec-05 4:39
Blake Miller20-Dec-05 4:39 
AnswerRe: Error in strcpy Pin
John M. Drescher20-Dec-05 6:50
John M. Drescher20-Dec-05 6:50 
QuestionRe: Error in strcpy Pin
David Crow20-Dec-05 10:29
David Crow20-Dec-05 10:29 
AnswerRe: Error in strcpy Pin
ThatsAlok20-Dec-05 18:19
ThatsAlok20-Dec-05 18:19 

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.