Jump to content
  • Advertisement
Sign in to follow this  
Samurai Jack

Winapi/MFC Detect registered classes

This topic is 4728 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings! I was wondering if it is possible to detect, which classes are allready registered. For example, any window you create with WINAPI you bassicaly register a class with a uniqe string name and then you call CreateWindow of class which you had previously registered. I was playing around with MFC and it allows you to enter custom names into CUSTOM CONTROL. That is exactly what I need. If I enter BUTTON or LIST it creates a Button or List control in runtime. The idea is to get that fancy visual studio lists/controls that surley are registered but I don't know their names. It is possible to load packages like OCX or precompiled custom constrols to MFC in Visual Studio/Resource workshop? Thank you in advance

Share this post


Link to post
Share on other sites
Advertisement
if I'm understanding your question correctly, yes you can. Just do the following.

1. Open your project
2. Go to resource view
3. Edit your dialog box, or add one if you don't have one
4. Right click on the box and select insert ActiveX Control

This will show all the controls that are registered in your system registry. You can also load them from a file if you know the path.

I hope I understood your question correctly
moe.ron


EDIT:
Also, be sure you're not using copyrighted custom controls. If you distribute the .ocx file with your game/project/whatever and its copyrighted material you can get in a lot of trouble. I'd imagine most of the Microsoft ones should be ok, but I'd make sure if I were you.





[Edited by - moeron on June 13, 2005 10:57:27 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!