How to blend a button icon with its background?

Hi,

I have a owner draw button.  I cannot make its bitmap icon blend with 
the background.  When editing its associated bitmap, I first unselect 
the "draw opaque" option in the image menu.  Then make any background to 
white.  What other should I do?  Or is there a particular color instead 
of white for MFC to recogazine it's background?  Please help.  Thanks.

Tony

0
tony6018 (73)
4/28/2004 10:05:56 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
541 Views

Similar Articles

[PageSpeed] 44

Tony,

You might want to use TransparentBlt, check

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps_2y9g.asp

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B79212

and

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vcrefcdctransparentblt.asp

Johan Rosengren
Abstrakt Mekanik AB

"May Young" <tony@srac.com> a �crit dans le message de
news:40902AC4.705@srac.com...
> Hi,
>
> I have a owner draw button.  I cannot make its bitmap icon blend with
> the background.  When editing its associated bitmap, I first unselect
> the "draw opaque" option in the image menu.  Then make any background to
> white.  What other should I do?  Or is there a particular color instead
> of white for MFC to recogazine it's background?  Please help.  Thanks.
>
> Tony
>


0
4/29/2004 12:27:34 PM
Reply:

Similar Artilces:

Missing Outlook icon on desktop
I have a problem. I need to reset my outlook. this is Microsofts guide how to reset it (more at bottom): --- To reset Outlook to First-Run status, follow these steps: Quit all programs. Right-click the Outlook icon on your Desktop, and then click Properties. WARNING: The next step removes all mail account settings from your system. You will need to know these settings in order to reconfigure your mail account. You should click the Properties button for each account and write down the settings before you perform the next step. Outlook Corporate or Workgoup (CW) users: click Show Prof...

Combine 2 Series into a Blend
Hi, I have what seems like a trivial problem that is giving me countless difficulties. Here is my situation: I have 2 sets of XY data which each have different X values. I would like to create a 3rd set of data that is a combination of the 2 sets of data. These could be represented as X1Y1, X2Y2, & X3Y3. To explain better, the first two sets of data, when plotted, look like your typical bell curves. The 3rd curve that I'm trying to produce should be a blend that I can assign a weight to (i.e. 40% of the 1st set, and 60% of the 2nd set). I'm assuming additive properties betw...

form buttons
I have been working with form buttons running some macros........ as I have been experimenting alot, each time I create a button the number on the button advances... I am up to about 78 now! Is there a way to reset these numbers to start at one again?... same question for macros that I have recorded. thanks Just my opinion--don't worry about the sequence numbering. But if you don't like the name, change it to something meaningful. Rightclick on the button and type your new name in the namebox (to the left of the formula bar). It might make it easier when you're reviewing the ...

how to press a button from a different form without sendkey
Hi, i want to replace the sendkeys{enter} function with something else cause vista makes trouble. i want to press a button from a different form without using sendkey. any suggestions. txs akko On Wed, 2 May 2007 15:22:15 +0200, "akko" <info@akko.at> wrote: >Hi, > >i want to replace the sendkeys{enter} function with something else cause >vista makes trouble. > >i want to press a button from a different form without using sendkey. In general, you'd be better off moving the code in that button to a Public Function (or Sub) and calling that functio...

Validation and Ctrl button conflict
I'm getting the strangest thing happening on a workbook. In a worksheet, I have a 12 Ctrl buttons (one for each month). Below them I have some data and below that a cell with Data validation in the form of a list with dropdown selected that chooses one of the months. For some reason, when I select that cell (with the data validation).... 1. The dropdown arrow appears within the cell outline (whereas normally it appears on the right side, outside the cell outline), 2. One of the buttons is taken from where it normally resides and fills that cell area (and the button size is reduced to the...

Button size
Hi, How do I get the size of a button from "Resource View" tab in VS 6.0? In other words, if I want to create a 36x36 pixels button, how do I do this from VS 6.0 "Resource View" tab? Please advice, thanks! -P "Paul" <Paul@discussions.microsoft.com> wrote in message news:4CE99949-D095-4380-82F6-BF65405838CF@microsoft.com... > Hi, > > How do I get the size of a button from "Resource View" tab in VS 6.0? In > other words, if I want to create a 36x36 pixels button, how do I do this > from > VS 6.0 "Resource View" ta...

setting visual state of a button when button does not have focus
Hi all, I put some CButtons on a CDialog. I created a boolean variable for each of the buttons. If I click a button, I set its variable to TRUE, on the next click I set it to FALSE. So by clicking a button I toggle the state of its boolean variable. The problem: I need the visual state of the button to look pressed when the variable is TRUE and unpressed when it is set to FALSE. I tried it by this code m_ctrl_u.SetState(m_u); It even works (button looks pressed / unpressed), but as soon as I change focus to the next button, the previous button looks unpressed, no matter the state of...

Toolbar buttons?
Hi, is there a way to make the toolbar buttons small and without the text name under each button? I have WinXP Pro and Money 2004 standard. Thanks in advance! John ...

Button background is not transparant after button click
I placed a button and set the background color to transparant. But when I click on it, it is not transparant anymore, but has the background color. How to solve this problem? Bart ...

How to add button for macro in Fluent UI?
I have a macro in my personal.xlsb which will be available for all the workbooks in my PC. I want to add a button in the fluent UI for that macro which will be available for all the work books. How to add a custom button? If you want to learn about modifying the ribbon, you can start at Ron de Bruin's site: http://www.rondebruin.nl/ribbon.htm http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an addin) or http://www.rondebruin.nl/2007addin.htm Yajiv wrote: > > I have a macro in my personal.xlsb which will be available for all the > workbooks in my PC. &...

Enable Mouse Right Click button?
I've noticed that on some computers, especially the ones at public libraries, the right click button on the mouse doesn't display the drop down menu for such functions as copy and paste. I have to left- click on the Edit tab and then select copy or paste. Is there any quick way to temporarily enable the mouse's right click function? go to tools and startup check the options there "joshhemming@fastmail.fm" wrote: > I've noticed that on some computers, especially the ones at public > libraries, the right click button on the mouse doesn't display the >...

How do I blend a picture?
I would like to wash out a photo but it is still square. How can I blend a photo in to the back round of a document? Use a photo editing program. "Stevei G." <Stevei G.@discussions.microsoft.com> wrote in message news:A169395D-9B7D-4C80-BE6E-7FE096B3CA24@microsoft.com... >I would like to wash out a photo but it is still square. How can I blend a > photo in to > the back round of a document? Draw a circle, fill, fill effects, picture tab, browse to your picture, use the wash out tool, no line. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer...

Submit Button
For the last few days, i have been looking to figure out how to make the submit button work on a webform that i created. When ever i click on it, all i get is a "page cannot be displayed". I am trying to have this form on the server so other employees can complete and have it e- mailed to myself. Can anyone help me Thanks refer to http://www.publishermvps.com/Default.aspx?tabid=30 -- David Bartosik - MS MVP for Publisher help: www.davidbartosik.com enter to win Pub 2003: www.davidbartosik.com/giveaway.aspx "wesley skjodt" <wesleyskjodt@msn.com> wrote in me...

change background color of a CFormView
Hi, I am using a CFormView and I would like to change the background color of my dialog. How can I do that ? Usually in a CDialog based app I catch WM_CTLCOLORDLG or WM_ERASEBKG but in a CFormView I don't know. Override OnCtlColor and return a brush of your choice. -- Regards, Nish [VC++ MVP] http://www.voidnish.com http://blog.voidnish.com "Vince" <vsix@caramail.com> wrote in message news:42df5c4a$0$18773$636a15ce@news.free.fr... > Hi, > > I am using a CFormView and I would like to change the background color of > my dialog. How can I do that ? > ...

Mouse up event in a button
Hi, Can you help me with this onw, I need an active-x control button that fire event in mouse down click on the button and in the mouse up click, The default button control send only click event in the mouse down pressing on it but ther is no way to know when the user release the mouse click, There is a new active x control that do that?? Can i build a new button control like a class the that derived from CButton and implement the mouse up event? how can you send me an example code??? Thanks! ...

Buttons and List Boxes Moving
We have developed an application in MS Excel 2002 and find that whenever we go to print a page, the buttons and drop down list boxes move to the left. The sheets are protected. These errors remain on saving the file, even if changes are not saved. This might be it: http://support.microsoft.com/default.aspx?scid=kb;EN-US;838910 Controls move to the left of the worksheet in Microsoft Excel 2002 Gail wrote: > > We have developed an application in MS Excel 2002 and > find that whenever we go to print a page, the buttons and > drop down list boxes move to the left. The sheets...

Button with macro in toolbar
How can I create a button in toolbar and assign a macro to this button? What I need is hitting the button and automatically refresh data and update my charts. Thanks Daniel Right click somewhere on the toolbar, but not right on a button, and choose Customize. Click on the Commands tab, scroll down to Macros in the listbox on the left, select Custom Button on the right and drag it where you want it on the toolbar. Right click on the button, choose Assign Macro, and select the macro from the list. Right click on the button and use the commands on the pop up menu to make changes to the bu...

creating pushable buttons
I wish to create a simple table where for ten different fields of information the user will have 5 choices of answer that can be selected by pushing a button labeled with the correct answer. I have seen many forms that use this type of button but have no clue what the process is. If someone can tell me some basics of how this is done or knows of a good reference it will be much appreciated. After putting a button on to a worksheet you assign a macro to run when it is clicked. REgards BrianB ============================================== "CK" <dodge54@shaw.ca> wrote in me...

ICON
Hi, I wonder if it is possible to import ready-made icon file to button editor for toolbar button instead of draw it in button editor? It would be nice to use ready-made icons for toolbar button icons. Thanks pt You can load icons at run time from a file and then set it to a toolbar imagelist using SetImageList etc. All that matters to a toolbar contorl is the imagelist. Note that there are three types of imagelists, normal imagelist, disabled imagelist and hot imagelist. You dont have to use all. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Pertti Toivio" <pertti.t...

Email Templates Button/Toolbar
I have created an few outlook 2003 email template (*.oft) files that I would like all our users to be able to use. I have them accessible thought an toolbar within my version of outlook, which I can just click and choose the desired template. I would like to roll this out to every version of Outlook in our company. I have checked the registry for changes since I created the toolbar, but cant find any. Does anybody know an simple way to do this (ie Login script, Group Policy, Regedit)?? Thanks in Advance Mark ...

SEND button
Hi when sending GP reports as an email attachment, MS Outlook opens up with no SEND button. However the SEND is available when opening Outlook to create a new message. any ideas? This is in a terminal/citrix environment. thank you. ...

How do I turn on Smart Tag Buttons?
I can see the red dots under the text that should have a Smart Tag connected to it, but I can see the Button to activate the Smart Tag. Wglade wrote: > I can see the red dots under the text that should have a Smart Tag > connected to it, but I can see the Button to activate the Smart Tag. Word 2003: Click Tools > AutoCorrect Options > Smart Tags, and check the box at the bottom of the dialog. Word 2007: Go to Office button > Word Options > Proofing > AutoCorrect Options > Smart Tags, and check the box at the bottom of the dialog. -- Regards, Jay F...

Double-click notifications from a button?
How do you get double-click notifications from a button in an MFC dialog? I created an "ordinary" button using the resource editor. When instantiated, it has the BS_NOTIFY style, according to Spy++. If this button is double-clicked, it sends a BN_CLICKED message, but no BN_DOUBLECLICKED. This is Win XP Pro SP1 and VC++ 6.0 SP5. I would prefer to avoid solutions that require timing to see if single-clicks should be combined, and those which require me to wait after a single-click to see if another click is coming. sherNOwoodSPAM@computer.org (remove caps to get e-mail) I'...

Drafts folder no longer has a pencil icon, but works correctly (Outlook 2007)
Hello. It's a long story how the drafts folder lost its pencil, but suffice it to say that everything works properly. The thing is, there is another folder with a pencil, which otherwise isn't special in any way. It's a long and involved story how this happened, but suffice it to say that I was fixing a screwed up installation of Outlook 2007. The pencil-less drafts folder receives the drafts when saved, e-mail saved into the pencil-less drafts folder goes when sent, delete/rename/move are grayed out properly, etc. Interestingly, though, the pencil-endowed folder can be renamed/...

BLENDING COLORS IN PUBLISHER
I don't know if this is possible. I have several clip art pieces I have imported into publisher. I have been able to make one of them my background. And I have several of the same image lined up to create a panorama. But I want to be able to blend colors from one area to another. I have done something like this in photoshop where you can select a color and apply it in the adjacent area. How can I do this in publisher. If I can't in publisher, can I use another program to do that? If you have Photoshop, I would suggest doing all of your editing in that program and then ...