Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

New controls on GUI windows (Buttons, Statics, HMTL, RTF...)


  • Please log in to reply
132 replies to this topic
sosaited
  • Members
  • 278 posts
  • Last active: Oct 06 2009 06:08 PM
  • Joined: 24 Feb 2005
Great add on for AHK... keep up the good work

Can you please add another function to ur Dll :
Icons in Menu (Generated by AHK command Menu...)
Thanks
My small "thanks" to AHK in shape of these dedicated 3d images
Posted Image

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
The script is great. When I closed the GUI however I got a strage error message:

Posted Image

Running Windows XP Pro SP2. Extra MFC dlls were required.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
Hi,
@Demokos
I've changed the code. You can create a RTFEdit with fixed margins (right margin is right border of the control) or that the control behaves as you know it.
When creating the RTFEdit you can use the last parameter to change its behavior. From the "help":

0: no horizontal scrolling
1: horizontal scrolling


@not-logged-in-daonlyfreez: The dll is 276 KB. Not very much for the features inside. The resourcedll is over 1 MB. That dll is only used for the bitmaps, icons, dialogs... If you use controls, that don't use them you can get rid of the resource.dll or provide your own resource.dll. For every control you can specify the resource-number, even if you use your own dll with resources inside.
Edit: To retrieve the number of an icon-resource you can use the great tool from toralf:
http://www.autohotke...=asc&highlight=

Perhaps someone could make the dlls smaller, by not using MFC. But these controls are mfc-controls and mfc is MUCH easier to use than plain API-calls. Now I can use the ready-to-use controls by writing a wrapper around them to make them work with AHK. Programming them without MFC means to rewrite them from scratch. (about 2-3 weeks for ONE control). For me I must say that the the cost (time) is too much to do this.

[email protected]: If I would use the 2003th compiler, the needed dlls are on almost every Pc, but I'm using the new 2005th compiler. The chance is very low that PCs already have that dlls on board.
That's the reason why you have to download the dlls.

@not-logged-in-daonlyfreez
As written many times:
Every company has a setup-program which does not only install the software you bought, on the CD (inside the setup) are also all the dependend files the software use.
If I make a setup for the "tiny" dll to ensure that the dll will work on every PC, I HAVE to include the MFC-REDIST-Runtime as written there http://www.autohotke...opic.php?t=7380.
In that package is everything you need but it's very huge. Therefore I extracted the needed DLLs which you can download seperatly.
If I would use the old compiler you even can't be sure that every computer will have the files already installed and you have to include them (almost same size) with my dlls.

Any chance you can split the functionalities up into several small DLLs

Well, I could split every control to a new dll, but than you will have 10 dlls with almost 150 KB per file. Now you have one dll with 280KB. I do not see the sense in that. For every dll the overhead is very high. The size of the functionality (controls itself) inside the dll is small.
Someone could want to use 2 or more controls in their AHK-script and have to include 3 or more dlls. The script would be larger and more complicated, because you have to load more dlls ... ...

Sorry, but the way I do it now brings much effort with less cost of time. Even if the controls are no magic it would cost much time to develop them from scratch without mfc, test and maintain them.

To install them on foreign computers you could use (i.e) winrar to create a small installer which extracts all files to one folder. While winrar is an archiver the files are almost as small as they can be


@Demokos as Guest

for the LED Static control, there is a possibility to have more colors avaible

I've put that on the todo-list. The native control can only have these few colors, but it should be no great deal

Ciao
Micha

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
You posted seconds after I did, don't forget my message :)

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005

Can you please add another function to ur Dll :
Icons in Menu (Generated by AHK command Menu...)
Thanks


Puh, I'll have a look at that, but AFAIK it's not as easy, because these menus are always user-drawn.

I'll put it on the todo-list

Ciao
Micha

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005

The script is great. When I closed the GUI however I got a strage error message:


Grmpfl, I had the same problem, since I began to integrate the HTML-control. This is the first OLE-control in my dll and I had problems to initiate ole.
But than I found the cause and the problem has gone.
I'm not 100% sure that it is the same problem, but the result (AHk dies when closing the script) seems to be the same. I'll have a look at it immediately.
Thanks for the info

Edit: Do you have the latest dll? If not, please download the latest one and tell me if you still have the problems.

Ciao
Micha

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
@Micha: Thanks for your comments.

I can understand that working with MFC makes your life much easier, and I didn't know that splitting the DLLs up would cost so much on overhead.

Small annoyance remains that - even if the user would have the MFC DLLs already on their system, AFAIK, they would probably still need a copy in the script folder for it to work. Can you elaborate on that? Is there a way to find and use existing MFC DLLs if they are present, and if so, how? They are not present on Win2k-SP4, and if I understand correctly, you would still need to add them on WinXP too...

Still great what you are doing, makes AHK more 'spicey', but dependencies like that always make me shiver (e.g.: .NET -> iiiiiiiiiiiiiiiiiiiii, go away! :p )

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
Hi,

Is there a way to find and use existing MFC DLLs if they are present, and if so, how? They are not present on Win2k-SP4, and if I understand correctly, you would still need to add them on WinXP too...

There are problems, if you only copy the "extracted" mfc-dlls (2dll+2manifest-files) to another folder.
If you start the MS-VCRedist-setup, these dlls are installed correctly and my dll is working without having the MFC-dlls in the same folder.

(e.g.: .NET -> iiiiiiiiiiiiiiiiiiiii, go away! :p )

Well if I would have used .NET, i'm sure that nobody would install 30 MB runtime to achive the same result as with the "tiny" 3MB MFC VC8 runtime files. :-)

Ciao
Micha

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --

There are problems, if you only copy the "extracted" mfc-dlls (2dll+2manifest-files) to another folder.
If you start the MS-VCRedist-setup, these dlls are installed correctly and my dll is working without having the MFC-dlls in the same folder.


Hmm, ok, I see, but I want to avoid using an installer, might be that the user has no priviledges to install... Is there a way to make the DLL 'point to' the MFC DLLs, regardless where they are located? So, you'd only need a copy of them once, and no necessary installation in the system folder?

Well if I would have used .NET, i'm sure that nobody would install 30 MB runtime to achive the same result as with the "tiny" 3MB MFC VC8 runtime files.


:lol: I sure am glad you didn't use .NET, and in perspective, 3MB does seem small then... :p

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

Hmm, ok, I see, but I want to avoid using an installer, might be that the user has no priviledges to install... Is there a way to make the DLL 'point to' the MFC DLLs, regardless where they are located? So, you'd only need a copy of them once, and no necessary installation in the system folder?

Just put them in some folder, and alter the PATH environment variable to include the path to this folder. It should work.
You may need some administrative privileges to alter the path (or not?).

Well if I would have used .NET, i'm sure that nobody would install 30 MB runtime to achive the same result as with the "tiny" 3MB MFC VC8 runtime files.

:lol: I sure am glad you didn't use .NET, and in perspective, 3MB does seem small then... :p

That's why I carefully avoid to install .NET on my old Win98SE computer, where I struggle to keep around 200-300MB free out of the 6GB hard disk...
On WinXP (at least the SP2 flavor), .NET runtimes are pre-installed.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

daonlyfreez
  • Members
  • 995 posts
  • Last active: Jan 23 2013 08:16 AM
  • Joined: 16 Mar 2005
AFAIK changing the PATH variable also needs admin/poweruser priviledges... but I could be wrong...

Thanks for the suggestion though.
Posted Image mirror 1mirror 2mirror 3ahk4.me • PM or Posted Image

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005

AFAIK changing the PATH variable also needs admin/poweruser priviledges... but I could be wrong...


Hi,
it depends. You can't change the system-path, but you also have user variables.
You can add a user variable "path". That one is added to the systemvariables and therefore should behalf as the sys-var.

----------
Added support for all back/colors for the LED-static control

Ciao
Micha

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Yes, you are right of course. And user environment variables mask the system ones, if conflict.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005

Can you please add another function to ur Dll :
Icons in Menu (Generated by AHK command Menu...)


Hi,
since shimanov posted a solution without the need for an extra dll, do you still need it?
http://www.autohotke...=asc&highlight=

Ciao
Micha

sosaited
  • Members
  • 278 posts
  • Last active: Oct 06 2009 06:08 PM
  • Joined: 24 Feb 2005

Hi,
since shimanov posted a solution without the need for an extra dll, do you still need it?

That is indeed a nice script but it doesnt work for me :cry:
http://www.autohotke...pic.php?p=53040

so if u change ur mind.. (or can help me with that script's problem i am facing) please post reply..

And is a Video Control on ur ToDo list?

Thanks
My small "thanks" to AHK in shape of these dedicated 3d images
Posted Image