Open Control panel app (*.cpl) from MFC app? 
Author Message
 Open Control panel app (*.cpl) from MFC app?

Hi all,

is it possible to open a control panel application from a
MFC application?

I'd like to open the control panel app after a button or a
menu item has been pressed. Is this possible?

Thanks for help...

...Ralf
--
Ralf Specht
Siemens Electrocom GmbH & Co.
Technologieentwicklung (TE1)
Buecklestrasse 5
D-78467 Konstanz, Germany


Phone: +49 7531/86-2603



Tue, 03 Apr 2001 03:00:00 GMT  
 Open Control panel app (*.cpl) from MFC app?

All you need to do is launch control.exe with the name of the cpl file
as the first parameter.  For example, to launch the modem control panel
applet, run "control modem.cpl" from the command line or a CreateProcess
call.

HTH

: Hi all,
:
: is it possible to open a control panel application from a
: MFC application?
:
: I'd like to open the control panel app after a button or a
: menu item has been pressed. Is this possible?
:
: Thanks for help...
:
: ...Ralf
: --
: Ralf Specht
: Siemens Electrocom GmbH & Co.
: Technologieentwicklung (TE1)
: Buecklestrasse 5
: D-78467 Konstanz, Germany
:

: Phone: +49 7531/86-2603

--
--
/*  Andrew  */
WWW: http://www.halcyon.com/ast        



Tue, 03 Apr 2001 03:00:00 GMT  
 Open Control panel app (*.cpl) from MFC app?

says...

Quote:
> Hi all,

> is it possible to open a control panel application from a
> MFC application?

> I'd like to open the control panel app after a button or a
> menu item has been pressed. Is this possible?

> Thanks for help...

> ...Ralf

I just read something about this, think it was in the latest issue of
Windows Developer's Journal (which I don't have here, at the moment.)

The gist was: Since control panel applets are essentially DLLs, use
LoadLibrary (or AfxLoadLibrary) to load the .CPL file, use GetProcAddress
to get the CPlApplet entry point, do what you need to do with the control
panel applet, then call FreeLibrary when you're done.

Sorry this isn't more specific, sine I'm working from memory, but perhaps
it points you in the right direction.



Tue, 03 Apr 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. App locks when Ctrl Panel is opened.???

2. Building .CPL files (control panel applets)

3. Control Panel Applets (CPL)

4. How to add CPL in the control panel

5. How to build a cpl(Control panel extension) in C#

6. Debugging Control Panel apps

7. Forcing a Control Panel App to the foreground

8. Force Control Panel App to the Foreground

9. Adding my app to the Control Panel

10. Invoking Control Panel App with CreateProcess?

11. MFC and DOS apps - Redirecting console output to an MFC app (Newbie)

12. What's different between MFC App and MFC App as NTService

 

 
Powered by phpBB® Forum Software