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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:53:49+00:00 2026-05-13T06:53:49+00:00

I am writing a .Net COM DLL that runs inside a native Windows application.

  • 0

I am writing a .Net COM DLL that runs inside a native Windows application.

I am attempting to inject an additional pane into this app’s statusbar, and it does not have any specific implementation to do so, so I am trying to subclass the app’s statusbar myself.

I am using the Win32 API SetParent() to switch the parent of a label control from a .Net form to the msctls_statusbar32 instance. I used a label because it is the closest implementation to a native “static” class control that I could find without writing my own control.

Somehow I’ve even managed to get NativeWindow to successfully hook in to both the statusbar and my label’s messages (though at the moment it just passes them all to the next WndProc), and I’ve assigned matching styles and styleExs to my label’s window, and I can see my label as a child with the msctls_statusbar32 as its parent. Everything looks like it should be working correctly, but it’s not. My control does not show up in the parent app’s statusbar.

What I don’t understand is why it is not showing up. Nearly everything I can think of matches correctly — granted, the class for my label is “WindowsForms10.STATIC.app.0.378734a” and not “static”, but other than that it is on the correct process and thread, has matching window styles (at least the hex value… Spy++ seems to enumerate them differently), and for all purposes pretty much blends in with the rest of the controls. Would anybody know what else needs to be done to get it to be visible?

(I had originally gone the route of CreateWindowEx and setting WNDPROC callbacks but I could not get the app to work… it would freeze for a minute or so and then unfreeze, and I would notice my window disappeared from the window tree)

Thank you!

  • 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-13T06:53:50+00:00Added an answer on May 13, 2026 at 6:53 am

    As it turns out the answer was dumbfoundingly simple… the label’s X and Y coords were out of the display area of the statusbar parent. Moving them to (0, 0) and it shows up right there! Of course, now the problems have moved on to: C# WinForms control in .Net COM Server won't redraw

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

Sidebar

Related Questions

Writing a .NET DLL how do I find Application.ProductName ? EDIT: Obviously, importing Windows.Forms
I am writing a program (.net 4) that interacts with an external COM object.
I am writing a .NET WinForms application that needs to display a list of
I'm writing in .NET a windows service that, at windows startup, executes some network
I'm writing a .NET command-line application that will migrate users from an existing database
As part of writing custom command (COM-Visible dll with class that implements Interwoven command
I am writing an application (Asp.Net MVC) that contains a lot of reusable components.
I'm writing an application for a Windows Mobile phone in VB.Net, and I would
I am currently writing a Windows application in C# that will add documents to
I am learning .net and writing a service by following the tutorial below http://www.beansoftware.com/NET-Tutorials/Create-Windows-Services.aspx

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.