Click here to Skip to main content
15,913,221 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using SpinButtonCtrl Pin
bneacetp1-Jul-04 20:35
bneacetp1-Jul-04 20:35 
QuestionHow to find location of Button? Pin
Rajesh_K_Sharma30-Jun-04 18:56
Rajesh_K_Sharma30-Jun-04 18:56 
AnswerRe: How to find location of Button? Pin
Neville Franks30-Jun-04 23:54
Neville Franks30-Jun-04 23:54 
AnswerRe: How to find location of Button? Pin
Antony M Kancidrowski1-Jul-04 0:00
Antony M Kancidrowski1-Jul-04 0:00 
Questionare dialog boxes the way to go? Pin
AmericanBacon30-Jun-04 18:47
AmericanBacon30-Jun-04 18:47 
AnswerRe: are dialog boxes the way to go? Pin
Steve Mayfield30-Jun-04 19:02
Steve Mayfield30-Jun-04 19:02 
AnswerRe: are dialog boxes the way to go? Pin
palbano1-Jul-04 4:52
palbano1-Jul-04 4:52 
QuestionHow to insert Borland C++ program into a MFC thread? Pin
Einly30-Jun-04 17:49
Einly30-Jun-04 17:49 
Dear all,

I am using mfc thread to acquire data from usb port and do signal processing. My signal processing program is written in Borland C++. Since my processing & classification program involves a few of submodules, I would not want to insert it in the thread. Instead I would like to call it from the thread, e.g. processing().

Below is my MFC thread:

UINT Process(LPVOID pParam2)
{
DWORD ExitCode;
int Code=1;

if(status==0)
{
myWinThread = AfxBeginThread(SendOpThread, &Code,
THREAD_PRIORITY_HIGHEST,0,CREATE_SUSPENDED);
myWinThread->m_bAutoDelete=FALSE;
myWinThread->ResumeThread();
status=1;
}

ExitCode=STILL_ACTIVE;

while(ExitCode==STILL_ACTIVE)
{
::GetExitCodeThread(myWinThread->m_hThread,&ExitCode);
}

for (int i=0; i<1024;i++)
{
j=i/4;
k=i%4;
channel[k][j]=r_Buffer[i];
}
delete myWinThread;

myWinThread = AfxBeginThread(SendOpThread, &Code,
THREAD_PRIORITY_HIGHEST,0,CREATE_SUSPENDED);
myWinThread->m_bAutoDelete=FALSE;
myWinThread->ResumeThread();

//signal processing occurs here

return(1);
}

Below is an example structure of my processing program:

#include <stdio.h>
#include <conio.h>

int i;

void Read();
void Save();

int main()
{
}

void Read()
{
}

void Save()
{
}

Can I use Callback routine? I came across some examples that uses this. What is it actually doing? Will my thread routine (UINT Thread) wait for the processing program to finish processing before execute the next line if I use call back function for the processing program? Any other better way of doin this?

Any examples that call other module from a thread?


Thanks a lot

Einly
AnswerRe: How to insert Borland C++ program into a MFC thread? Pin
valikac1-Jul-04 11:30
valikac1-Jul-04 11:30 
GeneralNeed help w/ a simple recursive function Pin
georgiek5030-Jun-04 17:29
georgiek5030-Jun-04 17:29 
GeneralRe: Need help w/ a simple recursive function Pin
georgiek5030-Jun-04 17:39
georgiek5030-Jun-04 17:39 
GeneralRe: Need help w/ a simple recursive function Pin
David Crow22-Jul-04 2:49
David Crow22-Jul-04 2:49 
GeneralDisplay high-resolution bitmap.. Pin
Chauhan Chirag30-Jun-04 17:08
Chauhan Chirag30-Jun-04 17:08 
GeneralRe: Display high-resolution bitmap.. Pin
Johan Rosengren30-Jun-04 20:14
Johan Rosengren30-Jun-04 20:14 
GeneralWindow Repaint problem Pin
Chauhan Chirag30-Jun-04 17:02
Chauhan Chirag30-Jun-04 17:02 
GeneralRe: Window Repaint problem Pin
Johan Rosengren30-Jun-04 20:26
Johan Rosengren30-Jun-04 20:26 
Questioncan ADO and ODBC be mixed to use in a database application program? Pin
vividtang30-Jun-04 13:55
vividtang30-Jun-04 13:55 
AnswerRe: can ADO and ODBC be mixed to use in a database application program? Pin
palbano30-Jun-04 16:10
palbano30-Jun-04 16:10 
AnswerRe: can ADO and ODBC be mixed to use in a database application program? Pin
Antony M Kancidrowski30-Jun-04 23:51
Antony M Kancidrowski30-Jun-04 23:51 
Generaldialog box constantly reappearing Pin
elephantstar30-Jun-04 13:14
elephantstar30-Jun-04 13:14 
GeneralRe: dialog box constantly reappearing Pin
valikac30-Jun-04 14:54
valikac30-Jun-04 14:54 
GeneralRe: dialog box constantly reappearing Pin
elephantstar1-Jul-04 7:23
elephantstar1-Jul-04 7:23 
GeneralRe: dialog box constantly reappearing Pin
rw1041-Jul-04 2:08
rw1041-Jul-04 2:08 
GeneralRe: dialog box constantly reappearing Pin
elephantstar6-Jul-04 11:37
elephantstar6-Jul-04 11:37 
Questionhow to minimize all windows Pin
5iveboy30-Jun-04 13:13
5iveboy30-Jun-04 13:13 

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.