Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Comparing two different date format Pin
Rajkumar R10-May-08 1:02
Rajkumar R10-May-08 1:02 
AnswerRe: Comparing two different date format Pin
Abhijit A10-May-08 1:07
Abhijit A10-May-08 1:07 
GeneralRe: Comparing two different date format Pin
CPallini10-May-08 7:36
mveCPallini10-May-08 7:36 
Questionexport Pin
viliam9-May-08 22:27
viliam9-May-08 22:27 
GeneralRe: export Pin
WindowsPistha10-May-08 2:59
WindowsPistha10-May-08 2:59 
AnswerRe: export Pin
Mark Salsbery10-May-08 13:00
Mark Salsbery10-May-08 13:00 
GeneralRe: export Pin
CPallini10-May-08 22:08
mveCPallini10-May-08 22:08 
GeneralRe: export Pin
Mark Salsbery11-May-08 10:46
Mark Salsbery11-May-08 10:46 
GeneralRe: export Pin
viliam11-May-08 20:14
viliam11-May-08 20:14 
QuestionProblem in Value of Radio button? Pin
Le@rner9-May-08 22:06
Le@rner9-May-08 22:06 
QuestionRe: Problem in Value of Radio button? Pin
Rajkumar R9-May-08 22:12
Rajkumar R9-May-08 22:12 
QuestionHow to PostMessage from dll to Win32 appication Window procedure Pin
Abhijit A9-May-08 21:13
Abhijit A9-May-08 21:13 
AnswerRe: How to PostMessage from dll to Win32 appication Window procedure Pin
alex7869-May-08 21:23
alex7869-May-08 21:23 
GeneralRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Abhijit A9-May-08 21:41
Abhijit A9-May-08 21:41 
QuestionRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Rajkumar R9-May-08 21:56
Rajkumar R9-May-08 21:56 
AnswerRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Abhijit A9-May-08 22:07
Abhijit A9-May-08 22:07 
GeneralRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Rajkumar R10-May-08 0:33
Rajkumar R10-May-08 0:33 
GeneralRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Abhijit A10-May-08 0:59
Abhijit A10-May-08 0:59 
yaa I am also able to PostMessage inside Init fuction but i want to PostMessage by
see below
#include "Work.h"

CWORK *pObj=NULL;
HWND hMyWnd;

MYAPI int CALLBACK Init(HWND hWnd)
{
hMyWnd=hWnd;
pObj=new CWORK();
}

in WORK.h

#define WM_MYMSG WM_APP+10001
class CWork
{
public:
CWORK();
~CWORK();
Initialize();
}

In WORK.cpp

UINT ThreadMyProc(LPVOID lpObject);
HANDLE hThread=NULL;
extern HWND hMyWnd;

void CWORK::Initialize()
{

hThread = CreateThread(
NULL, // default security attributes
0, // use default stack size
ThreadMyProc, // thread function
(LPVOID)this, // argument to thread function
0, // use default creation flags
dwThreadId); // returns the thread identifier
}


}

UINT ThreadMyProc(LPVOID lpObject)
{
CWORK pWork=(CWORK*)lpObject;

while(true)
{
some conditions...

then I use
PostMessage(hMyWnd,WM_MYMSG,0,0x002);

}
return 0;
}

so as shown above when I PostMessage from ThreadMyProc it shows error in main application

Please check and give me suggestion anything wrong in this code and if possible givw solution that how we can post message from thread to main application.

abhi

GeneralRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Rajkumar R10-May-08 1:46
Rajkumar R10-May-08 1:46 
GeneralRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Abhijit A10-May-08 1:57
Abhijit A10-May-08 1:57 
GeneralRe: How to PostMessage from dll to Win32 appication Window procedure Pin
Rajkumar R10-May-08 2:47
Rajkumar R10-May-08 2:47 
QuestionDynamic menus related problem Pin
ritz12349-May-08 20:52
ritz12349-May-08 20:52 
AnswerRe: Dynamic menus related problem [modified] Pin
Rajkumar R9-May-08 21:06
Rajkumar R9-May-08 21:06 
Questionthe application has failed to start because its side by side configuration is incorrect. Please see the application event log for more details Pin
Le@rner9-May-08 18:48
Le@rner9-May-08 18:48 
AnswerRe: the application has failed to start because its side by side configuration is incorrect. Please see the application event log for more details Pin
Rajkumar R9-May-08 20:45
Rajkumar R9-May-08 20:45 

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.