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

  • SEARCH
  • Home
  • 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 7001307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:47:11+00:00 2026-05-27T20:47:11+00:00

I have an MFC application that uses an ancient (circa 1999) third-party ActiveX control.

  • 0

I have an MFC application that uses an ancient (circa 1999) third-party ActiveX control.

Since upgrading the project from VS2008 to VS2010, I’m having problems…

In the OnSize handler of the parent dialog IsWindow always returns false for the handle returned by control.GetSafeHwnd(), even when GetSafeHwnd() returns a non-NULL value. The rest of the control’s parent dialog is displayed fine, but it doesn’t seem to respond to any input.

I’ve seen this article, but GetSafeHwnd() isn’t returning NULL in this case (after the first time that it is called, which is before the control is instantiated).

The control does cause the trace message “Control wants to be windowless” to be output when it’s loaded. However it also does this when compiled in VS2008, so this may be a red herring. Searching for this message points me to creating a class derived from COleControlSite, and denying the control windowless-ness, but it seems there are no good example of this available, and as I say, it’s not clear that this is really the cause of the problem.

I’ve also found this issue mentioned on MSDN’s VS2010 porting page:

“An ActiveX control compiled by using Visual C++ 6.0, when embedded in
a dialog box in a project developed by using Visual C++ 2010, may
cause your program to assert at run time. In this situation, open the
ATL or MFC project associated with the ActiveX control in Visual C++
2010, and recompile it.. The assert will be in the file occcont.cpp,
on this line in source: ASSERT(IsWindow(pTemp->m_hWnd)).”

I assume that there’s something about VS6-compiled ActiveX controls that causes the window handles to be treated as invalid by the current Win32 implementation of IsWindow. The suggested solution is of course unhelpful as it’s a third-party control, and we can’t recompile it.

Has anyone managed to get around this?

I’ve already found solutions for VS2010 projects not running on Windows 2000, and errors linking to ODBC, but don’t seem to be able to find anything on this one.

Thanks,

Chris

  • 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-05-27T20:47:12+00:00Added an answer on May 27, 2026 at 8:47 pm

    I didn’t find a solution to this in the end – upgraded the controls to a VS2010-compatible version.

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

Sidebar

Related Questions

I have a WPF application implemented using the MVVM framework that uses an ActiveX
I have a MFC application that launches a IWebBrowser2 window. On users computers where
I have an MFC application that runs on my computer, but when I try
I have a mature MFC C++ application that displays on screen and prints using
We have a MFC 8 application compiled with /CLR that contains a larger amount
I have an application that outputs large amounts of text data to an MFC
I have an application (written in C++ with MFC, but I don't think that
I'm working on a bug where I have an MFC application that does weird
We have an application that uses various system tray icons to communicate with users.
I have an MFC application that spawns a number of different worker threads and

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.