Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralConvert To Binary Pin
Static(x)24-Mar-05 4:38
Static(x)24-Mar-05 4:38 
GeneralRe: Convert To Binary Pin
David Crow24-Mar-05 5:25
David Crow24-Mar-05 5:25 
GeneralRe: Convert To Binary Pin
ddmcr24-Mar-05 5:54
ddmcr24-Mar-05 5:54 
GeneralRe: Convert To Binary Pin
David Crow24-Mar-05 5:59
David Crow24-Mar-05 5:59 
GeneralRe: Convert To Binary [edited] Pin
toxcct24-Mar-05 5:36
toxcct24-Mar-05 5:36 
GeneralRe: Convert To Binary Pin
ddmcr24-Mar-05 6:34
ddmcr24-Mar-05 6:34 
GeneralRe: Convert To Binary Pin
toxcct24-Mar-05 6:39
toxcct24-Mar-05 6:39 
GeneralToolbar problems... Pin
Tommy2d24-Mar-05 4:25
Tommy2d24-Mar-05 4:25 
Hi!

I'm designing a toolbar for my aplication with 64x64 buttons. I want to store them all as 256color bitmaps in resources for my app.. This is the code i'm using:

<br />
m_wndToolBar = ::CreateWindowEx (0, TOOLBARCLASSNAME, NULL,ATL_SIMPLE_TOOLBAR_PANE_STYLE, 0, 0, 64, 64, m_hWnd,(HMENU) LongToHandle (ATL_IDW_TOOLBAR), _Module .GetModuleInstance (),NULL);<br />
	<br />
TBBUTTON tbb[3];<br />
char blah[250];<br />
sprintf(blah,"Hamsters!!!");<br />
<br />
tbb[0].idCommand = 1; <br />
tbb[0].fsState = TBSTATE_ENABLED; <br />
tbb[0].fsStyle = BTNS_BUTTON|BTNS_AUTOSIZE;<br />
tbb[0].dwData = 0; <br />
tbb[0].iBitmap  = 0;<br />
tbb[0].iString = (int)&blah;<br />
 <br />
tbb[1].idCommand = 2; <br />
tbb[1].fsState = TBSTATE_ENABLED; <br />
tbb[1].fsStyle = BTNS_BUTTON|BTNS_AUTOSIZE;<br />
tbb[1].dwData = 0; <br />
tbb[1].iBitmap  = 1;<br />
tbb[1].iString = (int)&blah; <br />
<br />
tbb[2].idCommand = 3; <br />
tbb[2].fsState = TBSTATE_ENABLED; <br />
tbb[2].fsStyle = BTNS_BUTTON|BTNS_AUTOSIZE; <br />
tbb[2].dwData = 0;<br />
tbb[2].iBitmap  = 1;<br />
tbb[2].iString = (int)&blah;<br />
<br />
<br />
list .Create(64, 64, ILC_COLOR, 1, 1);<br />
CBitmap bmSmall;<br />
bmSmall .LoadBitmap (IDB_BITMAP1);<br />
list .Add (bmSmall);<br />
list .SetBkColor (::GetSysColor (COLOR_3DFACE));<br />
<br />
	<br />
m_wndToolBar .SetButtonStructSize (sizeof (TBBUTTON));<br />
m_wndToolBar .SetExtendedStyle (TBSTYLE_EX_DRAWDDARROWS|TBSTYLE_EX_MIXEDBUTTONS);<br />
m_wndToolBar .SetMaxTextRows (1);<br />
m_wndToolBar .SetImageList(list);<br />
//m_wndToolBar .SetBitmapSize (64,64);<br />
m_wndToolBar .SetButtonSize (64,64);<br />
m_wndToolBar.AddButtons(3,tbb);<br />
	<br />
m_wndToolBar.UpdateWindow();<br />


My problem is that the toolbar doesn't want to show any of my buttons' images! What am i doing wrong? ThanksSmile | :)
GeneralPlease help me! Pin
dSolariuM24-Mar-05 4:25
dSolariuM24-Mar-05 4:25 
GeneralRe: Please help me! Pin
toxcct24-Mar-05 5:18
toxcct24-Mar-05 5:18 
Generalcurrently connected user Pin
shaans24-Mar-05 2:55
shaans24-Mar-05 2:55 
GeneralRe: currently connected user Pin
David Crow24-Mar-05 4:06
David Crow24-Mar-05 4:06 
GeneralRe: currently connected user Pin
shaans24-Mar-05 17:26
shaans24-Mar-05 17:26 
GeneralRe: currently connected user Pin
David Crow25-Mar-05 2:07
David Crow25-Mar-05 2:07 
GeneralSend mail with attachment Pocket PC 2003 Pin
verma-rahul24-Mar-05 1:34
verma-rahul24-Mar-05 1:34 
Generalfun(char*) and fun(char) Pin
bobi_zcl24-Mar-05 0:37
bobi_zcl24-Mar-05 0:37 
GeneralRe: fun(char*) and fun(char) Pin
Abyss24-Mar-05 1:23
Abyss24-Mar-05 1:23 
GeneralRe: fun(char*) and fun(char) Pin
toxcct24-Mar-05 1:27
toxcct24-Mar-05 1:27 
GeneralRe: fun(char*) and fun(char) Pin
bobi_zcl24-Mar-05 1:43
bobi_zcl24-Mar-05 1:43 
GeneralRe: fun(char*) and fun(char) Pin
David Crow24-Mar-05 4:23
David Crow24-Mar-05 4:23 
GeneralRe: fun(char*) and fun(char) Pin
toxcct24-Mar-05 5:39
toxcct24-Mar-05 5:39 
GeneralCWebBrowser - Web Data Pin
sweep12324-Mar-05 0:37
sweep12324-Mar-05 0:37 
GeneralRe: CWebBrowser - Web Data Pin
Ravi Bhavnani24-Mar-05 6:14
professionalRavi Bhavnani24-Mar-05 6:14 
Generaldifference between system date and decide date Pin
tintust24-Mar-05 0:34
tintust24-Mar-05 0:34 
GeneralRe: difference between system date and decide date Pin
toxcct24-Mar-05 0:50
toxcct24-Mar-05 0:50 

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.