Click here to Skip to main content
16,004,678 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CEdit Control Pin
Hamid_RT26-Oct-06 19:31
Hamid_RT26-Oct-06 19:31 
QuestionRe: CEdit Control Pin
David Crow26-Oct-06 3:43
David Crow26-Oct-06 3:43 
QuestionCEdit Control Pin
fabiotriolo26-Oct-06 4:32
fabiotriolo26-Oct-06 4:32 
AnswerRe: CEdit Control Pin
ThatsAlok26-Oct-06 19:28
ThatsAlok26-Oct-06 19:28 
AnswerRe: CEdit Control Pin
Hamid_RT26-Oct-06 19:28
Hamid_RT26-Oct-06 19:28 
GeneralCEdit Control Pin
fabiotriolo27-Oct-06 0:33
fabiotriolo27-Oct-06 0:33 
GeneralRe: CEdit Control Pin
ThatsAlok27-Oct-06 20:01
ThatsAlok27-Oct-06 20:01 
Questionsum of variables of parent window Pin
prithaa25-Oct-06 23:08
prithaa25-Oct-06 23:08 
Hi,

Sorry to have started a new thread for an old problem.But there was no reply for a long time so I thought I should restart.
If this a problem I won't do it again.

int *pValue = new int;GetParent->SendMessage(MY_MESSAGE, 0, (LPARAM) pValue);
delete pValue;

In the handler function for MY_MESSAGE:


LRESULT MyParent::OnMyMessage( WPARAM wParam, LPARAM lParam )
{
*(int *) lParam = 123; return 0;
}

The above code was given to sent a message to the parent window and allocate memory for a variable which belongs to the parent.

Thanks for the above code.It was really useful

But can I make Message map of the form MY_MESSAGE and have a handler function OnMyMessage ?

Since message maps are something that are provided by Windows API and they can be generated through Class Wizard where messages and their corresponding functions are already given. Ex WM_KEYDOWN with function OnKeyDown()

Prithaa

AnswerRe: sum of variables of parent window Pin
Aneesh Valeri26-Oct-06 0:29
Aneesh Valeri26-Oct-06 0:29 
GeneralRe: sum of variables of parent window Pin
prithaa26-Oct-06 1:01
prithaa26-Oct-06 1:01 
GeneralRe: sum of variables of parent window Pin
David Crow26-Oct-06 3:50
David Crow26-Oct-06 3:50 
GeneralRe: sum of variables of parent window Pin
Iain Clarke, Warrior Programmer26-Oct-06 3:53
Iain Clarke, Warrior Programmer26-Oct-06 3:53 
GeneralRe: sum of variables of parent window Pin
Hamid_RT26-Oct-06 19:28
Hamid_RT26-Oct-06 19:28 
AnswerRe: sum of variables of parent window Pin
ThatsAlok26-Oct-06 19:28
ThatsAlok26-Oct-06 19:28 
QuestionC2460 Error Pin
baerten25-Oct-06 22:03
baerten25-Oct-06 22:03 
AnswerRe: C2460 Error Pin
kakan25-Oct-06 22:10
professionalkakan25-Oct-06 22:10 
Questionentire Sample Pin
baerten25-Oct-06 23:30
baerten25-Oct-06 23:30 
AnswerRe: entire Sample Pin
kakan26-Oct-06 0:07
professionalkakan26-Oct-06 0:07 
GeneralRe: entire Sample Pin
baerten26-Oct-06 0:19
baerten26-Oct-06 0:19 
GeneralRe: entire Sample Pin
kakan26-Oct-06 0:25
professionalkakan26-Oct-06 0:25 
AnswerRe: entire Sample Pin
benjymous26-Oct-06 1:25
benjymous26-Oct-06 1:25 
GeneralRe: entire Sample Pin
baerten26-Oct-06 2:14
baerten26-Oct-06 2:14 
Questionin socket, how to know send buffer is full? Pin
hanlei000000000925-Oct-06 21:53
hanlei000000000925-Oct-06 21:53 
AnswerRe: in socket, how to know send buffer is full? Pin
hanlei000000000926-Oct-06 1:17
hanlei000000000926-Oct-06 1:17 
Questionproblem with a control ActiveX Pin
zizzzz25-Oct-06 21:28
zizzzz25-Oct-06 21:28 

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.