Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to embed information data and retrieve it from other applications Pin
26-Jun-02 14:46
suss26-Jun-02 14:46 
AnswerRe: How to embed information data and retrieve it from other applications Pin
JohnnyG26-Jun-02 15:37
JohnnyG26-Jun-02 15:37 
AnswerRe: How to embed information data and retrieve it from other applications Pin
Ramu Pulipati26-Jun-02 18:09
Ramu Pulipati26-Jun-02 18:09 
AnswerRe: How to embed information data and retrieve it from other applications Pin
27-Jun-02 2:07
suss27-Jun-02 2:07 
GeneralHelp with Doc/View Usage Pin
Matt Fenwick26-Jun-02 14:46
Matt Fenwick26-Jun-02 14:46 
GeneralRe: Help with Doc/View Usage Pin
Nish Nishant26-Jun-02 14:56
sitebuilderNish Nishant26-Jun-02 14:56 
GeneralRe: Help with Doc/View Usage Pin
Matt Fenwick26-Jun-02 17:15
Matt Fenwick26-Jun-02 17:15 
GeneralRe: Help with Doc/View Usage Pin
Ramu Pulipati26-Jun-02 18:02
Ramu Pulipati26-Jun-02 18:02 
Refer to Kb article http://support.microsoft.com/default.aspx?scid=kb;EN-US;q108587 to fetch the document or view class from anywhere in the MFC app.

Once you have the document pointer, store the (dialog) data in member variable of document class.

void CMyDialog::OnOK()
{
UpdateData(TRUE);
CMyAppDoc * pDoc;

pDoc = (((CMDIFrameWnd*)(AfxGetApp()->m_pMainWnd))->MDIGetActive())->GetActiveDocument();

pDoc->m_Data = m_szDialogdata;
pDoc->UpdateAllViews(NULL);
}

- UpdateAllViews inturn will call OnUpdate function internally. So, implement all the view presentation data on OnUpdate().

void CMyAppView::OnUpdate()
{
//load document using memeber variables
//if using formview, call
UpdateData(FALSE);
}

Hth,
Ramu
Generalbacground color Pin
zeki yugnak26-Jun-02 14:29
zeki yugnak26-Jun-02 14:29 
GeneralRe: bacground color Pin
Nish Nishant26-Jun-02 14:48
sitebuilderNish Nishant26-Jun-02 14:48 
GeneralRe: bacground color Pin
Christian Graus26-Jun-02 17:25
protectorChristian Graus26-Jun-02 17:25 
GeneralBackground color of a CListBox Pin
Mr. Bill26-Jun-02 13:24
Mr. Bill26-Jun-02 13:24 
GeneralRe: Background color of a CListBox Pin
Nish Nishant26-Jun-02 14:52
sitebuilderNish Nishant26-Jun-02 14:52 
GeneralRe: Background color of a CListBox Pin
26-Jun-02 19:00
suss26-Jun-02 19:00 
GeneralRe: Background color of a CListBox Pin
Mr. Bill27-Jun-02 5:11
Mr. Bill27-Jun-02 5:11 
GeneralSingle Instance Dialog Box Pin
Anthony988726-Jun-02 11:34
Anthony988726-Jun-02 11:34 
GeneralRe: Single Instance Dialog Box Pin
Ramu Pulipati26-Jun-02 14:15
Ramu Pulipati26-Jun-02 14:15 
GeneralRe: Single Instance Dialog Box Pin
26-Jun-02 20:20
suss26-Jun-02 20:20 
General"an unknown error occurred while accessing an unnamed file" Pin
Dean Michaud26-Jun-02 11:12
Dean Michaud26-Jun-02 11:12 
GeneralRe: "an unknown error occurred while accessing an unnamed file" Pin
Ancient Dragon26-Jun-02 14:16
Ancient Dragon26-Jun-02 14:16 
GeneralAny Idea why? .... Pin
JohnnyG26-Jun-02 10:29
JohnnyG26-Jun-02 10:29 
GeneralRe: Any Idea why? .... Pin
jbarton26-Jun-02 11:09
jbarton26-Jun-02 11:09 
GeneralRe: Any Idea why? .... Pin
JohnnyG26-Jun-02 14:14
JohnnyG26-Jun-02 14:14 
GeneralRe: Any Idea why? .... Pin
Roger Allen26-Jun-02 13:28
Roger Allen26-Jun-02 13:28 
GeneralRe: Any Idea why? .... Pin
JohnnyG27-Jun-02 3:59
JohnnyG27-Jun-02 3:59 

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.