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

C / C++ / MFC

 
GeneralRe: Question of style Pin
redeemer12-Jun-02 10:23
redeemer12-Jun-02 10:23 
GeneralRe: Question of style Pin
Navin12-Jun-02 15:41
Navin12-Jun-02 15:41 
GeneralRe: Ok, here is the run down... Pin
Tim Smith12-Jun-02 16:11
Tim Smith12-Jun-02 16:11 
Generalhelp Pin
12-Jun-02 8:09
suss12-Jun-02 8:09 
GeneralRe: help Pin
Michael P Butler12-Jun-02 11:16
Michael P Butler12-Jun-02 11:16 
GeneralReadFile from Comm port Pin
JohnnyG12-Jun-02 7:19
JohnnyG12-Jun-02 7:19 
GeneralRe: ReadFile from Comm port Pin
JohnnyG12-Jun-02 10:16
JohnnyG12-Jun-02 10:16 
GeneralWindows Messaging Timing and Threads Pin
SanShou12-Jun-02 6:41
SanShou12-Jun-02 6:41 
Allright, I have some major questions that maybe some one can help me with.

First I am writing a Windows GUI that interfaces to an embedded system via RS232 messages. In order to transmit these messages, I was asked to create a three level OSI protocol stack (transport, network, and datalink.) This stack then communicates back to the application via windows messages (WM_COMM_SENT, WM_COMM_RETRY, and so on...) This uses two threads (send and recieve for each layer) but only the transport thread sends messages.

I have a simple callback system where the transport talks only to the CMainFrame class. The mainframe class handles the messages, queries a messages manager, and then the message manager sends out a WM_COMM_CALLBACK message to each window that needs the data.

The problem is, I am currently trying to interact with the box via the new GUI. The GUI handles a button press, issues the send command in the transport just fine and recieves the data back immediately. However I must release or terminate the current windows message before the messages that come back from the communications stack are processed. This works fine because most of the GUI message handlers are short..., but finally to my question?

Is there a case where during a button press that sends out say 128 messages to handle some of the return messages before the button press message returns back to the message pump? Or is there better system for returning information from the transport... I guess after working 16 hours a day for three weeks to get a demo ready for a trade show and being the only one in a small company that can handle this, I am a little fried and need help walking through the Windows messaging world and threads...

My only other ideas are to release control and wait for the callback before sending the next message, but that limits the functionality of placing a multi-message buffer in the comm stack... or to write a thread that GUI message starts up and then lets it ride until all the messages are sent, however I am already handling so many threads... In other words how many threads are too many threads Confused | :confused: .

Any help is appreciated...

Thanks,
Brian

Stop the hatred, free the Mallocs.
GeneralRe: Windows Messaging Timing and Threads Pin
NormDroid12-Jun-02 9:40
professionalNormDroid12-Jun-02 9:40 
GeneralCallbakc Functions Pin
arthivjii12-Jun-02 6:36
arthivjii12-Jun-02 6:36 
GeneralRe: Callbakc Functions Pin
Chris Losinger12-Jun-02 6:55
professionalChris Losinger12-Jun-02 6:55 
GeneralRe: Callbakc Functions Pin
Alexandru Savescu12-Jun-02 8:43
Alexandru Savescu12-Jun-02 8:43 
GeneralRe: Callbakc Functions Pin
Chris Losinger12-Jun-02 9:00
professionalChris Losinger12-Jun-02 9:00 
GeneralInstallshield questions... Pin
Mike Zinni12-Jun-02 5:36
Mike Zinni12-Jun-02 5:36 
GeneralRe: Installshield questions... Pin
Navin12-Jun-02 8:33
Navin12-Jun-02 8:33 
QuestionHi! everybody! How about "graph line printing"? Pin
12-Jun-02 5:41
suss12-Jun-02 5:41 
QuestionHow to fill a vector or a list with data from a file! Pin
JMajors9812-Jun-02 4:50
JMajors9812-Jun-02 4:50 
AnswerRe: How to fill a vector or a list with data from a file! Pin
Chris Losinger12-Jun-02 5:39
professionalChris Losinger12-Jun-02 5:39 
AnswerRe: How to fill a vector or a list with data from a file! Pin
Joaquín M López Muñoz12-Jun-02 11:57
Joaquín M López Muñoz12-Jun-02 11:57 
AnswerRe: How to fill a vector or a list with data from a file! Pin
Mike Nordell13-Jun-02 3:23
Mike Nordell13-Jun-02 3:23 
GeneralParseCommandLine Pin
Anthony988712-Jun-02 4:45
Anthony988712-Jun-02 4:45 
GeneralRe: ParseCommandLine Pin
Le centriste12-Jun-02 5:37
Le centriste12-Jun-02 5:37 
GeneralRe: ParseCommandLine Pin
Navin12-Jun-02 8:39
Navin12-Jun-02 8:39 
GeneralITaskBarList2::MarkFullScreenWindow Pin
12-Jun-02 4:20
suss12-Jun-02 4:20 
QuestionCan Library Files be Modified Pin
Steve Thresher12-Jun-02 4:23
Steve Thresher12-Jun-02 4:23 

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.