473,406 Members | 2,390 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,406 software developers and data experts.

Using a palette with a progress bar control

Hi all, Does anyone have experience with using a palette with a progress
control? Everything works fine with a scrollbar control, but I think there
are issues with the progress control because it's a common control. For the
scrollbar, I can select the palette in the WM_CTLCOLORSCROLLBAR message
which works fine, but the progress bar does not send a similar message. The
progress control displays and works fine, but the color of the bar and
background are the closest match, not the colors in the palette I defined. I
know it's a bit out of date, but I'm trying to make the program compatible
with older hardware.

//created palette (HPALETTE g_hPal)

I've tried
{
....
// WM_CREATE
// hwndProgBar = CreateWindow(...);

hdc = GetDC(hwndProgBar);
SelectPalette(hdc, g_hPal, FALSE);
RealizePalette(hdc);
ReleaseDC(hwndProgBar, hdc);
SendMessage(hwndProgBar, PBM_SETBKCOLOR, 0, (LPARAM) PALETTERGB(#,#,#) );

....
}

Thank In Advance,
M

Nov 17 '05 #1
0 1045

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

Similar topics

4
by: dan glenn | last post by:
(PHP4.3.4, GD2) How can I save a PNG using GD2 and insure that it saves as a palette-based (8-bit, 256-color) single-color transparancy?? Saving this way, I could be sure that an image loaded from...
4
by: Just Me | last post by:
I asked this in the VB NG and didn't get a response. I think this NG is no apt to know this kind of thing so I'm trying here. Trying to display the palette that is on the clipboard. I get a...
4
by: Raed Sawalha | last post by:
Dear, I have windows form , the form is using a class to do all tasks needed like this private void btnProcess_Click(object sender, System.EventArgs e) { btnProcess.Enabled = false;...
0
by: Nathan Sokalski | last post by:
I am learning how to use the System.ComponentModel class in VB.NET so that I can add my ASP.NET controls to Visual Studio .NET 2003. I have managed to make my control properties visible in the...
1
by: Stuart | last post by:
I am using the Python Imaging Library (PIL) to process GIF images. I need to be able to retrieve the RGB values for each color palette entry. I see that the 'Image' class has a 'palette'...
15
by: active | last post by:
Below is a small but complete program that appears to show you can't retrive a Palette from the clipboard. This is true whether the palette is placed on the clipboard by Photoshop or Photoshop...
3
by: krishnasamy | last post by:
Hi, I have writing the code for change the Palette color of the Bitmap. But I didn't get any different between given image and result image. Here I given my code, Bitmap *bmp=new...
0
by: R.A.F. | last post by:
Hi, I'm still struggling with my issue about how programmatically add a custom control on Toolbox palette. it creates well my TAB with my custom name, but it does not add my custom control....
1
by: edinwoking | last post by:
Hi I have been struggling to get a toolbar to update its progress information from an event raised ina parallel for loop. I have tried using delegates to get it to work but it just hangs after...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.