Click here to Skip to main content
15,902,817 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: slider bar Pin
Gary R. Wheeler5-Sep-04 9:57
Gary R. Wheeler5-Sep-04 9:57 
QuestionHow to freeze a process Pin
gamitech5-Sep-04 9:22
gamitech5-Sep-04 9:22 
AnswerRe: How to freeze a process Pin
Gary R. Wheeler5-Sep-04 10:04
Gary R. Wheeler5-Sep-04 10:04 
GeneralRe: How to freeze a process Pin
Neville Franks5-Sep-04 10:46
Neville Franks5-Sep-04 10:46 
GeneralRe: How to freeze a process Pin
Gary R. Wheeler5-Sep-04 14:42
Gary R. Wheeler5-Sep-04 14:42 
GeneralRe: How to freeze a process Pin
Anonymous6-Sep-04 9:52
Anonymous6-Sep-04 9:52 
GeneralDocument / view basic C++ question Pin
Vaclav5-Sep-04 9:22
Vaclav5-Sep-04 9:22 
GeneralRe: Document / view basic C++ question Pin
PJ Arends5-Sep-04 10:09
professionalPJ Arends5-Sep-04 10:09 
Your document class is derived from CDocument, so you can do a direct comparison of the pDocument pointer and the address of your document.
if (pDocument == &MyDocument)
You can do the same with the pView and your view.

If you do not have the address of your document and view, and just want to check if the returned pDocument or pView are of the same type as yours, then you can do a dynamic_cast of the pointer. The cast will return NULL if the pointer does not point to an object of your type
CMyView *pMyView = dynamic_cast<CMyView *>(pView);
if (pMyView == NULL)
    // The pView pointer is not the type I am looking for
else
    // The pView pointer is also a pMyView pointer


[edit]fixed the < and > characters[/edit]








"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04

Within you lies the power for good - Use it!
GeneralRe: Document / view basic C++ question Pin
Vaclav5-Sep-04 19:59
Vaclav5-Sep-04 19:59 
GeneralRe: Document / view basic C++ question Pin
PJ Arends6-Sep-04 9:33
professionalPJ Arends6-Sep-04 9:33 
GeneralValidating Paths Pin
Joel Holdsworth5-Sep-04 8:22
Joel Holdsworth5-Sep-04 8:22 
GeneralRe: Validating Paths Pin
PJ Arends5-Sep-04 9:06
professionalPJ Arends5-Sep-04 9:06 
GeneralRe: Validating Paths Pin
Joel Holdsworth5-Sep-04 10:23
Joel Holdsworth5-Sep-04 10:23 
GeneralRe: Validating Paths Pin
PJ Arends5-Sep-04 10:32
professionalPJ Arends5-Sep-04 10:32 
GeneralRe: Validating Paths Pin
Joel Holdsworth5-Sep-04 11:37
Joel Holdsworth5-Sep-04 11:37 
GeneralRe: Validating Paths Pin
CKLam5-Sep-04 9:08
CKLam5-Sep-04 9:08 
GeneralRe: Validating Paths Pin
Ravi Bhavnani5-Sep-04 9:28
professionalRavi Bhavnani5-Sep-04 9:28 
GeneralRe: Validating Paths Pin
Michael Dunn5-Sep-04 15:15
sitebuilderMichael Dunn5-Sep-04 15:15 
GeneralOpenGL question Pin
alex.barylski5-Sep-04 8:19
alex.barylski5-Sep-04 8:19 
GeneralRe: OpenGL question Pin
Ryan Binns5-Sep-04 18:37
Ryan Binns5-Sep-04 18:37 
GeneralRe: OpenGL question Pin
alex.barylski6-Sep-04 9:35
alex.barylski6-Sep-04 9:35 
GeneralRe: OpenGL question Pin
Henry miller7-Sep-04 4:15
Henry miller7-Sep-04 4:15 
QuestionOnMouseWheel for horizontal scroll? Pin
CKLam5-Sep-04 7:50
CKLam5-Sep-04 7:50 
GeneralMultithreading problem in Win32 Pin
Dev5785-Sep-04 7:27
Dev5785-Sep-04 7:27 
GeneralRe: Multithreading problem in Win32 Pin
Joel Holdsworth5-Sep-04 8:38
Joel Holdsworth5-Sep-04 8:38 

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.