Click here to Skip to main content
15,898,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Send request to open a http link Pin
eusto7-Apr-10 1:26
eusto7-Apr-10 1:26 
AnswerRe: Send request to open a http link Pin
Code-o-mat7-Apr-10 2:25
Code-o-mat7-Apr-10 2:25 
GeneralRe: Send request to open a http link [modified] Pin
Pryabu7-Apr-10 18:57
Pryabu7-Apr-10 18:57 
GeneralRe: Send request to open a http link Pin
eusto8-Apr-10 0:18
eusto8-Apr-10 0:18 
GeneralRe: Send request to open a http link Pin
Pryabu8-Apr-10 21:10
Pryabu8-Apr-10 21:10 
Questionenum in .c-file Pin
LionAM7-Apr-10 1:06
LionAM7-Apr-10 1:06 
AnswerRe: enum in .c-file Pin
Eugen Podsypalnikov7-Apr-10 1:19
Eugen Podsypalnikov7-Apr-10 1:19 
GeneralRe: enum in .c-file Pin
LionAM7-Apr-10 2:05
LionAM7-Apr-10 2:05 
AnswerRe: enum in .c-file Pin
eusto7-Apr-10 1:22
eusto7-Apr-10 1:22 
AnswerRe: enum in .c-file Pin
CPallini7-Apr-10 1:33
mveCPallini7-Apr-10 1:33 
QuestionMaximum limit of char array? Pin
jannathali6-Apr-10 22:33
jannathali6-Apr-10 22:33 
QuestionRe: Maximum limit of char array? Pin
CPallini6-Apr-10 22:35
mveCPallini6-Apr-10 22:35 
AnswerRe: Maximum limit of char array? Pin
jannathali6-Apr-10 22:38
jannathali6-Apr-10 22:38 
GeneralRe: Maximum limit of char array? Pin
«_Superman_»6-Apr-10 22:42
professional«_Superman_»6-Apr-10 22:42 
GeneralRe: Maximum limit of char array? Pin
CPallini6-Apr-10 22:48
mveCPallini6-Apr-10 22:48 
AnswerRe: Maximum limit of char array? Pin
Cedric Moonen7-Apr-10 0:12
Cedric Moonen7-Apr-10 0:12 
AnswerRe: Maximum limit of char array? Pin
Rajesh R Subramanian7-Apr-10 0:18
professionalRajesh R Subramanian7-Apr-10 0:18 
QuestionMSXML Issue [modified] Pin
002comp6-Apr-10 19:07
002comp6-Apr-10 19:07 
AnswerRe: MSXML Issue Pin
CPallini6-Apr-10 21:41
mveCPallini6-Apr-10 21:41 
QuestionNeed to read big-endian file (Windows) Pin
o m n i6-Apr-10 15:06
o m n i6-Apr-10 15:06 
AnswerRe: Need to read big-endian file (Windows) Pin
Garth J Lancaster6-Apr-10 20:05
professionalGarth J Lancaster6-Apr-10 20:05 
GeneralRe: Need to read big-endian file (Windows) Pin
o m n i11-Apr-10 18:14
o m n i11-Apr-10 18:14 
AnswerRe: Need to read big-endian file (Windows) Pin
Eugen Podsypalnikov6-Apr-10 21:39
Eugen Podsypalnikov6-Apr-10 21:39 
AnswerRe: Need to read big-endian file (Windows) Pin
Luc Pattyn6-Apr-10 23:31
sitebuilderLuc Pattyn6-Apr-10 23:31 
QuestionAfxBeginThread and ON_THREAD_MESSAGE does not work using PostThreadMessage Pin
Vaclav_6-Apr-10 14:25
Vaclav_6-Apr-10 14:25 
Could someone please explain to me why the following code does not work?

I build a new thread in a view process:
….
m_COpenHR_AutoCOM_Thread = (COpenHR_AutoCOM_Thread*) AfxBeginThread(ThreadFunction,this,THREAD_PRIORITY_LOWEST);
VERIFY(m_COpenHR_AutoCOM_Thread);
return 1;
}

Runs the thread function within the view class just fine.
Now I want to stop the process.

In property page I have this code to post thread message:

CWinThread* pCurrentThread = AfxGetThread( );


if(!pCurrentThread->PostThreadMessage(WM_USER_AUTO_COM , 0, 1))
{
TRACE("PostThreadMessage(WM_USER_AUTO_COM , 0, 1))");
}

In the derived CWinThread class I have this:

BEGIN_MESSAGE_MAP(COpenHR_AutoCOM_Thread, CWinThread)
//{{AFX_MSG_MAP(COpenHR_AutoCOM_Thread)
// NOTE - the ClassWizard will add and remove mapping macros here.
ON_THREAD_MESSAGE( WM_USER_AUTO_COM, ControlThread )
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

I never get to the ControlThread function.

What am I missing or doing wrong? Should PostThreadMessage be directed to my new thread and how?
Thanks you for your help.
Vaclav

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.