Click here to Skip to main content
15,910,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to do a dos-like thing in MFC prog Pin
David Crow10-Sep-03 9:46
David Crow10-Sep-03 9:46 
AnswerRe: how to do a dos-like thing in MFC prog Pin
Jagadeesh VN10-Sep-03 9:48
Jagadeesh VN10-Sep-03 9:48 
GeneralThanks to you both!!! Pin
ns10-Sep-03 9:55
ns10-Sep-03 9:55 
GeneralRe: Thanks to you both!!! Pin
Ravi Bhavnani10-Sep-03 10:57
professionalRavi Bhavnani10-Sep-03 10:57 
GeneralA simple question from a beginner Pin
xatanu10-Sep-03 9:25
xatanu10-Sep-03 9:25 
GeneralRe: A simple question from a beginner Pin
David Crow10-Sep-03 9:48
David Crow10-Sep-03 9:48 
GeneralRe: A simple question from a beginner Pin
xatanu11-Sep-03 7:36
xatanu11-Sep-03 7:36 
GeneralGDI Portability Pin
Larry J. Siddens10-Sep-03 8:55
Larry J. Siddens10-Sep-03 8:55 
Alright you guru's. I have a question for ya. I have a test application that at first I set all the GDI objects (boxes, Rich Edit control, and lines) using the MM_TEXT (display locations). I found out what a logical inch was (Using MM_TWIPS at 1440x1440) and converted that to display for the current display and printer. On my main system the conversion from LPtoDP returned 102x108 and for the printer 1201x1204. When I copied the application to a different OS (using VMWARE), with the resolution set to 1024x768 and doing the same thing, it returned either 81x81 (or 96x96) and the printer varried by 1 or 2 (probably due to rounding). When I would print using the display locations, I wanted the boxes to be 1inch x 3inch and 1inch x 7 inches. The print outs as I expected were not 1x3 or 1x7 or even close. Using the Logical units they were pretty close!


Next I tried switching all the values to TWIPS and then converting the TWIPS to display units to create the controls. On my main system, it looked darn good. On the VMWARE Os, the output looked different.

What I need is several fold.


  1. Am I correct in saving the logical (TWIPS) values and using LPtoDP to convert to display units to create the controls?
  2. Is my assmption correct in saying that 1440x1440 converting to LPtoDP gives the correct DPI for one inch the way the display is configured?
  3. What are the traps that I maybe falling into and how do I avoid them. Device independent drawing.


Thanks

Larry J. Siddens
Cornerstone Communications

TAME THE DOCUMENT MONSTER
www.unifier.biz
GeneralRe: GDI Portability Pin
Larry J. Siddens10-Sep-03 10:56
Larry J. Siddens10-Sep-03 10:56 
GeneralPrint Screen Buttton Pin
Mazdak10-Sep-03 8:24
Mazdak10-Sep-03 8:24 
GeneralRe: Print Screen Buttton Pin
David Crow10-Sep-03 9:51
David Crow10-Sep-03 9:51 
GeneralRe: Print Screen Buttton Pin
Mazdak10-Sep-03 21:56
Mazdak10-Sep-03 21:56 
GeneralRe: Print Screen Buttton Pin
David Crow11-Sep-03 2:28
David Crow11-Sep-03 2:28 
GeneralScrollable CDialog Pin
Anonymous10-Sep-03 7:29
Anonymous10-Sep-03 7:29 
GeneralRe: Scrollable CDialog Pin
Maximilien10-Sep-03 7:42
Maximilien10-Sep-03 7:42 
GeneralRe: Scrollable CDialog Pin
Alvaro Mendez10-Sep-03 8:04
Alvaro Mendez10-Sep-03 8:04 
GeneralRe: Scrollable CDialog Pin
Anonymous10-Sep-03 8:29
Anonymous10-Sep-03 8:29 
GeneralRe: Scrollable CDialog Pin
l a u r e n10-Sep-03 8:31
l a u r e n10-Sep-03 8:31 
GeneralRe: Scrollable CDialog Pin
Jagadeesh VN10-Sep-03 9:59
Jagadeesh VN10-Sep-03 9:59 
GeneralRe: Scrollable CDialog Pin
Maximilien10-Sep-03 10:20
Maximilien10-Sep-03 10:20 
GeneralCFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 7:03
Jamie Hale10-Sep-03 7:03 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 7:23
David Crow10-Sep-03 7:23 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 7:32
Jamie Hale10-Sep-03 7:32 
GeneralRe: CFile::GetFilePath() setting error Pin
David Crow10-Sep-03 7:47
David Crow10-Sep-03 7:47 
GeneralRe: CFile::GetFilePath() setting error Pin
Jamie Hale10-Sep-03 7:53
Jamie Hale10-Sep-03 7:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.