Click here to Skip to main content
15,912,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralOpen default application for associated file Pin
ness41630-Jun-04 6:19
ness41630-Jun-04 6:19 
GeneralRe: Open default application for associated file Pin
palbano30-Jun-04 6:37
palbano30-Jun-04 6:37 
GeneralRe: Open default application for associated file Pin
ness41630-Jun-04 7:11
ness41630-Jun-04 7:11 
GeneralRe: Open default application for associated file Pin
palbano30-Jun-04 7:14
palbano30-Jun-04 7:14 
GeneralRe: Open default application for associated file Pin
Blake Miller30-Jun-04 7:34
Blake Miller30-Jun-04 7:34 
GeneralTransparent icons on a toolbar buttons Pin
Daredevil30-Jun-04 6:08
Daredevil30-Jun-04 6:08 
GeneralRe: Transparent icons on a toolbar buttons Pin
GermanGeorge1-Jul-04 2:00
GermanGeorge1-Jul-04 2:00 
GeneralRe: Transparent icons on a toolbar buttons Pin
Elmue16-Oct-09 9:22
Elmue16-Oct-09 9:22 
Hello

This will not work.
The toolbar internally works with old primitive bitmaps. (it comes from the Windows 3.1 times)
SetBkMode(TRANSPARENT) is useless for painting bitmaps. It is mainly for printing text.

What you have to do is assign an Imagelist to the toolbar.
The imagelist can maintain a primitive transparency using a mask.

With i_ImageList.SetBkColor(..) you can define with which color the "transparent" pixels are filled.
With i_ImageList.Add(AfxGetApp()->LoadIcon(IDI_ICON1) you can load transparent icons.
With i_Toolbar->GetToolBarCtrl().SetImageList(&i_ImageList) you assign the image list
And as LAST you can load the toolbar tooltips and Command IDs trom the resources
i_Toolbar.LoadToolBar(IDR_TOOLBAR1);
The images stored in the resources will be overridden with your imagelist.

Please note:
This is NOT real transparency with an Alpha channel!
You can NOT draw XP icons or alpha channel bitmaps with various levels of transparency!
And you can NOT draw on a multicolored backgound.

Elmü
QuestionRe: Transparent icons on a toolbar buttons Pin
lakshmanguru23-Feb-10 11:40
lakshmanguru23-Feb-10 11:40 
GeneralRe: Transparent icons on a toolbar buttons Pin
Mahadev HK5-Aug-11 2:33
Mahadev HK5-Aug-11 2:33 
QuestionHow to refresh the ActiveX Property Browser? Pin
Daed30-Jun-04 6:01
Daed30-Jun-04 6:01 
GeneralActiveX ListBox Pin
Roger Art30-Jun-04 5:55
sussRoger Art30-Jun-04 5:55 
GeneralRe: ActiveX ListBox Pin
Jaime Stuardo30-Jun-04 7:04
Jaime Stuardo30-Jun-04 7:04 
GeneralRe: ActiveX ListBox Pin
rogerart30-Jun-04 7:46
sussrogerart30-Jun-04 7:46 
GeneralRe: ActiveX ListBox Pin
Jaime Stuardo30-Jun-04 9:17
Jaime Stuardo30-Jun-04 9:17 
GeneralRe: ActiveX ListBox Pin
Roger Art30-Jun-04 10:56
sussRoger Art30-Jun-04 10:56 
GeneralRe: ActiveX ListBox Pin
Roger Art30-Jun-04 10:56
sussRoger Art30-Jun-04 10:56 
GeneralRe: ActiveX ListBox Pin
Jaime Stuardo1-Jul-04 4:21
Jaime Stuardo1-Jul-04 4:21 
GeneralLooking for C++ Programmers in India Pin
Arun Gandhi30-Jun-04 5:38
Arun Gandhi30-Jun-04 5:38 
GeneralDependency Detection Pin
Joseph Dempsey30-Jun-04 4:58
Joseph Dempsey30-Jun-04 4:58 
GeneralRe: Dependency Detection Pin
David Crow30-Jun-04 5:58
David Crow30-Jun-04 5:58 
GeneralRe: Dependency Detection Pin
palbano30-Jun-04 6:18
palbano30-Jun-04 6:18 
QuestionHow to prevent setting focus to modeless dialog ? Pin
rrrado30-Jun-04 4:02
rrrado30-Jun-04 4:02 
AnswerRe: How to prevent setting focus to modeless dialog ? Pin
GermanGeorge1-Jul-04 2:03
GermanGeorge1-Jul-04 2:03 
Generalglobal connection to db Pin
JabraJabra30-Jun-04 2:18
JabraJabra30-Jun-04 2:18 

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.