Click here to Skip to main content
16,011,949 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: #using used why? Pin
Hamid_RT3-Jun-08 1:07
Hamid_RT3-Jun-08 1:07 
QuestionChange Window Color Pin
chetanjoshi91-Jun-08 20:24
chetanjoshi91-Jun-08 20:24 
AnswerRe: Change Window Color Pin
SandipG 1-Jun-08 20:42
SandipG 1-Jun-08 20:42 
AnswerRe: Change Window Color Pin
Hamid_RT3-Jun-08 1:06
Hamid_RT3-Jun-08 1:06 
QuestionXML stream to send data Pin
CodingLover1-Jun-08 20:19
CodingLover1-Jun-08 20:19 
AnswerRe: XML stream to send data Pin
Mark Salsbery2-Jun-08 6:15
Mark Salsbery2-Jun-08 6:15 
AnswerRe: XML stream to send data Pin
Hamid_RT3-Jun-08 1:05
Hamid_RT3-Jun-08 1:05 
QuestionProblem with PeekMessage MFC application Pin
Prasanth M V1-Jun-08 19:38
Prasanth M V1-Jun-08 19:38 
In my simple MFC application, there are two controls, one button and multi lien edit box

The event handler of the button will do the parsing of some files(aboutt 100 files) which may take about 10 minutes to complete. And during the parsing time, I want to list the file name which being parsed in the edit box which is being created with ‘multiline’, automatic horizontal and vertical scroll bar options.

It is working well.

I also like to have the option that the user can operate the UI while the parsing is in progress, for that, I added the following code fragment in the file parsing ‘for’ loop in the event handler of button.

MSG msg;
while(::PeekMessage(&msg, NULL, 0,0, PM_REMOVE))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}

Still every thing is working fine, except that when I click on the vertical scroll button(this scroll bar comes when the items can not be accommodate in the edit box) of the edit box, PeekMessage became in a waiting state and can get the message only after the left mouse button is realese for the scroll bar. During the waiting time of PeekMessage the file parsing is paused. I want to solve this issue such that parsing is performed even when the user operate on the Vertical scroll bar of the edit box.

The event handler of the button look like :

void CMyDlg::OnBnParseFiles()
{
for(int nFileIndex = 0; nFileIndex < 1000; ++nFileIndex)
{

//Perform the parsing on the file with the specified index
PerformFileParsing(nFileIndex);

//Upadate the list of parsed files in the Edit control
UpdateEdit();

MSG msg;
while(::PeekMessage(&msg, NULL, 0,0, PM_REMOVE))
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}

}

Plese help me if any one any idea
Thanks
Prasanth
AnswerRe: Problem with PeekMessage MFC application Pin
Mark Salsbery2-Jun-08 6:20
Mark Salsbery2-Jun-08 6:20 
AnswerRe: Problem with PeekMessage MFC application Pin
Hamid_RT3-Jun-08 1:04
Hamid_RT3-Jun-08 1:04 
QuestionDeriving class from CObject Pin
subramanyeswari1-Jun-08 18:48
subramanyeswari1-Jun-08 18:48 
AnswerRe: Deriving class from CObject Pin
SandipG 1-Jun-08 20:05
SandipG 1-Jun-08 20:05 
GeneralRe: Deriving class from CObject Pin
subramanyeswari1-Jun-08 20:15
subramanyeswari1-Jun-08 20:15 
GeneralRe: Deriving class from CObject Pin
SandipG 1-Jun-08 20:39
SandipG 1-Jun-08 20:39 
AnswerRe: Deriving class from CObject Pin
Hamid_RT3-Jun-08 1:04
Hamid_RT3-Jun-08 1:04 
QuestionSetup with .tlb file? Pin
ritz12341-Jun-08 18:32
ritz12341-Jun-08 18:32 
QuestionWorking with DWORD variable Pin
CodingLover1-Jun-08 18:05
CodingLover1-Jun-08 18:05 
AnswerRe: Working with DWORD varuable Pin
Jijo.Raj1-Jun-08 18:30
Jijo.Raj1-Jun-08 18:30 
NewsRe: Working with DWORD varuable Pin
CodingLover1-Jun-08 18:34
CodingLover1-Jun-08 18:34 
GeneralRe: Working with DWORD varuable Pin
Jijo.Raj1-Jun-08 19:53
Jijo.Raj1-Jun-08 19:53 
NewsRe: Working with DWORD varuable Pin
CodingLover1-Jun-08 20:06
CodingLover1-Jun-08 20:06 
Questionwhy i could only read one charactor? [modified] Pin
steven_wong1-Jun-08 17:09
steven_wong1-Jun-08 17:09 
AnswerRe: why i could only read one charactor? Pin
Jijo.Raj1-Jun-08 18:01
Jijo.Raj1-Jun-08 18:01 
GeneralRe: why i could only read one charactor? Pin
steven_wong1-Jun-08 18:32
steven_wong1-Jun-08 18:32 
QuestionRe: why i could only read one charactor? Pin
Rajesh R Subramanian1-Jun-08 19:58
professionalRajesh R Subramanian1-Jun-08 19:58 

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.