Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do I... Pin
Christian Graus18-Nov-04 10:15
protectorChristian Graus18-Nov-04 10:15 
GeneralRe: How do I... Pin
David Crow16-Nov-04 2:36
David Crow16-Nov-04 2:36 
GeneralRe: How do I... Pin
Christian Graus16-Nov-04 8:14
protectorChristian Graus16-Nov-04 8:14 
GeneralCalling a member function Pin
Howard789015-Nov-04 9:15
Howard789015-Nov-04 9:15 
GeneralRe: Calling a member function Pin
Christian Graus15-Nov-04 9:34
protectorChristian Graus15-Nov-04 9:34 
GeneralRe: Calling a member function Pin
Budric B.15-Nov-04 9:37
Budric B.15-Nov-04 9:37 
GeneralRe: Calling a member function Pin
John M. Drescher15-Nov-04 9:39
John M. Drescher15-Nov-04 9:39 
GeneralRe: Calling a member function Pin
Howard789015-Nov-04 15:12
Howard789015-Nov-04 15:12 
I have a main class Dialog1.cpp:

That instantiats the diolog class:
CDialog1Dlg dlg;
dlgptr = &dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();

I then have a dialog class called Dialog1Dlg.cpp. This class has the functions I wish to call.
I have removed the static from the read data function.
I have these functions:

char GetDataOut()
{
char Data;
if (Start == End)
return 0;
Data = strData[Start];
if (++Start >= Max)Start = 0;
return Data;
}

void PutDataIn(char X)
{
int TEnd = End;
if(++TEnd >= Max) TEnd = 0;
if(TEnd != Start)
strData[End] = X;
End = TEnd;
}

void DataRead(void)
{
char a;
while (1)
{
a=0;
Status = ReadFile (hnd, &a, 1,&rCount, NULL);
if (Status && rCount > 0)
{
if (a)
{
if (a == 13)
{
PutDataIn('\r');
PutDataIn('\n');
}
else
PutDataIn(a);
dlg.PutCh(); <--- this is undefined
}
}
Sleep(1);
}

}
DataRead is a thread that I spawn at init.
I have tried to create a new object of the same type but UpdatData(FALSE) gives me a runtime error.
I know I am not doing something, I just do not know what.
Any ideas?
Thanks,
GeneralRe: Calling a member function Pin
John M. Drescher16-Nov-04 6:02
John M. Drescher16-Nov-04 6:02 
GeneralRe: Calling a member function Pin
Howard789016-Nov-04 14:40
Howard789016-Nov-04 14:40 
QuestionSDI Project-Clicking Enter Causes Modeless Dialogs to Close?? Pin
jerry1211a15-Nov-04 9:08
jerry1211a15-Nov-04 9:08 
AnswerRe: SDI Project-Clicking Enter Causes Modeless Dialogs to Close?? Pin
David Crow15-Nov-04 10:58
David Crow15-Nov-04 10:58 
GeneralRe: SDI Project-Clicking Enter Causes Modeless Dialogs to Close?? Pin
jerry1211a15-Nov-04 11:27
jerry1211a15-Nov-04 11:27 
Generalwant icons in subitems of listview, but not first column Pin
BlackDice15-Nov-04 9:05
BlackDice15-Nov-04 9:05 
GeneralRe: want icons in subitems of listview, but not first column Pin
Ryan Binns15-Nov-04 17:05
Ryan Binns15-Nov-04 17:05 
GeneralWriting Ogg Vorbis Comments Pin
Summi15-Nov-04 8:19
Summi15-Nov-04 8:19 
GeneralRe: Writing Ogg Vorbis Comments Pin
DaFrawg15-Nov-04 21:07
DaFrawg15-Nov-04 21:07 
GeneralRe: Writing Ogg Vorbis Comments Pin
Summi16-Nov-04 1:09
Summi16-Nov-04 1:09 
GeneralRe: Writing Ogg Vorbis Comments Pin
Henry miller16-Nov-04 2:31
Henry miller16-Nov-04 2:31 
Generalweb server Pin
ppp00115-Nov-04 8:05
ppp00115-Nov-04 8:05 
GeneralRe: web server Pin
Timothy Grabrian15-Nov-04 8:36
professionalTimothy Grabrian15-Nov-04 8:36 
GeneralRe: web server Pin
Ryan Binns15-Nov-04 17:11
Ryan Binns15-Nov-04 17:11 
Generalsave bitmap into file Pin
Anonymous15-Nov-04 7:56
Anonymous15-Nov-04 7:56 
GeneralRe: save bitmap into file Pin
ThatsAlok15-Nov-04 23:24
ThatsAlok15-Nov-04 23:24 
Generalwrite function writing more than one byte Pin
dkel352115-Nov-04 7:27
dkel352115-Nov-04 7:27 

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.