Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Single document in MDI Pin
Tomasz Sowinski4-Jun-02 6:13
Tomasz Sowinski4-Jun-02 6:13 
GeneralRe: Single document in MDI Pin
Haakon S.4-Jun-02 6:26
Haakon S.4-Jun-02 6:26 
GeneralRe: Single document in MDI Pin
Tomasz Sowinski4-Jun-02 6:27
Tomasz Sowinski4-Jun-02 6:27 
GeneralRe: Single document in MDI Pin
Haakon S.4-Jun-02 7:38
Haakon S.4-Jun-02 7:38 
GeneralRe: Single document in MDI Pin
Tomasz Sowinski4-Jun-02 23:32
Tomasz Sowinski4-Jun-02 23:32 
GeneralRe: Single document in MDI Pin
Ed Gadziemski4-Jun-02 14:52
professionalEd Gadziemski4-Jun-02 14:52 
GeneralEdit box with units Pin
Ali Asi4-Jun-02 5:56
Ali Asi4-Jun-02 5:56 
GeneralRe: Edit box with units Pin
Haakon S.4-Jun-02 8:46
Haakon S.4-Jun-02 8:46 
I am using a system doing exactly what you are asking for.

1. First, you establish a vector of UINT's where the user enters all preferences. For example, length is put in m_UnitVector[2].

2. Secondly, you establish the options in a pairs of const char* and conversion factors:

const char* CUnit::m_Length[]={" [m]"," [ft]"," [mm]"," [in]",NULL};
const float CUnit::m_fLength[]={1.0F,3.280839F,1000.0F,39.37008F};

Here, length is stored in meters as the base unit.

3. In your edit box showing the unit you enter m_unit.m_Length[m_UnitVector[2]], in the box showing the number you show m_fMyLength*m_unit.m_fLength[m_UnitVector[2]]. Of course, when you go the other way with UpdateData(TRUE), you divide instead of multiply.

Hope you can make use of this.

Regards, Haakon S.


GeneralResource ID's at runtime Pin
Aaron Schaefer4-Jun-02 5:39
Aaron Schaefer4-Jun-02 5:39 
GeneralRe: Resource ID's at runtime Pin
Joaquín M López Muñoz4-Jun-02 6:23
Joaquín M López Muñoz4-Jun-02 6:23 
GeneralRe: Resource ID's at runtime Pin
Aaron Schaefer4-Jun-02 6:22
Aaron Schaefer4-Jun-02 6:22 
Generalstepping over api calls causes exceptions Pin
moredip4-Jun-02 5:40
moredip4-Jun-02 5:40 
GeneralRe: stepping over api calls causes exceptions Pin
dazinith4-Jun-02 5:47
dazinith4-Jun-02 5:47 
GeneralRe: stepping over api calls causes exceptions Pin
moredip4-Jun-02 6:00
moredip4-Jun-02 6:00 
GeneralRe: stepping over api calls causes exceptions Pin
dazinith4-Jun-02 6:07
dazinith4-Jun-02 6:07 
GeneralRe: stepping over api calls causes exceptions Pin
moredip4-Jun-02 6:22
moredip4-Jun-02 6:22 
GeneralRe: stepping over api calls causes exceptions Pin
Rama Krishna Vavilala4-Jun-02 6:25
Rama Krishna Vavilala4-Jun-02 6:25 
GeneralRe: stepping over api calls causes exceptions Pin
Rage4-Jun-02 6:47
professionalRage4-Jun-02 6:47 
GeneralRe: stepping over api calls causes exceptions Pin
moredip4-Jun-02 7:13
moredip4-Jun-02 7:13 
GeneralRe: stepping over api calls causes exceptions Pin
moredip4-Jun-02 7:17
moredip4-Jun-02 7:17 
GeneralRe: stepping over api calls causes exceptions Pin
Rama Krishna Vavilala4-Jun-02 7:33
Rama Krishna Vavilala4-Jun-02 7:33 
GeneralRe: stepping over api calls causes exceptions Pin
moredip4-Jun-02 7:45
moredip4-Jun-02 7:45 
GeneralRe: stepping over api calls causes exceptions Pin
Rama Krishna Vavilala4-Jun-02 7:51
Rama Krishna Vavilala4-Jun-02 7:51 
GeneralRe: stepping over api calls causes exceptions Pin
moredip4-Jun-02 8:06
moredip4-Jun-02 8:06 
GeneralRe: stepping over api calls causes exceptions Pin
Rama Krishna Vavilala4-Jun-02 8:03
Rama Krishna Vavilala4-Jun-02 8:03 

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.