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 7686011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:22:58+00:00 2026-05-31T19:22:58+00:00

I have a bit of a problem here. I have a third party ActiveX

  • 0

I have a bit of a problem here.

I have a third party ActiveX control which converts files from one type to another. I want to convert many files, so I need to run it in batch conversion. However this control crashes a lot (I’m not talking about nice C++ exceptions, it does cute things like accessing already freed memory, doing access violation, you name it).

So my problem is the following:

1) I need to wrap this ActiveX control in a separate process, to prevent it from corrupting the memory of my main process.

2) I need to call this process possibly hundreds of times, and with small files on a quick computer it gets called 5-6 times a second

3) I need to make this process completely silent, the user must not be aware that a process is being executed many times

4) However because it’s an ActiveX control I also need to create a hidden dialog in the process which hosts the ActiveX control

But when I create the hidden dialog, it seems to take away the focus from the active window for a moment, and then returns it back. As this process can get called 5-6 times a second, it breaks keyboard input for a user, and it also makes the currently active window flicker rapidly, switching from active to inactive state.

I’m using a CDialog-derived class to host the ActiveX control. The Visible flag is turned off from the resourse editor to prevent it from showing. I’m creating the dialog by calling CDialog::Create, not DoModal.

How can I prevent the dialog from taking away the focus?

  • 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-31T19:23:00+00:00Added an answer on May 31, 2026 at 7:23 pm

    It turns out the problem was entirely with CDialog. It was stealing focus even without an ActiveX or any modifications. So the solution was to create my own window class that uses DefWindowProc, and use that as the parent of the ActiveX (it did requre a parent, it failed when I specified NULL for pParent).

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

Sidebar

Related Questions

I have a bit of an architecture problem here. Say I have two tables,
I have run into a bit of a problem here: I had a problem-specific
I'm having a bit of a problem here. We have 2 urls let me
I have a feeling my problem is a bit strange, but here goes... I
i have a bit of logical problem here. I have a catalog of products
I have a little bit problem with resizing Listview control. I intend to make
I seem to have a bit of a problem here that I can't quite
I have a bit of a weird problem here! I am trying to write
This is a little bit of weird problem here. Say I have a C++
I have a bit of a problem here. Based on my previous question asked

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.