Click here to Skip to main content
15,910,787 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUSB Bluetooth communication Pin
gcaboi8-Apr-03 22:41
gcaboi8-Apr-03 22:41 
QuestionMultiline Tooltips? Pin
Rob Caldecott8-Apr-03 22:33
Rob Caldecott8-Apr-03 22:33 
AnswerRe: Multiline Tooltips? Pin
Rob Caldecott8-Apr-03 23:35
Rob Caldecott8-Apr-03 23:35 
GeneralAdding MFC project to Property Sheet Pin
dandy778-Apr-03 22:27
dandy778-Apr-03 22:27 
GeneralRe: Adding MFC project to Property Sheet Pin
jhwurmbach8-Apr-03 22:58
jhwurmbach8-Apr-03 22:58 
GeneralRe: Adding MFC project to Property Sheet Pin
Joan M9-Apr-03 0:06
professionalJoan M9-Apr-03 0:06 
GeneralADO Error Pin
Toni788-Apr-03 22:21
Toni788-Apr-03 22:21 
Generalwin32 api - toolbar Pin
Anonymous8-Apr-03 21:48
Anonymous8-Apr-03 21:48 
hey i have the following code in C using the win32 api (not MFC)

<br />
HWND CreateMYToolbar(HWND hWnd,HINSTANCE hInst){<br />
    HWND hToolbar;<br />
    TBADDBITMAP tbab;<br />
    TBBUTTON tbb[3];<br />
    DWORD dwToolbarStyle = WS_CHILD | WS_BORDER | WS_VISIBLE | TBSTYLE_TOOLTIPS;<br />
<br />
hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, dwToolbarStyle, 0, 0, 0, 0, hWnd, NULL, hInst, NULL);<br />
<br />
SendMessage(hToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);<br />
<br />
	 tbab.hInst = hInst;<br />
	 tbab.nID = idToolbar;<br />
         SendMessage(hToolbar, TB_ADDBITMAP, 1, (LPARAM)&tbab);<br />
		<br />
         ZeroMemory(tbb, sizeof(tbb));<br />
<br />
	 tbb[0].iBitmap = 1;<br />
         tbb[0].fsState = TBSTATE_ENABLED;<br />
         tbb[0].fsStyle = TBSTYLE_BUTTON;<br />
	 tbb[0].idCommand = FIRST_COMMAND;<br />
<br />
	 tbb[1].iBitmap = 2;<br />
         tbb[1].fsState = TBSTATE_ENABLED;<br />
         tbb[1].fsStyle = TBSTYLE_BUTTON;<br />
	 tbb[1].idCommand = SECOND_COMMAND;<br />
<br />
	 tbb[2].iBitmap = 3;<br />
	 tbb[2].fsState = TBSTATE_ENABLED;<br />
         tbb[2].fsStyle = TBSTYLE_BUTTON;<br />
	 tbb[2].idCommand = THIRD_COMMAND;<br />
<br />
SendMessage(hToolbar, TB_ADDBUTTONS, 3, (LPARAM)&tbb);<br />
<br />
	return hToolbar;<br />
}<br />


ibitmap is a bitmap image in the resource file.
the code compiles but the application crashes when it is started. the other problem is when i did actually have this code working the bitmap didnt show up on the buttons..can anyone show me an example of using the win32 api and common controls to create a toolbar and use bitmap images from resource, or fix the code above so it works

thanks in advance. go easy on a beginner

julan
GeneralMapping client controls messages in a CFromView Pin
Anonymous8-Apr-03 21:17
Anonymous8-Apr-03 21:17 
GeneralAdding MFC to a console application Pin
R.E.L8-Apr-03 20:42
R.E.L8-Apr-03 20:42 
GeneralRe: Adding MFC to a console application Pin
harinath8-Apr-03 22:34
professionalharinath8-Apr-03 22:34 
GeneralThread's Problem Pin
fyf_tmp8-Apr-03 20:41
fyf_tmp8-Apr-03 20:41 
QuestionMicrosoft Web Browser Object into DialogBox, without MFC? Pin
Adrian Bacaianu8-Apr-03 20:16
Adrian Bacaianu8-Apr-03 20:16 
GeneralProblem in changing the progress abr color Pin
summo8-Apr-03 20:06
summo8-Apr-03 20:06 
QuestionCList inside CMap not working? Pin
Kevein8-Apr-03 16:51
Kevein8-Apr-03 16:51 
AnswerRe: CList inside CMap not working? Pin
Dave Bryant8-Apr-03 16:54
Dave Bryant8-Apr-03 16:54 
GeneralRe: CList inside CMap not working? Pin
Kevein8-Apr-03 17:07
Kevein8-Apr-03 17:07 
GeneralRe: CList inside CMap not working? Pin
Dave Bryant8-Apr-03 17:14
Dave Bryant8-Apr-03 17:14 
GeneralRe: CList inside CMap not working? Pin
Kevein8-Apr-03 17:45
Kevein8-Apr-03 17:45 
AnswerRe: CList inside CMap not working? Pin
Shog98-Apr-03 17:17
sitebuilderShog98-Apr-03 17:17 
GeneralRe: CList inside CMap not working? Pin
Kevein8-Apr-03 17:46
Kevein8-Apr-03 17:46 
QuestionHow to add closed caption to Video Pin
Prudhvi Raju8-Apr-03 16:24
Prudhvi Raju8-Apr-03 16:24 
GeneralQ: winmm.lib and WAVE Output Pin
europajacek8-Apr-03 15:28
europajacek8-Apr-03 15:28 
GeneralPointer to DWORD Pin
DuFF8-Apr-03 14:36
DuFF8-Apr-03 14:36 
GeneralRe: Pointer to DWORD Pin
Taka Muraoka8-Apr-03 14:59
Taka Muraoka8-Apr-03 14:59 

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.