Thread: Dialog ?

  1. #1
    Registered User
    Join Date
    Sep 2001

    Dialog ?

    Is there anyway(function) to print a dialog on a printer?

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    you can use bitblit the screen to just where yor dialog is, then bitblit that to the printer...
    Last edited by -KEN-; 10-09-2001 at 03:02 PM.

  3. #3
    Former Member
    Join Date
    Oct 2001
    I didn't knew you could do that..

    How do you get the printer's DC?
    What if you have multiple printers?


  4. #4
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    You use EnumPrinters() to get the device names and then use one of these device names in a call to CreateDC().

  5. #5
    train spotter
    Join Date
    Aug 2001
    near a computer
    I found
    GetProfileString("windows", "device", (LPCTSTR) &szOutputBuffer,(LPTSTR) &szOutputString, 255);
    hdc = CreateDC ("WINSPOOL", szOutputString, NULL, NULL) ;

    works better under NT/2000 sysyems. We have a printer that has a long name and gets truncated under WIN98 using EnumPrinters().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. Edit controls of a dialog from another dialog...
    By Snake in forum Windows Programming
    Replies: 9
    Last Post: 07-01-2005, 02:18 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  4. Getting the position of a dialog without parent on the screen
    By stormbringer in forum Windows Programming
    Replies: 1
    Last Post: 08-27-2003, 02:59 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM