473,382 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Copying images from toolbar image list to system menu

I have a program where I used Win32 calls to add items to my form's system
menu. Now I am attempting to have those items use the same icon that the
corresponding toolbar button uses. I thought that I could just access the
image on the fly and send it to Windows. Trouble is that results in an
image with dark blue where the image is transparent. (The menu's background
is the standard BTNFACE color.) My code is below. All need is a HBITMAP.
Windows is definitely insisting on a bitmap rather than an icon. Could
someone tell me what is wrong? Do I need to paint the image somewhere? I
would rather just copy it.

((System.Drawing.Bitmap)ilToolbarSmall.Images[iUncheckedIconIndex]).GetHbitm
ap()
----------
Will Pittenger
E-Mail: mailto:wi************@verizon.net
All mail filtered by Qurb (www.qurb.com)
Nov 16 '05 #1
1 2257
After some careful experimenting and examination of some zoomed screen
captures, I concluded that white was replaced with RGB(192, 192, 192) and
RGB(192, 192, 192) with RGB(0, 0, 192). I tried code to manually copy the
images to a new bitmap with a graphics object created from that bitmap.
That did not change anything. So I thought perhaps I could use a flood fill
to force the background to either grey or white. I had to use more Win32
code for that as I could not find a .NET flood fill. At this point, it
looks like I need to find a solution in the Win32 group. However, if anyone
here has a suggestion, I will continue to track this topic.

----------
Will Pittenger
E-Mail: mailto:wi************@verizon.net
All mail filtered by Qurb (www.qurb.com)
"Will Pittenger" <wi************@verizon.net> wrote in message
news:eq****************@TK2MSFTNGP09.phx.gbl...
I have a program where I used Win32 calls to add items to my form's system
menu. Now I am attempting to have those items use the same icon that the
corresponding toolbar button uses. I thought that I could just access the
image on the fly and send it to Windows. Trouble is that results in an
image with dark blue where the image is transparent. (The menu's background is the standard BTNFACE color.) My code is below. All need is a HBITMAP.
Windows is definitely insisting on a bitmap rather than an icon. Could
someone tell me what is wrong? Do I need to paint the image somewhere? I
would rather just copy it.

((System.Drawing.Bitmap)ilToolbarSmall.Images[iUncheckedIconIndex]).GetHbitm ap()
----------
Will Pittenger
E-Mail: mailto:wi************@verizon.net
All mail filtered by Qurb (www.qurb.com)

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Roland Hall | last post by:
I read Aaron's article: http://www.aspfaq.com/show.asp?id=2276 re: protecting images from linked to by other sites. There is a link at the bottom of that page that references an interesting...
3
by: Ray Price | last post by:
I want to use a server-side C# script to copy an image from a remote URL to a local file in the web directory. I tried using File.Copy from the System.IO namespace but it doesn't support URL. ...
9
by: Terrance | last post by:
Good Afternoon: I was hoping if someone could share some light on a problem that I'm facing. When I create a Visual Basic.Net program and I use the XP style for my Window Forms and buttons; if I...
102
by: me | last post by:
How do I prevent the save/print/email/mypictures toolbar from popping up when IE users place their cursor over photos at my website? Thank you in advance for your help. Signed, me
1
by: Will Pittenger | last post by:
I have a program where I used Win32 calls to add items to my form's system menu. Now I am attempting to have those items use the same icon that the corresponding toolbar button uses. I thought...
9
by: Dino M. Buljubasic | last post by:
I have a tool bar and an image list that holds all icon images that are shown on the tool bar. However, I have noticed several times that when I add the images to the buttons on toolbar, they get...
4
by: al | last post by:
Greetings, I have this problem with any image, in any format, I include in ToolBar Control. Those images are in-house developed. The problem is when I include an image in a ToolBar and have its...
6
by: Neil | last post by:
I have a form that has its own custom menu bar in Access 2000. I'd like to make a copy of the menu bar and use it with another form. How can I do this? Thanks.
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.