Click here to Skip to main content
15,914,225 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to display unicode without unicode built? Pin
Peter, Chan10-Jul-07 21:21
Peter, Chan10-Jul-07 21:21 
GeneralRe: how to display unicode without unicode built? Pin
Stephen Hewitt10-Jul-07 21:30
Stephen Hewitt10-Jul-07 21:30 
GeneralRe: how to display unicode without unicode built? Pin
Rajesh R Subramanian10-Jul-07 22:34
professionalRajesh R Subramanian10-Jul-07 22:34 
AnswerRe: how to display unicode without unicode built? Pin
khan++10-Jul-07 21:29
khan++10-Jul-07 21:29 
GeneralRe: how to display unicode without unicode built? Pin
Peter, Chan10-Jul-07 21:35
Peter, Chan10-Jul-07 21:35 
GeneralRe: how to display unicode without unicode built? Pin
Stephen Hewitt10-Jul-07 21:47
Stephen Hewitt10-Jul-07 21:47 
AnswerRe: how to display unicode without unicode built? Pin
KarstenK10-Jul-07 21:44
mveKarstenK10-Jul-07 21:44 
QuestionWhile Looping problem Pin
Anu_Bala10-Jul-07 20:48
Anu_Bala10-Jul-07 20:48 
Hi,in my coding i have this FOR lop in OnDraw(),i have to calculate Average Value for like 2mins.

THis is my function..I use While Loop..But the control it does not exit form the loop.The coding get hanged at one time.I dont know why it occurs.When debugging it continously running(i think the fucntion call is in OnDraw())..
The value that i have to calculate is not one time value.Its continously changing value i have to calculate the average for first 2 mins and 1 hour like that.Thats why i have that function in OnDraw().I dont know where the mistake is.Pls help me out
/////
for(int i=0;i<4;i++)
{
DrawAvgValues(pScreenDC,i,iGroupIndex[i]);
}
/////
void CHourAvgView::DrawAvgValues(CDC *pMemDc,int pos, int INDEX)
{
float TotalPV =0.00;
float AvgPV = 0.00;
float PV;
int nMinute = (CTime::GetCurrentTime ()).GetMinute();
int nHour = (CTime::GetCurrentTime ()).GetHour();
int Time = nMinute+ (nHour*60);
int TtlTime = Time+2;
SLiveTagData oLiveTagData;
CTagBase *pTageBase;
while(Time<=TtlTime)
{
int nowMin = (CTime::GetCurrentTime ()).GetMinute();
int nowHour = (CTime::GetCurrentTime ()).GetHour();
int nowTime = nowMin+(nowHour*60);
if(nowTime ==Time)
{
POSITION position= goLiveList.FindIndex(INDEX);
if(position)
{
pTageBase = (CTagBase*)goLiveList.GetAt(position);
switch(pTageBase->GetTagType())
{
case CONTROLLER:
{

PV = oLiveTagData.PV;
TotalPV = TotalPV+PV;
break;
}
case INDICATOR:
{
PV = oLiveTagData.PV;
TotalPV = TotalPV+PV;
break;
}
default:
break;
}
}
Time=Time+1;
}

}
AvgPV = TotalPV/2;
int spos = ESimSetDM.dmPelsWidth/10;
x = (spos) * (pos +1);
y= (ESimSetDM.dmPelsHeight/2)+200;
char Avg[10];
sprintf(Avg, "%06.2f", AvgPV );
pScreenDC->SetTextColor(RGB(255,255,255));
pScreenDC->TextOut(x,y,Avg);
}




Anu

AnswerRe: While Looping problem Pin
Cedric Moonen10-Jul-07 21:02
Cedric Moonen10-Jul-07 21:02 
AnswerRe: While Looping problem Pin
David Crow11-Jul-07 3:23
David Crow11-Jul-07 3:23 
QuestionWaiting... Pin
Abhijeet Pathak10-Jul-07 20:32
Abhijeet Pathak10-Jul-07 20:32 
AnswerRe: Waiting... Pin
baerten10-Jul-07 21:13
baerten10-Jul-07 21:13 
AnswerRe: Waiting... Pin
Hans Dietrich11-Jul-07 3:37
mentorHans Dietrich11-Jul-07 3:37 
GeneralRe: Waiting... Pin
Abhijeet Pathak11-Jul-07 5:46
Abhijeet Pathak11-Jul-07 5:46 
Questionworker and UI thread? [modified] Pin
murali_utr10-Jul-07 20:17
murali_utr10-Jul-07 20:17 
AnswerRe: worker and UI thread? Pin
Cedric Moonen10-Jul-07 21:10
Cedric Moonen10-Jul-07 21:10 
AnswerRe: worker and UI thread? Pin
eraccn10-Jul-07 22:20
eraccn10-Jul-07 22:20 
GeneralRe: worker and UI thread? Pin
Cedric Moonen10-Jul-07 22:30
Cedric Moonen10-Jul-07 22:30 
GeneralRe: worker and UI thread? Pin
eraccn10-Jul-07 22:37
eraccn10-Jul-07 22:37 
GeneralRe: worker and UI thread? Pin
Cedric Moonen10-Jul-07 22:43
Cedric Moonen10-Jul-07 22:43 
AnswerRe: worker and UI thread? Pin
SandipG 11-Jul-07 1:28
SandipG 11-Jul-07 1:28 
AnswerRe: worker and UI thread? Pin
Mark Salsbery11-Jul-07 10:13
Mark Salsbery11-Jul-07 10:13 
QuestionRun Video on web page Pin
Maynka10-Jul-07 19:38
Maynka10-Jul-07 19:38 
AnswerRe: Run Video on web page Pin
_AnsHUMAN_ 10-Jul-07 19:46
_AnsHUMAN_ 10-Jul-07 19:46 
AnswerRe: Run Video on web page Pin
eraccn10-Jul-07 22:22
eraccn10-Jul-07 22:22 

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.