Click here to Skip to main content
16,004,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to use ClientDC::GetPixel to get the pixel's RGB value when I call TextOut? Pin
CPallini6-Sep-10 2:43
mveCPallini6-Sep-10 2:43 
Questionenumerating active TCP/UDP connections Pin
Chesnokov Yuriy5-Sep-10 20:27
professionalChesnokov Yuriy5-Sep-10 20:27 
AnswerRe: enumerating active TCP/UDP connections Pin
CPallini6-Sep-10 0:15
mveCPallini6-Sep-10 0:15 
Questionerror C2872: 'IAccessible' : ambiguous symbol Pin
learningvisualc5-Sep-10 20:12
learningvisualc5-Sep-10 20:12 
AnswerRe: error C2872: 'IAccessible' : ambiguous symbol Pin
«_Superman_»5-Sep-10 21:13
professional«_Superman_»5-Sep-10 21:13 
AnswerRe: error C2872: 'IAccessible' : ambiguous symbol Pin
Cool_Dev5-Sep-10 21:13
Cool_Dev5-Sep-10 21:13 
QuestionMFC dialog box blocked while threads are running... Pin
mashhur5-Sep-10 14:13
mashhur5-Sep-10 14:13 
AnswerRe: MFC dialog box blocked while threads are running... Pin
Dave Calkins5-Sep-10 17:13
Dave Calkins5-Sep-10 17:13 
if you're doing work in the main thread and not allowing windows messages to be processed then yes it will lock up and you won't be able to interact with the GUI.

one way to avoid that is to do all your work in the second worker thread and just use the main thread to respond to user inputs and update the UI.

another option is to, while you're doing whatever work you're doing, periodically call the below function.

void RunMessagePump()
{
   MSG m;
   while (PeekMessage(&m,PM_REMOVE))
   {
      TranslateMessage(&m);
      DispatchMessage(&m);
   }
}


So if you're in a tight loop and you call this often your app will remain responsive. The thing to watch out for there though is re-entrance, i.e. the user clicking a button, then while the operation is taking place clicking it again.
GeneralRe: MFC dialog box blocked while threads are running... Pin
mashhur5-Sep-10 19:11
mashhur5-Sep-10 19:11 
AnswerRe: MFC dialog box blocked while threads are running... Pin
mashhur5-Sep-10 18:54
mashhur5-Sep-10 18:54 
QuestionRe: MFC dialog box blocked while threads are running... Pin
Niklas L5-Sep-10 22:07
Niklas L5-Sep-10 22:07 
Questionhow to ensure usb bulk transfer Pin
Oliver Arold5-Sep-10 11:19
Oliver Arold5-Sep-10 11:19 
AnswerRe: how to ensure usb bulk transfer Pin
«_Superman_»5-Sep-10 17:57
professional«_Superman_»5-Sep-10 17:57 
QuestionReading .CDFS audio: Where to start Pin
Danzy835-Sep-10 5:32
Danzy835-Sep-10 5:32 
AnswerRe: Reading .CDFS audio: Where to start Pin
sashoalm8-Sep-10 4:49
sashoalm8-Sep-10 4:49 
QuestionEnumProcesses() don't return all processses! Pin
aangerma4-Sep-10 12:27
aangerma4-Sep-10 12:27 
AnswerRe: EnumProcesses() don't return all processses! Pin
Niklas L4-Sep-10 13:14
Niklas L4-Sep-10 13:14 
QuestionRe: EnumProcesses() don't return all processses! Pin
Eugen Podsypalnikov5-Sep-10 9:04
Eugen Podsypalnikov5-Sep-10 9:04 
AnswerRe: EnumProcesses() don't return all processses! Pin
aangerma5-Sep-10 22:41
aangerma5-Sep-10 22:41 
JokeRe: EnumProcesses() don't return all processses! [modified] Pin
Eugen Podsypalnikov5-Sep-10 22:52
Eugen Podsypalnikov5-Sep-10 22:52 
GeneralRe: EnumProcesses() don't return all processses! Pin
aangerma13-Sep-10 0:22
aangerma13-Sep-10 0:22 
GeneralRe: EnumProcesses() don't return all processses! Pin
Eugen Podsypalnikov13-Sep-10 0:34
Eugen Podsypalnikov13-Sep-10 0:34 
AnswerRe: EnumProcesses() don't return all processses! Pin
Joe Woodbury5-Sep-10 12:32
professionalJoe Woodbury5-Sep-10 12:32 
QuestionRe: EnumProcesses() don't return all processses! Pin
David Crow7-Sep-10 6:02
David Crow7-Sep-10 6:02 
QuestionHow to set the default font name when I call ChooseFont(..) ? Pin
wangningyu4-Sep-10 4:39
wangningyu4-Sep-10 4:39 

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.