Solved

Check if chosed printer do color

Posted on 1998-08-06
3
251 Views
Last Modified: 2013-11-19
Hi folks,

I would like to check if the chosed printer in the print dialog box is set on
color or not. It the printer dont support color, it is not. It it supports color,
it can be set to grayscale or color. I have tried with DEVMODE / dmColor,
but I think I am doing wrong. Please tell me what parameter I should check.

Thanks in advance, Tomas
0
Comment
Question by:tko092397
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Arkadiy earned 100 total points
Comment Utility
GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS worked for me when I needed to distinguish btw real color and monochrome prnters. I am not sure how to detect grayscaling, try
GetDeviceCaps(dc, BITSPIXEL) == 1
or
GetDeviceCaps(dc, PLANES) == 1
when you look for monochrome printer that does not support grayscale

0
 

Author Comment

by:tko092397
Comment Utility
Thanx. Exellent.
0
 
LVL 1

Expert Comment

by:Arkadiy
Comment Utility
The condition in the answer should look as follows:

GetDeviceCaps(dc, NUMCOLORS) > 2 || GetDeviceCaps(dc, NUMCOLORS) < 0
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

5 Experts available now in Live!

Get 1:1 Help Now