Click here to Skip to main content
16,011,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Make Controls Invisible Pin
Masoud Samimi4-Jan-01 6:25
Masoud Samimi4-Jan-01 6:25 
QuestionAlternate CA for NT security? Pin
Jonathan Gilligan3-Jan-01 12:36
Jonathan Gilligan3-Jan-01 12:36 
General2's compliment Pin
Mike Zolna3-Jan-01 10:47
Mike Zolna3-Jan-01 10:47 
GeneralRe: 2's compliment Pin
Michael Dunn3-Jan-01 15:25
sitebuilderMichael Dunn3-Jan-01 15:25 
GeneralRe: 2's compliment Pin
Tim Deveaux4-Jan-01 8:34
Tim Deveaux4-Jan-01 8:34 
QuestionGZIP file compression suggestions? Pin
Josh Knox3-Jan-01 9:30
Josh Knox3-Jan-01 9:30 
AnswerRe: GZIP file compression suggestions? Pin
Jonathan Gilligan3-Jan-01 12:25
Jonathan Gilligan3-Jan-01 12:25 
GeneralGetDeviceCaps, C1_TRANSPARENT, CAPS1 and NEWTRANSPARENT Pin
Marc Richarme3-Jan-01 8:31
Marc Richarme3-Jan-01 8:31 
Ok, with a bit research in MSDN and in the header files, I menaged to collect the following information:

The following code should do easy and fast transparent Blt'ing... BUT as my driver doesn't support (pDC->GetDeviceCaps(CAPS1) & C1_TRANSPARENT) or as there is something wrong with this code, I cannot be sure if it works...

// stuff that _should_ have been defined in some header :-/
#ifndef C1_TRANSPARENT
    #define C1_TRANSPARENT 0x0001
#endif 
#ifndef CAPS1
    #define CAPS1 94
#endif 
#ifndef NEWTRANSPARENT
    #define NEWTRANSPARENT 3
#endif

// save DC
int nSave = pDC->SaveDC();
// check if driver support BitBlt transparentcy
if(pDC->GetDeviceCaps(CAPS1) & C1_TRANSPARENT)
{
	// Special transparency background mode
	pDC->SetBkMode(NEWTRANSPARENT);
	// select transparent color
	pDC->SetBkColor(crTrans);
	// Actual blt is a simple source copy; transparency is automatic.
	pDC->BitBlt(rcDest.left, rcDest.top, rcDest.Width(),
		rcDest.Height(), &imageDC, 0, 0, SRCCOPY);
} else
{
	// if not supported by the driver,
	// do it the normal way
}
pDC->RestoreDC(nSave);


This feature is very well undocumented in MSDN, and C1_TRANSPARENT and CAPS1 isn't even defined in the standard headers!! Suspicious | :suss:

Any suggestions??

Enjoy, Marc
GeneralRe: GetDeviceCaps, C1_TRANSPARENT, CAPS1 and NEWTRANSPARENT Pin
3-Jan-01 10:22
suss3-Jan-01 10:22 
GeneralGetting terminal output in HEX format Pin
3-Jan-01 7:20
suss3-Jan-01 7:20 
GeneralRe: Getting terminal output in HEX format Pin
Tim Deveaux3-Jan-01 10:04
Tim Deveaux3-Jan-01 10:04 
GeneralIf the contents of file modified outside the editor Pin
3-Jan-01 5:10
suss3-Jan-01 5:10 
GeneralWAVEFORMATEX Pin
Roger3-Jan-01 4:58
Roger3-Jan-01 4:58 
GeneralFormatMessage Pin
3-Jan-01 2:33
suss3-Jan-01 2:33 
GeneralRe: FormatMessage Pin
3-Jan-01 4:19
suss3-Jan-01 4:19 
GeneralRe: FormatMessage Pin
3-Jan-01 23:44
suss3-Jan-01 23:44 
QuestionIs this method to get defaullt domain name correct? Pin
3-Jan-01 2:30
suss3-Jan-01 2:30 
GeneralHOWTO : Insert Office Documents into a Dialog base apps Pin
jerry0davis3-Jan-01 1:28
jerry0davis3-Jan-01 1:28 
QuestionAnyone know where I can get a class that plays MP3 via DirectSound ? Pin
Christian Graus2-Jan-01 20:02
protectorChristian Graus2-Jan-01 20:02 
AnswerRe: Anyone know where I can get a class that plays MP3 via DirectSound ? Pin
Erik Funkenbusch3-Jan-01 6:51
Erik Funkenbusch3-Jan-01 6:51 
GeneralRe: Anyone know where I can get a class that plays MP3 via DirectSound ? Pin
Christian Graus3-Jan-01 9:38
protectorChristian Graus3-Jan-01 9:38 
GeneralRe: Anyone know where I can get a class that plays MP3 via DirectSound ? Pin
Erik Funkenbusch3-Jan-01 13:53
Erik Funkenbusch3-Jan-01 13:53 
GeneralHotkeys and threads Pin
Tanya2-Jan-01 18:45
Tanya2-Jan-01 18:45 
GeneralLow level database routines for win32 (not DB classes) Pin
2-Jan-01 7:49
suss2-Jan-01 7:49 
GeneralAnimateWindow() does not work Pin
2-Jan-01 7:04
suss2-Jan-01 7:04 

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.