Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Technique for edit "in place"? Modless dialogue? Pin
Christian Graus17-Jan-07 8:56
protectorChristian Graus17-Jan-07 8:56 
GeneralRe: Technique for edit "in place"? Modless dialogue? Pin
Dalfxxx17-Jan-07 12:05
Dalfxxx17-Jan-07 12:05 
GeneralRe: Technique for edit "in place"? Modless dialogue? Pin
Christian Graus17-Jan-07 17:16
protectorChristian Graus17-Jan-07 17:16 
AnswerRe: Technique for edit "in place"? Modless dialogue? Pin
Mark Salsbery16-Jan-07 13:19
Mark Salsbery16-Jan-07 13:19 
QuestionLIBPNG DLL with VS 2005 Pin
Bartosz Bien16-Jan-07 11:44
Bartosz Bien16-Jan-07 11:44 
AnswerRe: LIBPNG DLL with VS 2005 Pin
Christian Graus16-Jan-07 13:18
protectorChristian Graus16-Jan-07 13:18 
GeneralRe: LIBPNG DLL with VS 2005 Pin
Bartosz Bien16-Jan-07 13:42
Bartosz Bien16-Jan-07 13:42 
Questionpointer to active document Pin
RalfPeter16-Jan-07 11:18
RalfPeter16-Jan-07 11:18 
Hi folks,

I’ve got a problem getting a pointer to the active document from an MDI. The code below works fine for an SDI, but when I run the binary of the MDI it throws an unhandeled exception error upon trying to access data from the document. When I’m in the editor, however, the intellisense works just fine, ie, when I type ‘pDoc->’ it retrieves the right info from the current document. My question is whether I have to do any additional thing to get the statement below to work for MDIs and what that statement might be.

CMtxDoc *pDoc = (CMtxDoc *)
((CFrameWnd*) AfxGetApp()->m_pMainWnd)->GetActiveDocument();
CString szHold;
pDoc->m_nDim = 2; //exception thrown here

Thx,
Ralf.


ralf.riedel@usm.edu

AnswerRe: pointer to active document Pin
Stephen Hewitt16-Jan-07 11:55
Stephen Hewitt16-Jan-07 11:55 
GeneralRe: pointer to active document Pin
RalfPeter16-Jan-07 12:26
RalfPeter16-Jan-07 12:26 
AnswerRe: pointer to active document Pin
Stephen Hewitt16-Jan-07 12:28
Stephen Hewitt16-Jan-07 12:28 
AnswerRe: pointer to active document [modified] Pin
Mark Salsbery16-Jan-07 13:05
Mark Salsbery16-Jan-07 13:05 
Question_itoa vs _itoa_s [modified] Pin
bs197716-Jan-07 11:08
bs197716-Jan-07 11:08 
AnswerRe: _itoa vs _itoa_s Pin
toxcct16-Jan-07 11:17
toxcct16-Jan-07 11:17 
AnswerRe: _itoa vs _itoa_s Pin
James R. Twine16-Jan-07 11:51
James R. Twine16-Jan-07 11:51 
QuestionCapturing Messages Application Pin
Revant Jain16-Jan-07 10:31
Revant Jain16-Jan-07 10:31 
AnswerRe: Capturing Messages Application Pin
David Crow16-Jan-07 10:40
David Crow16-Jan-07 10:40 
QuestionProblem with GetFocus() Pin
Jader8916-Jan-07 10:17
Jader8916-Jan-07 10:17 
AnswerRe: Problem with GetFocus() Pin
Mark Salsbery16-Jan-07 10:34
Mark Salsbery16-Jan-07 10:34 
GeneralRe: Problem with GetFocus() Pin
Jader8916-Jan-07 10:59
Jader8916-Jan-07 10:59 
Questionlaunch 2 exes with one..... Pin
homerjaylol16-Jan-07 7:31
homerjaylol16-Jan-07 7:31 
QuestionRe: launch 2 exes with one..... Pin
David Crow16-Jan-07 7:34
David Crow16-Jan-07 7:34 
AnswerRe: launch 2 exes with one..... Pin
toxcct16-Jan-07 8:03
toxcct16-Jan-07 8:03 
GeneralRe: launch 2 exes with one..... Pin
David Crow16-Jan-07 8:06
David Crow16-Jan-07 8:06 
GeneralRe: launch 2 exes with one..... Pin
toxcct16-Jan-07 8:10
toxcct16-Jan-07 8:10 

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.