News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

draw to a taskbar tab

Started by thomas_remkus, December 12, 2006, 10:21:12 PM

Previous topic - Next topic

thomas_remkus

I understand that the tasks I have running that show in the taskbar are really just tabs to some tab control. My application, as is, runs and paints a graph of the current CPU utilization per each CPU. So the start button is subclassed and painted to with black and then a simple bar for the % of cpu utilization. Here's my issue:

I want to display more CPUs and their utilization but the start button area is pretty small. So I want to take the area which my application is taking up anyways on the taskbar and paint my graph on there. It's plenty high for my needs and it's so wide I foam at the ability to use that area for my graph. My issue is that my "tab" for my application does seem to have a window handle. I think I'm missing something here because because getting the handle to this tab should be easy, right?

If you have code that can do this, of course in masm, that's cool and I'd love to have help, but if someone could just shove me in the right direction for this I would appreciate it. I feel like I'm trying to do the impossible and I know there must be a way to do it.

Thanks for any and all help,
Thomas

Max_Power

I believe the area you are talking about in the taskbar is actually a toolbar. I haven't really looked into this too much, but I believe you can use the idCommand to get the handle of what would be a toolbar button.

http://msdn2.microsoft.com/en-us/library/ms650730.aspx

thomas_remkus

That was a good point in the right direction, but the idCommand is not a handle to the button but rather a reference to the application it is "linked" to. What I did find was what I think will lead me to some solution. It's a combination of using the SendMessage with TB_BUTTONCOUNT to find just my button and then using TB_GETITEMRECT so I will know what size my memory DC/Bitmap will be in the buffer. Then I can BitBlt that onto the "ToolbarWindow32" class in the toolbar/taskbar.

Of course, there are some issues with getting the TB_BUTTONCOUNT because it's in a different process than mine but I think I have some code for that.

Just for your information, I have searched for TB_GETITEMRECT +ReBarWindow +BitBlt in google and I don't think that anyone has either 1) tried this, 2) shared the way to do this.