Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to use CXTPOffice2007Image::GetBitmapPixel
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to use CXTPOffice2007Image::GetBitmapPixel

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 899
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: How to use CXTPOffice2007Image::GetBitmapPixel
    Posted: 11 February 2010 at 4:40pm
I want to draw a background gradient that matches the colors of a ribbon bar group. But I don't know how to call GetBitmapPixel. I am trying to call GetBitmapPixel with the correct "point" coordinates. I can draw the image calling like this:
 
pImage->DrawImage(pDC, rcClient, pImage->GetSource(0,2), CRect(0,0,0,0));
 
and I see what appears to be the image I see when the ribbon draws a non-highlighted group (background). I cannot seem to find the correct offset point to pass GetBitmapPixel.
 
It also appears that the pixel returned is not in RGB format but rather is in BGR (I can only come close to the colors I see when I draw the image if I swap the red and green when calling the GDI GradientFill API.)
 
Can I call GetBitmapPixel to get the values I need? If not, how can I get the colors of the two "inner bands" that I see a group image contains.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.110 seconds.