Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralI've shown the dialog, now I can't interact with it. Pin
BlackDice8-Sep-04 6:16
BlackDice8-Sep-04 6:16 
GeneralWM_HSCROLL doesn't work on custom sliders Pin
Budric B.8-Sep-04 6:05
Budric B.8-Sep-04 6:05 
GeneralRe: WM_HSCROLL doesn't work on custom sliders Pin
Anonymous8-Sep-04 6:44
Anonymous8-Sep-04 6:44 
GeneralADO, Winsock, Client/Server Pin
Kudakwashe Mafutah8-Sep-04 5:58
Kudakwashe Mafutah8-Sep-04 5:58 
QuestionHow can I show a dialog on top of a screensaver? Pin
BlackDice8-Sep-04 4:20
BlackDice8-Sep-04 4:20 
GeneralSingle thread to multi-thread conversion problem Pin
vineas8-Sep-04 4:02
vineas8-Sep-04 4:02 
GeneralRe: Single thread to multi-thread conversion problem Pin
Neville Franks8-Sep-04 10:32
Neville Franks8-Sep-04 10:32 
GeneralRe: Single thread to multi-thread conversion problem Pin
vineas8-Sep-04 11:10
vineas8-Sep-04 11:10 
The thread is technically a UI thread (as it's derived from CWinThread), but this is simply to use messaging. This allowed much cleaner handling of cancel and update code than what I was trying before with a strictly worker thread, and use of messages is going to allow me to do a little more with this thread than I am now. The main thread handles everything in the UI.

Neville Franks wrote:
Why do you need these message pump loops at all. This sounds like stuff we used to do back in the Win16 days to do mock background processing. I'd be trying hard to get rid of them all.

This technique is actually talked about and recommended in several articles here on CodeProject, but you're right - that's basically what it is doing, these message loops are there for tasks that should have been spawned off as background tasks long ago but never were. I tried simply removing the loops via #ifdefs, all my crashes stopped but I then had user responsiveness problems when doing the tasks that are still in the main thread. Although I'm going to push that these other tasks get dropped into separate threads, it won't happen anytime soon so I'm rather stuck with them for now. Perhaps there is some subset of the loops that I can remove, but until I can figure this out I'm not going to be too confident of this thread.

I still can't really figure out why the loops are causing problems. From everything I've read they should be OK.

-----
In the land of the blind, the one eyed man is king.
GeneralRe: Single thread to multi-thread conversion problem Pin
Neville Franks8-Sep-04 11:28
Neville Franks8-Sep-04 11:28 
GeneralRe: Single thread to multi-thread conversion problem Pin
vineas9-Sep-04 3:29
vineas9-Sep-04 3:29 
GeneralRe: Single thread to multi-thread conversion problem Pin
Neville Franks9-Sep-04 10:23
Neville Franks9-Sep-04 10:23 
GeneralPhilosophical question :-) Pin
Cedric Moonen8-Sep-04 3:35
Cedric Moonen8-Sep-04 3:35 
GeneralRe: Philosophical question :-) Pin
Ryan Binns8-Sep-04 4:07
Ryan Binns8-Sep-04 4:07 
GeneralRe: Philosophical question :-) Pin
Cedric Moonen8-Sep-04 4:31
Cedric Moonen8-Sep-04 4:31 
GeneralRe: Philosophical question :-) Pin
Ryan Binns8-Sep-04 13:24
Ryan Binns8-Sep-04 13:24 
GeneralDetect current language Pin
Anonymous8-Sep-04 3:33
Anonymous8-Sep-04 3:33 
GeneralRe: Detect current language Pin
Ivan Cachicatari8-Sep-04 5:43
Ivan Cachicatari8-Sep-04 5:43 
GeneralRe: Detect current language Pin
David Crow8-Sep-04 5:47
David Crow8-Sep-04 5:47 
GeneralRe: Detect current language Pin
Moak24-Sep-04 1:33
Moak24-Sep-04 1:33 
Generalabout using vmr9 Pin
yingkou8-Sep-04 3:29
yingkou8-Sep-04 3:29 
QuestionHow can I push out my app Pin
Larsson8-Sep-04 2:18
Larsson8-Sep-04 2:18 
Generalconvert bmp to 2-D array Pin
hanivoo8-Sep-04 1:49
hanivoo8-Sep-04 1:49 
GeneralRe: convert bmp to 2-D array Pin
Bob Stanneveld8-Sep-04 6:29
Bob Stanneveld8-Sep-04 6:29 
GeneralCannot find header file compile time Pin
intrigued8-Sep-04 1:40
intrigued8-Sep-04 1:40 
GeneralRe: Cannot find header file compile time Pin
P-Rex8-Sep-04 3:19
P-Rex8-Sep-04 3:19 

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.