IonicWind Software

IWBasic => General Questions => Topic started by: Andy on December 16, 2014, 12:13:25 AM

Title: Control Panel Applet
Post by: Andy on December 16, 2014, 12:13:25 AM
Hi,

Firstly I want to thank everyone for replying to my last couple of questions  :)

Has anyone written a control panel applet in IWB?

I understand it has to be written as a .dll and renamed to .cpl, I've also noticed IWB has a CPL.INC file.

The nearest thing I can find on the forum site was this:
http://www.ionicwind.com/forums/index.php?topic=284.0

Thanks,
Andy.
:)

Title: Re: Control Panel Applet
Post by: LarryMc on December 16, 2014, 01:36:36 AM
I tried to quickly convert the aurora program to IWB with no luck.
Then I started doing some research.

1st, I'm assuming that when you say you are wanting to build a "Control Panel Applet" that you mean you are wanting to build an application that is run from the windows Control Panel itself.

In looking for info I found the following article.
http://windowssecrets.com/forums/showthread.php/160628-Create-your-own-Control-Panel-Applet(s)

what I gleaned from the article was:
1. the procedure changed with the advent of win7
2. you can create a regular exe file and then make some registry entries and there it is.

Read the article and see if you get the same idea.
So, does your application have to work on older computers or just win7 and newer.

Also, maybe someone else has already done this and can jump in and help.
Title: Re: Control Panel Applet
Post by: LarryMc on December 16, 2014, 02:11:51 AM
OK; I got the Aurora code converted.
I can created a cpl file and double click I in windows explorer and it works.

copying the cpl file to the windows/system32 folder did NOT make it show up in the ControlPanel.
I didn't expect it to because I'm on win7

someone needs to try it on xp and vista.

also, someone can try makin the necessary registry entries in win7 to see if it will work.

Everything needed to compile is in the attached zip
Title: Re: Control Panel Applet
Post by: Andy on December 16, 2014, 02:40:36 AM
Hi Larry,

That's great work, thank you!

I got it to work, and made some changes just to try it for myself, no problems.

I will test it on XP a little later, and I will also look at the registry entries needed to register the .cpl
and try to get it to show up in the Control Panel.

Will let you know how I get on.

Thanks,
Andy.
Title: Re: Control Panel Applet
Post by: Andy on December 16, 2014, 05:01:24 AM
Hi,

Once the .cpl file has been compiled I went to the registry:

HKEY_LOCAL_MACHINE
- Software
  - Microsoft
    - Windows
      - CurrentVersion
         - Control Panel
            - Cpls

On the "Cpls" key I added a new string (REG_SZ) called the string Andy
and gave it a value C:\test\CP\cp.cpl (path to the .cpl file)

RESTARTED WINDOWS

And the Applet appeared in the Control Panel.

I've now tried this on both Win7 and XP (32 bit versions).

So we can simply use the REGSETSTRING command to add the control panel entry in the registry.

Andy.
Title: Re: Control Panel Applet
Post by: LarryMc on December 16, 2014, 05:08:56 AM
neat!
Not as bad as I initially thought it was going to be.

way to go!!
Title: Re: Control Panel Applet
Post by: Andy on December 16, 2014, 11:21:07 PM
Great team work I think!

One question for you Larry..

In the resource, you have added custom items 101 and 102.

How did you create them? when I try to modify the filename "Andy's Sample Applet" I get an error in the resource when compiling the program.

I'm probably missing something simple again.

Thanks,
Andy.
Title: Re: Control Panel Applet
Post by: LarryMc on December 17, 2014, 12:15:43 AM
edit the .rc file directly
Title: Re: Control Panel Applet
Post by: Andy on December 17, 2014, 12:36:11 AM
Thanks Larry,

Perfect!

Andy.
:)