CreateDC to get a handle (hdc) for my printer

This is a discussion on CreateDC to get a handle (hdc) for my printer within the C++ Programming forums, part of the General Programming Boards category; how do i use CreateDC to get a handle (hdc) for my printer? CreateDC("Display",NULL,NULL,NULL,NULL) retrieves a handle for the screen. ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    12

    CreateDC to get a handle (hdc) for my printer

    how do i use CreateDC to get a handle (hdc) for my printer?
    CreateDC("Display",NULL,NULL,NULL,NULL) retrieves a handle for the screen.CreateDC

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Use either EnumPrinters() or PrintDlg() to egt the name of the printer.....this will then allow you to obtain a DC using CreateDC()

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My progress.. thnx to Cprogramming forumites
    By csonx_p in forum Windows Programming
    Replies: 6
    Last Post: 05-21-2008, 01:17 AM
  2. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  3. Getting other processes class names
    By Hawkin in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2008, 04:02 PM
  4. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  5. opengl program as win API menu item
    By SAMSAM in forum Game Programming
    Replies: 1
    Last Post: 03-03-2003, 06:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21