Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Richard MacCutchan10-Oct-11 10:34
mveRichard MacCutchan10-Oct-11 10:34 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Code-o-mat10-Oct-11 22:06
Code-o-mat10-Oct-11 22:06 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Code-o-mat10-Oct-11 23:15
Code-o-mat10-Oct-11 23:15 
AnswerRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Randor 10-Oct-11 12:26
professional Randor 10-Oct-11 12:26 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Code-o-mat10-Oct-11 22:03
Code-o-mat10-Oct-11 22:03 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Randor 11-Oct-11 17:01
professional Randor 11-Oct-11 17:01 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Code-o-mat10-Oct-11 23:09
Code-o-mat10-Oct-11 23:09 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Randor 11-Oct-11 17:35
professional Randor 11-Oct-11 17:35 
Code-o-mat,

The author of the printer driver reports the device capabilities. And because everyone's cousin and grandma is a software engineer these days... using software is like a box of chocolates... you never know what your gonna get.

Code-o-mat wrote:
Another question came up, if a printer device reports blit support (RASTERCAPS -> RC_BITBLT), does that mean you can also blit from the device or only that you can blit to it?


Bit-block transfers are suppose to be a two-way street. When you call BitBlt on a printer device context... the win32 subsystem performs some internal magic and then end up calling the printer drivers DrvBitBlt function[^]. If the device driver does not implement DrvBitBlt... it uses the default EngBitBlt function[^] (This is what the Gdi32 BitBlt uses via SYSCALL... it forwards to win32k.sys!NtGdiEngBitBlt)

Come to think of it... this is probably why some of the virtual printer drivers you are testing support alpha blending... the driver probably does not implement DrvAlphaBlend [^]so it ends up calling the EngAlphaBlend function[^].

Maybe you should consider giving your employer or users the option of using an open-source virtual printer such as Virtual Image Printer[^]. At least you would have some consistency.

I've been through similar battles with virtual USB, virtual serial and virtual printer drivers. I am very happy that Microsoft is forcing x64 device drivers to be signed. Unfortunately user-mode printer drivers are still a crapshoot.

Best Wishes,
-David Delaune
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Code-o-mat12-Oct-11 0:43
Code-o-mat12-Oct-11 0:43 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
arnoudmulder12-Nov-18 7:07
arnoudmulder12-Nov-18 7:07 
GeneralRe: CDC::GetDeviceCaps, how to know if AlphaBlend is supported or not? Pin
Randor 22-Nov-18 19:23
professional Randor 22-Nov-18 19:23 
GeneralGetting ProcessID from CoCreateInstance Pin
Rajesh_Parameswaran10-Oct-11 6:13
Rajesh_Parameswaran10-Oct-11 6:13 
GeneralRe: not possible Pin
App_10-Oct-11 7:06
App_10-Oct-11 7:06 
GeneralRe: not possible Pin
TheGreatAndPowerfulOz10-Oct-11 7:52
TheGreatAndPowerfulOz10-Oct-11 7:52 
AnswerRe: Getting ProcessID from CoCreateInstance Pin
TheGreatAndPowerfulOz10-Oct-11 7:50
TheGreatAndPowerfulOz10-Oct-11 7:50 
QuestionVisual C++ label font changes after unlock Pin
chandu_vrs10-Oct-11 2:55
chandu_vrs10-Oct-11 2:55 
AnswerRe: Visual C++ label font changes after unlock Pin
Code-o-mat10-Oct-11 8:29
Code-o-mat10-Oct-11 8:29 
QuestionIs correct lpszString = lpszStringInit ? Pin
_Flaviu9-Oct-11 22:31
_Flaviu9-Oct-11 22:31 
AnswerRe: Is correct lpszString = lpszStringInit ? Pin
john56329-Oct-11 23:37
john56329-Oct-11 23:37 
GeneralRe: Is correct lpszString = lpszStringInit ? Pin
_Flaviu9-Oct-11 23:44
_Flaviu9-Oct-11 23:44 
GeneralRe: Is correct lpszString = lpszStringInit ? Pin
_Flaviu9-Oct-11 23:47
_Flaviu9-Oct-11 23:47 
AnswerRe: Is correct lpszString = lpszStringInit ? Pin
Chandrasekharan P10-Oct-11 0:12
Chandrasekharan P10-Oct-11 0:12 
GeneralRe: Is correct lpszString = lpszStringInit ? Pin
_Flaviu10-Oct-11 0:17
_Flaviu10-Oct-11 0:17 
AnswerRe: Is correct lpszString = lpszStringInit ? Pin
_AnsHUMAN_ 10-Oct-11 1:36
_AnsHUMAN_ 10-Oct-11 1:36 
GeneralRe: may i also add Pin
App_10-Oct-11 7:12
App_10-Oct-11 7:12 

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.