Click here to Skip to main content
16,006,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Which API's do i need to get the hWnd of the control under the cursor? Pin
PJ Arends29-Mar-03 9:40
professionalPJ Arends29-Mar-03 9:40 
AnswerRe: Which API's do i need to get the hWnd of the control under the cursor? Pin
John R. Shaw29-Mar-03 10:36
John R. Shaw29-Mar-03 10:36 
GeneralCListCtrl and ImageList Pin
JamesLaing29-Mar-03 5:33
JamesLaing29-Mar-03 5:33 
GeneralRe: CListCtrl and ImageList Pin
Gary R. Wheeler29-Mar-03 5:49
Gary R. Wheeler29-Mar-03 5:49 
GeneralRe: CListCtrl and ImageList Pin
JamesLaing29-Mar-03 5:57
JamesLaing29-Mar-03 5:57 
GeneralRe: CListCtrl and ImageList Pin
RobJones29-Mar-03 6:46
RobJones29-Mar-03 6:46 
GeneralRe: CListCtrl and ImageList Pin
JamesLaing29-Mar-03 8:47
JamesLaing29-Mar-03 8:47 
GeneralRe: CListCtrl and ImageList Pin
Gary R. Wheeler29-Mar-03 13:40
Gary R. Wheeler29-Mar-03 13:40 
If you choose another color as the mask color (purple = RGB(255,0,255) in the example earlier in the thread), then that color is treated as transparent, and black is just another color in the bitmap. This is the standard behavior regarding the list control and imagelists.

You mentioned using TransparentBlt. From the MSDN:
BOOL TransparentBlt(
  HDC hdcDest,        // handle to destination DC
  int nXOriginDest,   // x-coord of destination upper-left corner
  int nYOriginDest,   // y-coord of destination upper-left corner
  int nWidthDest,     // width of destination rectangle
  int hHeightDest,    // height of destination rectangle
  HDC hdcSrc,         // handle to source DC
  int nXOriginSrc,    // x-coord of source upper-left corner
  int nYOriginSrc,    // y-coord of source upper-left corner
  int nWidthSrc,      // width of source rectangle
  int nHeightSrc,     // height of source rectangle
  UINT crTransparent  // color to make transparent
);

<listing>Parameters
...
crTransparent 
[in] The RGB color in the source bitmap to treat as transparent.</listing> 

In this case, you would need to pass cdTransparent as whatever color you were using as the transparency color (again, RGB(255,0,255) from the example).


Software Zen: delete this;
GeneralRe: CListCtrl and ImageList Pin
JamesLaing29-Mar-03 23:33
JamesLaing29-Mar-03 23:33 
GeneralOpening Recordset Using CRecordset Pin
jayesh Bang29-Mar-03 4:50
jayesh Bang29-Mar-03 4:50 
GeneralRe: Opening Recordset Using CRecordset Pin
RaajaOfSelf29-Mar-03 5:52
RaajaOfSelf29-Mar-03 5:52 
Generalwinpcap Pin
summo29-Mar-03 2:10
summo29-Mar-03 2:10 
GeneralRe: winpcap Pin
Bartosz Bien29-Mar-03 11:10
Bartosz Bien29-Mar-03 11:10 
GeneralShellExecute and IE Pin
tinkywinky29-Mar-03 1:51
tinkywinky29-Mar-03 1:51 
GeneralRe: ShellExecute and IE Pin
valikac29-Mar-03 6:13
valikac29-Mar-03 6:13 
GeneralRe: ShellExecute and IE Pin
Anders Molin29-Mar-03 6:55
professionalAnders Molin29-Mar-03 6:55 
GeneralRe: ShellExecute and IE Pin
Stephane Rodriguez.30-Mar-03 8:44
Stephane Rodriguez.30-Mar-03 8:44 
GeneralRe: ShellExecute and IE Pin
tinkywinky30-Mar-03 9:10
tinkywinky30-Mar-03 9:10 
GeneralMFC and dynamic button Pin
Sztahoo28-Mar-03 23:00
Sztahoo28-Mar-03 23:00 
GeneralRe: MFC and dynamic button Pin
Brian Shifrin29-Mar-03 2:41
Brian Shifrin29-Mar-03 2:41 
GeneralRe: MFC and dynamic button Pin
Bartosz Bien29-Mar-03 11:12
Bartosz Bien29-Mar-03 11:12 
GeneralSubclass dialog item Pin
John-theKing28-Mar-03 22:33
John-theKing28-Mar-03 22:33 
GeneralRe: Subclass dialog item Pin
PJ Arends29-Mar-03 9:42
professionalPJ Arends29-Mar-03 9:42 
Generaloverloading operators..Plesae help Pin
Tozilla28-Mar-03 21:44
Tozilla28-Mar-03 21:44 
GeneralRe: overloading operators..Plesae help Pin
PJ Arends29-Mar-03 10:51
professionalPJ Arends29-Mar-03 10:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.