But this does not happen in Debug mode I can invoke userdefined messages
many times without error.
Why this is happening or am I missing any logic of user defined messages.
Your reply is highly appriciated.
Thanx in advance
Vivek
Hi Vivek,
I think you have "found" an old problem (debug <-> release).
Your message-functions must return a value!
e.g.
//the define
#define MY_MESSAGE WM_USER + 1
//the message handler for MFC
//not required with WIN-API
ON_MESSAGE(MY_MESSAGE, myMessageFunc)
//the function (for WIN-API)
LRESULT myMessageFunc(WPARAM wp, LPARAM lp)
{
//do something
return 0;
}
//the function (for MFC)
LRESULT MyClass::myMessageFunc(WPARAM wp, LPARAM lp)
{
//do something
return 0;
}
HTH
Frank
Thanx for your reply but I am already using the same format.
my function prototype is:
#define UWM_SOLVERSA_SOFTWARES (WM_USER +5)
afx_msg LRESULT OnSolversaSoftware();
LRESULT CFirstTestDlg::OnSolversaSoftware()
{
if((m_btnCheckSI.GetState() && 0x0003)==1)
{
OnButtonsoftcheck();
}
else
{
SendMessage(UWM_SOLVERSA_SHARED,0,0);
}
return 0;
}
what else can be the reason?
Vivek
"Frank Kaehler" <AAAfktoz...@gmx.net> wrote in message
news:2gtl6dF...@uni-berlin.de...
Thanx alot
What u said is correct....
I was not using WPARAM wp, LPARAM lp
Now its working fine...
Once again thank you veru much....
Vivek.
"Vivek" <vivek.ku...@solversa.com> wrote in message
news:eTWZP3JP...@TK2MSFTNGP09.phx.gbl...
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm