Click here to Skip to main content
15,929,356 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can't create class with Capital C Pin
Atul Dharne15-Feb-02 19:05
Atul Dharne15-Feb-02 19:05 
GeneralRe: Can't create class with Capital C Pin
moliate15-Feb-02 19:50
moliate15-Feb-02 19:50 
GeneralRe: Can't create class with Capital C Pin
alex.barylski15-Feb-02 22:28
alex.barylski15-Feb-02 22:28 
GeneralRe: Can't create class with Capital C Pin
Tim Smith16-Feb-02 2:21
Tim Smith16-Feb-02 2:21 
GeneralRe: Can't create class with Capital C Pin
alex.barylski16-Feb-02 11:17
alex.barylski16-Feb-02 11:17 
GeneralRe: Can't create class with Capital C Pin
Michael Dunn16-Feb-02 9:35
sitebuilderMichael Dunn16-Feb-02 9:35 
QuestionPoints to pixels? Pin
15-Feb-02 18:37
suss15-Feb-02 18:37 
AnswerRe: Points to pixels? Pin
Shog915-Feb-02 19:50
sitebuilderShog915-Feb-02 19:50 
explanation in MFC, and from memory. take with large pinch of salt
Given a CDC* pDC, an integer specifying points pt, and another integer specifying centimeters cm:
  1. points to pixels

    • 1pt = 1/72in
    • 1in = 2.54cm
    • 1cm = 1000 HIMETRIC units (HIMETRIC = .01mm)
    • convert HIMETRIC to pixels using pDC->HIMETRICtoDP()
    • so, the conversion would go like this:
      int px = pt*2540/72;
      CSize size(px,px);
      pDC->HIMETRICtoDP(&size);
  2. cm to pixels (explained above already)
    int px = cm*1000;
    CSize size(px,px);
    pDC->HIMETRICtoDP(&size);


*** note: see documentation for HIMETRICtoDP: in MM_TEXT mapping mode, the measurements gained from this only reflect physical measurements when the ratio of logical coordinates to physical coordinates is 1/1. Not sure when this would matter though.

farewell goodnight last one out turn out the lights
Smashing Pumpkins, Tales of a Scorched Earth

QuestionWhere is the Battleaxe Document Explorer? Pin
Paul Selormey15-Feb-02 18:34
Paul Selormey15-Feb-02 18:34 
QuestionHow can I add my own right click menu to a CWebBrowser2 Pin
Julia Larson15-Feb-02 17:29
Julia Larson15-Feb-02 17:29 
AnswerRe: How can I add my own right click menu to a CWebBrowser2 Pin
alex.barylski15-Feb-02 22:38
alex.barylski15-Feb-02 22:38 
QuestionCan I declare a static member in a base class? Pin
nay15-Feb-02 17:04
nay15-Feb-02 17:04 
AnswerRe: Can I declare a static member in a base class? Pin
Atul Dharne15-Feb-02 17:36
Atul Dharne15-Feb-02 17:36 
GeneralRe: Can I declare a static member in a base class? Pin
nay15-Feb-02 17:52
nay15-Feb-02 17:52 
GeneralSaving MFC Source :: C++ Pin
valikac15-Feb-02 15:10
valikac15-Feb-02 15:10 
GeneralRe: Saving MFC Source :: C++ Pin
Nish Nishant15-Feb-02 15:36
sitebuilderNish Nishant15-Feb-02 15:36 
GeneralRe: Saving MFC Source :: C++ Pin
valikac15-Feb-02 15:54
valikac15-Feb-02 15:54 
GeneralRe: Saving MFC Source :: C++ Pin
Rick York15-Feb-02 16:04
mveRick York15-Feb-02 16:04 
GeneralConverting Visual C++ 4.2 to VC++6.0 Pin
LouThePu15-Feb-02 11:29
LouThePu15-Feb-02 11:29 
GeneralRe: Converting Visual C++ 4.2 to VC++6.0 Pin
Alvaro Mendez15-Feb-02 12:31
Alvaro Mendez15-Feb-02 12:31 
GeneralDLL Function in VB Pin
Tim Rymer15-Feb-02 10:18
Tim Rymer15-Feb-02 10:18 
GeneralRe: DLL Function in VB Pin
Paul M Watt15-Feb-02 14:15
mentorPaul M Watt15-Feb-02 14:15 
QuestionDon't get WM_COPY in my class? Pin
15-Feb-02 9:33
suss15-Feb-02 9:33 
AnswerRe: Don't get WM_COPY in my class? Pin
Joaquín M López Muñoz15-Feb-02 9:59
Joaquín M López Muñoz15-Feb-02 9:59 
GeneralRe: Don't get WM_COPY in my class? Pin
15-Feb-02 10:07
suss15-Feb-02 10:07 

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.