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

C / C++ / MFC

 
GeneralRe: how to show dynamic values in the clistctrl Pin
manoharbalu26-May-10 2:05
manoharbalu26-May-10 2:05 
GeneralRe: how to show dynamic values in the clistctrl Pin
Code-o-mat26-May-10 2:27
Code-o-mat26-May-10 2:27 
GeneralRe: how to show dynamic values in the clistctrl Pin
manoharbalu26-May-10 3:00
manoharbalu26-May-10 3:00 
GeneralRe: how to show dynamic values in the clistctrl Pin
Code-o-mat26-May-10 3:07
Code-o-mat26-May-10 3:07 
QuestionRe: how to show dynamic values in the clistctrl Pin
David Crow26-May-10 3:08
David Crow26-May-10 3:08 
QuestionCStatic as Text and Float Pin
Anu_Bala26-May-10 0:16
Anu_Bala26-May-10 0:16 
AnswerRe: CStatic as Text and Float Pin
Maximilien26-May-10 0:44
Maximilien26-May-10 0:44 
AnswerRe: CStatic as Text and Float Pin
Aescleal26-May-10 1:14
Aescleal26-May-10 1:14 
The first assumption I'm going to make is that that block of code is in your DoDataExchange implementation. Would something a bit simpler work?

if( oTagBase->GetTagType()==CONT )
{
    DDX_Text( pDX, IDC_PVVAL, m_fPV );
}
else if( oTagBase->GetTagType() == SWITCH )
{
    CString text( "OPEN" );
    DDX_Text( pDX, IDC_PVAL, text );
}


The advantage of this is it keeps everything consistent - you're only using one mechanism to exchange data between the edit control and the members of the dialogue box. And it removes the need to subclass anything.

[Another thing you could do is to move the comparisons into whatever class oTagBase belongs to, then you could write something like:

if( oTagBase->finite_resistance() )
{
    DDX_Text( pDX, IDC_PVVAL, m_fPV );
}
else if( oTagBase->infinite_resistance() )
{
    CString text( "OPEN" );
    DDX_Text( pDX, IDC_PVAL, text );
}


]

Cheers,

Ash
Questionimage crop Pin
john563225-May-10 23:08
john563225-May-10 23:08 
AnswerRe: image crop Pin
Richard MacCutchan26-May-10 1:50
mveRichard MacCutchan26-May-10 1:50 
Questionwhere to keep textture file in open gl Pin
nearest25-May-10 22:53
nearest25-May-10 22:53 
AnswerRe: where to keep textture file in open gl Pin
Cedric Moonen25-May-10 22:59
Cedric Moonen25-May-10 22:59 
QuestionRetrieve User Details Pin
gothic_coder25-May-10 21:16
gothic_coder25-May-10 21:16 
QuestionRe: Retrieve User Details Pin
David Crow26-May-10 3:10
David Crow26-May-10 3:10 
AnswerRe: Retrieve User Details Pin
gothic_coder26-May-10 3:15
gothic_coder26-May-10 3:15 
Questionneed help regarding Activex control property pages Pin
Sreenivas00325-May-10 21:06
Sreenivas00325-May-10 21:06 
Questionevent for windowless Pin
zon_cpp25-May-10 20:56
zon_cpp25-May-10 20:56 
AnswerRe: event for windowless Pin
KarstenK25-May-10 21:12
mveKarstenK25-May-10 21:12 
QuestionHooking a process creation event Pin
Rajmohan SK25-May-10 19:36
Rajmohan SK25-May-10 19:36 
AnswerRe: Hooking a process creation event Pin
Garth J Lancaster25-May-10 20:40
professionalGarth J Lancaster25-May-10 20:40 
GeneralRe: Hooking a process creation event Pin
Rajmohan SK25-May-10 21:08
Rajmohan SK25-May-10 21:08 
Questionc++ combo box: how to retrieve value selected in a combo box Pin
mrby12325-May-10 18:49
mrby12325-May-10 18:49 
AnswerRe: c++ combo box: how to retrieve value selected in a combo box Pin
KingsGambit25-May-10 19:34
KingsGambit25-May-10 19:34 
AnswerRe: c++ combo box: how to retrieve value selected in a combo box Pin
Sakhalean25-May-10 19:58
Sakhalean25-May-10 19:58 
QuestionOne question about size of empty class... Pin
asadullah ansari25-May-10 16:53
asadullah ansari25-May-10 16: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.