Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would you create an interface for future expansion?

Status
Not open for further replies.

vb5prgrmr

Programmer
Jul 5, 2002
3,622
US

Usually when creating a system that must consider future expansion I have done seperate windows. Meaning main program shells "add-on/plugin" (if you will) and user interacts with it and it does its own thing. Now I want to move some of these separate programs into the display area of the main program (MDI) but I want to keep their code seperate in their own executable. Further more current specs of each of these "plugins" can be mixed and matched, and nothing can be hard coded in the main application to look for known "add-ons" because who knows what else could be added in the future! (Registry/database settings are acceptable.) Think like the Microsoft Management Console.

I have my own ideas on how to do this but my question is how would you do this?

Hope this makes sense.

 

Nevermind, I have been able to get one of my ideas to work using the following API's

SendMessage
SetParent
SetWindowPos
SetWindowLong
CallWindowProc
CopyMemory

and a dummy MDIChild form in the main application.

Thanks anyways

Oh yeah, if you are interested in how it was done then read on...

The CopyMemory, SetWindowLong, CallWindowProc, and SendMessage API's are used for passing the handles of each applications forms (main app = dummy form, secondary app = current displayed form).

Then the SetParent is used in the secondary app to set its parent to the dummy form in the main app(A MDIChild form).

The SetWindowPos allows me to send resize events to the secondary app from the primary app (The biggest problem I was having).

Peace

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top