Avatar of yogesh28577
yogesh28577

asked on 

tranfer data from one cfromview to other cformview

Suppose i have two from view one ie abc ,xyz i want to tranfer data from one cfromview (abc ) to other ie xyz
plz tell me how i dont want to use external varible  plz tell me any other method or by using any message


System Programming

Avatar of undefined
Last Comment
yogesh28577
Avatar of alb66
alb66
Flag of Italy image

You can define a new message...

#define MY_MSG     WM_APP+1

... post it from the first view...

abc::Foo()
{
   xyz->PostMessage( MY_MSG, data1, data2 );
}

...and handle it in the second view...

BEGIN_MESSAGE_MAP(xyz, CFormView)
      ON_MESSAGE(MY_MSG, OnMyMsg )
END_MESSAGE_MAP()

LONG xyz::OnMyMsg ( WPARAM data1, LPARAM data2)
{
...
}


Another way is to use UpdateAllViews() mechanism

Avatar of yogesh28577
yogesh28577

ASKER


xyz  *x;
x->PostMessage( MY_MSG, data1, data2 );

the above does not work  i check it
ASKER CERTIFIED SOLUTION
Avatar of alb66
alb66
Flag of Italy image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of yogesh28577
yogesh28577

ASKER

what About Single Tone class many programmer tell me use single tone class for this but i dont found any
example
System Programming
System Programming

Kernel and system programming is the process of creating the software necessary for a computer or device to function and operate other programs. Some operating systems (such as Microsoft Windows) are proprietary, but others, such as the various Linux distributions, are open source.

41K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo