Solved

Transparent bitmap

Posted on 1997-04-03
6
399 Views
Last Modified: 2013-12-03
Hi,

I am trying to blit transparent DIB to memory DC of PostScript driver.
No luck yet.

I have seen references to

 bTransSupport = (GetDeviceCaps(hDC, CAPS1) & C1_TRANSPARENT) ? TRUE :
FALSE;

but can't find definitions of CAPS1 & C1_TRANSPARENT.

Does smb know smth about it?

Thank you very much,
Gary Vernikov
gvernikov@documagix.com

P.S.: Pls, make a note that I am asking about Postscript Driver DC. Only. Win32. Only. All the rest doesn't seem to be a problem.

I do have MSDN and checked all stuff there.
0
Comment
Question by:garyv
  • 3
  • 3
6 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1334358
If bTransSupport is TRUE, that means you can transparent bitblt that uses the current background color of the DC as the transparent color.

if (GetDeviceCaps(hdcD, CAPS1) & C1_TRANSPARENT)
    {
        WORD w;
        w = SetBkMode(hdcD, TRANSPARENT1);
        f = BitBlt(hdcD,x,y,dx,dy,hdcS,x0,y0,SRCCOPY);
        SetBkMode(hdcD, w);
    }

But you are trying to blit transparent DIB. There are some examples on the Microsoft JumpStart 2.0 CD-ROM/Latestuf/Dibfx. If you cannot get it, let me know, I can send it to you by E-Mail.

0
 

Author Comment

by:garyv
ID: 1334359
Edited text of question
0
 
LVL 23

Expert Comment

by:chensu
ID: 1334360
Since Win32 is a device independent platform, Postscript Driver DC should behave like other DCs.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:garyv
ID: 1334361
But all DCs have their own characteristics... Try to print transparent bitmap on Postscript and U'll see what I mean.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1334362
If you cannot print transparent bitmap on Postscript DC, you can do it on a general DC and bitblt it to Postscript DC. C1_TRANSPARENT is not defined in Win32.

0
 

Author Comment

by:garyv
ID: 1334363
Just looks like Postscript doesn't support transparency
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use Dotfuscator CE with Visual Studio 2010 Installer? 4 354
Vb.Net Loading Word 11 107
What is UAC Virtualization in the Process (TASK) Manager? 4 3,825
Why use this lambda? 12 60
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question