CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2001
    Location
    Czech Republic
    Posts
    78

    Setting DC resolution

    Hi, I would like to create a screen device context with a specific resolution, say 300 dpi (I don't know if I am using the correct words, I just want the GetDeviceCaps( hDC, LOGPIXELSX ) method to return a value of 300). Is there a way to achieve? I read the particular resolution from the printer settings, but I can't directly use the printer DC, because I am subsequently creating a memory DC compatible with the original one and if the original is a printer DC, it causes some problems.

    Any ideas?

    Thanks in advance.

  2. #2
    Join Date
    Jun 2005
    Posts
    1,255

    Smile Re: Setting DC resolution

    The resolution is a characteristic of a device, but it is not a parameter of a display context. Read a book about graphics under Windows, or see http://msdn2.microsoft.com/en-us/library/ms534859.aspx .

    The resolution cannot be changed with an alteration of a DC. It can be changed (if I'm not wrong) by a call to a function of the device driver of your video card or your printer.

    See also http://www.codeproject.com/gdi/screenresolution.asp
    Last edited by olivthill; October 9th, 2007 at 07:44 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured