Click here to Skip to main content
15,909,747 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionTerminating Process [modified] Pin
gothic_coder6-Sep-09 21:42
gothic_coder6-Sep-09 21:42 
AnswerRe: Terminating Process Pin
Richard MacCutchan7-Sep-09 2:26
mveRichard MacCutchan7-Sep-09 2:26 
GeneralRe: Terminating Process Pin
gothic_coder7-Sep-09 2:46
gothic_coder7-Sep-09 2:46 
GeneralRe: Terminating Process Pin
kilt7-Sep-09 4:58
kilt7-Sep-09 4:58 
GeneralRe: Terminating Process Pin
Richard MacCutchan7-Sep-09 5:02
mveRichard MacCutchan7-Sep-09 5:02 
GeneralRe: Terminating Process Pin
David Crow14-Sep-09 3:56
David Crow14-Sep-09 3:56 
QuestionHow can set focus in Main window in SDI? Pin
Le@rner6-Sep-09 21:30
Le@rner6-Sep-09 21:30 
AnswerRe: How can set focus in Main window in SDI? Pin
Stuart Dootson6-Sep-09 22:01
professionalStuart Dootson6-Sep-09 22:01 
"_$h@nky_" wrote:
i m using worker thread for loading records in ListControl.


That's probably a bad idea to start with - you should only access windows from a UI thread, unless you're posting messages to the window from hte non-UI thread.

And that's also the basic reason why the SetFocus in the thread function isn't effective - as the documentation[^] says:

The window must be attached to the calling thread's message queue


Try posting a custom message to the main window at the end of the thread, indicating that the thread is finished. The main frame can handle that by dismissing the progress dialog and retrieving the focus.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

Questionconst TCHAR* to TCHAR* Pin
Nandu_77b6-Sep-09 21:02
Nandu_77b6-Sep-09 21:02 
AnswerRe: const TCHAR* to TCHAR* Pin
CPallini6-Sep-09 21:10
mveCPallini6-Sep-09 21:10 
AnswerRe: const TCHAR* to TCHAR* Pin
Stuart Dootson6-Sep-09 21:53
professionalStuart Dootson6-Sep-09 21:53 
GeneralRe: const TCHAR* to TCHAR* Pin
Nandu_77b7-Sep-09 1:58
Nandu_77b7-Sep-09 1:58 
QuestionDisplay Strings Pin
Nick_1116-Sep-09 20:28
Nick_1116-Sep-09 20:28 
AnswerRe: Display Strings Pin
Stuart Dootson6-Sep-09 21:50
professionalStuart Dootson6-Sep-09 21:50 
GeneralRe: Display Strings Pin
Nick_1116-Sep-09 22:56
Nick_1116-Sep-09 22:56 
GeneralRe: Display Strings Pin
Stuart Dootson6-Sep-09 23:07
professionalStuart Dootson6-Sep-09 23:07 
GeneralRe: Display Strings Pin
Nick_1116-Sep-09 23:51
Nick_1116-Sep-09 23:51 
GeneralRe: Display Strings Pin
Stuart Dootson6-Sep-09 23:59
professionalStuart Dootson6-Sep-09 23:59 
GeneralRe: Display Strings Pin
choramale_vs7-Sep-09 0:03
choramale_vs7-Sep-09 0:03 
GeneralRe: Display Strings Pin
Stuart Dootson7-Sep-09 0:14
professionalStuart Dootson7-Sep-09 0:14 
GeneralRe: Display Strings Pin
choramale_vs7-Sep-09 0:41
choramale_vs7-Sep-09 0:41 
GeneralRe: Display Strings Pin
Stuart Dootson7-Sep-09 2:35
professionalStuart Dootson7-Sep-09 2:35 
QuestionNon Blocking message Box Pin
trioum6-Sep-09 20:18
trioum6-Sep-09 20:18 
AnswerRe: Non Blocking message Box Pin
Stuart Dootson6-Sep-09 20:23
professionalStuart Dootson6-Sep-09 20:23 
AnswerRe: Non Blocking message Box Pin
Randor 6-Sep-09 21:49
professional Randor 6-Sep-09 21:49 

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.