Thread: map mode

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    157

    map mode

    how did you set your map mode? i mean in what standards? what's easiest? or did you just leave yours in pixels?

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    There's a bunch of functions dealing with this. You can look on MSDN for a list but i'll list a few.

    DPtoLP - Device coordinates to logical coordinates
    LPtoDP - Guess
    GetGraphicsMode - Get current mode for dc
    GetMapMode - Get current mapping mode
    SetGraphicsMode - Guess
    SetMapMode - Guess

    There are tons more. Look up any of those functions on MSDN and you can easily get a link to the entire list.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    i guess i asked my question wrong. i do know how to set the map modes, but i was just as to what you personally preferred to use. and by experience, what's the easiest and neatest to work with?

    thanks and sorry for the confusion.

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    I personally just leave them in pixels.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  5. #5
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    yup. thats pretty much what i always did, but when i learned about these functions it seemed like it could make layout design a lot easier. guess not.

    another thing...do you change your viewports?

  6. #6
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    SetViewportOrgEx()
    SetViewportExtEx()
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    again, i know the functions and how to use them, i'm just asking what you personally do. do you change the view ports?

  8. #8
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    I never change the viewport. Again, I don't use GDI all that much. I am usually programming using DirectX API. I'm sure some for some things setting the viewport is ideal.

  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    157
    i'd like to get into dxapi sometime, but it looks really challenging (any harder than winapi?) and i'm really artistic kinda type of guy.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Polynomials and ADT's
    By Emeighty in forum C++ Programming
    Replies: 20
    Last Post: 08-19-2008, 08:32 AM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  3. Creating a map engine.
    By suzakugaiden in forum Game Programming
    Replies: 11
    Last Post: 06-21-2005, 05:06 AM
  4. free() usage
    By pdstatha in forum C Programming
    Replies: 5
    Last Post: 03-13-2002, 09:28 AM
  5. Implementing "ls -al"
    By pdstatha in forum C Programming
    Replies: 7
    Last Post: 03-06-2002, 05:36 PM