Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7952059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:44:53+00:00 2026-06-04T02:44:53+00:00

3rd parameter of OnUpdate is a pointer to CObject . The pointer must be

  • 0

3rd parameter of OnUpdate is a pointer to CObject. The pointer must be downcasted in the view class that implements its own OnUpdate. What is the best way to check if the cast succeed? Use CObject::IsKindOf or dynamic_cast? Is it OK to use RTTI in MFC projects?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T02:44:55+00:00Added an answer on June 4, 2026 at 2:44 am

    If you created your view using the wizards, then it will have put a DECLARE_DYNCREATE in the header file of your view class. If you created it by hand, I would make sure it has a DECLARE_DYNCREATE in the class definition of your view’s header file (or at least a DECLARE_DYNAMIC or DECLARE_SERIAL–DECLARE_SERIAL is generally overkill for a view class).

    THen, when you want to downcast use the DYNAMIC_DOWNCAST macro and test for not NULL on return.

    CView* pView = DYNAMIC_DOWNCAST(CView, pObject); // is one usage

    Don’t listen to advice to not use the MFC macro because it’s not portable… If you’re writing a CView derived class, it’s already not portable–unless you use a toolkit like Wind/U, and then DYNAMIC_DOWNCAST will be portable as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a method (in 3rd-party library) with BigInteger parameter: public void setValue (BigInteger
I have a 3rd Party tool that generates an xml spreadsheet (*.xls). I have
I have a 3rd party JAR that I have converted to an OSGI bundle
Is there any way (3rd party product or other method) to do a partial
We include a 3rd Party lib+DLL that recently causes a lot of trouble on
I'm trying to pass 3 parameter to a script, where the 3rd parameter $_GET['value3']
I'm having trouble implmenting the 3rd parameter in the function documented here: http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/async_read_until/overload4.html What
I have 3rd party library function which only takes Reader as parameter. And I
I've got a SQL Function which has 3 parameters. The 3rd parameter has a
I would like to create an initialisation method for a Java class that accepts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.