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
Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

Have you tried to copy the 4 dll + manifest-files to the dll-folder?

I moved the AHKCtrlSupport and Resource dll files also to the Windows\System32 directory. There they work, but not if they are in another directory, not in the path. Can it be that some functions from the Resource.dll are called from AHKCtrlSupport, and they are not found? It would be nice, if the directory were also searched (first), where the caller resides, because I don't like to edit my 10 m long path or copy the experimental dll files to System32. But, the controls are awesome! We don't need WordPad any more, unless pictures are used. Thanks for sharing these!

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
@Laszlo: It should be enough if you copy all dlls + the AHK script in one folder.
If you like you can copy the MFC*.dlls and the manifestfiles to the system32 folder, but you do not need to copy them to that place.

The resource.dll should be in the same folder as the ahkctrlsupport.dll. If you change the variable szFilename=xxx to point to the location of the resource.dll you can move the dll to another place.

The AHKCtrlSupport.dll loads icons and bitmaps from the resource.dll. Therefore it must be found. The controls needs the resources. I moved them to another dll, because you can expand the dll or use another dll if you adjust the ids in the script.

Ciao
Micha

Demokos as guest
  • Guests
  • Last active:
  • Joined: --
@Micha : I seen in the picture that you seem to have the same problem as me with the RTF control : the color dropdownlist control of the toolbar is OK for the first use, but after it does not function correctly any more. May be it is a problem with the original control from CodeProject, but do you think you can resolve the problem or delete/hide this dropdown list of the toolbar if you can't repair it ?
Thanks by advance.

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

@Micha : I seen in the picture that you seem to have the same problem as me with the RTF control


Hi Demokos,
funny but the demo app and the debug-version of my dll is working. The release-dll had the bug you described.
To create the colorpicker the command AfxRegisterWndClass is used. In release the registered window is not automatically deregistered and the second call throws an exception.
I did a workaround but have to investigate it.

It would be kind to give me an answer if the new dll is working.

Ciao
Micha

robiandi
  • Guests
  • Last active:
  • Joined: --
@micha: The new dll is working.

Demokos
  • Members
  • 105 posts
  • Last active: Jan 20 2011 06:28 PM
  • Joined: 28 Dec 2005
I confirm. It's OK now. Thanks.

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Is it hard to mod the Analog Clock, so the font of the hours could be selected, with its size, and making the date field optional (it overflows)? The numbers are visibly offset (to the lower right). If the clock is small, they even get outside.

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

Is it hard to mod the Analog Clock, so the font of the hours could be selected, with its size, and making the date field optional (it overflows)? The numbers are visibly offset (to the lower right). If the clock is small, they even get outside.


Hi Laszlo,
added this to the todo-list.

Does the dll work now or do you still have problems that the dll is not working if the mfc / resource dlls are not in the same folder as the script?

Ciao
Micha

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005

Does the dll work now or do you still have problems that the dll is not working if the mfc / resource dlls are not in the same folder as the script

I still have problems if they are in different directories, so I copied them all into one, which is in the path. I figured I would use the rich text control often, so this move is justified. Thanks for the nice work!

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
Hi,
changed the wallclock to support other fonts
adjusted positions of numbers
date can be turned on/off

Ciao
Micha

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
Added first try of a HTML-control (not as easy as I thought / ugly ole :? ).
Further enhancements will follow immediately

Ciao
Micha

Demokos as guest
  • Guests
  • Last active:
  • Joined: --
Thanks Micha for the Secure Edit, the LED Static control and the begining of the HTML Control. They are very good.

I'm not sure but I think there isn't any right and left margin in the RTF Edit, so align to the right may be a problem. If the text you enter fit in the window, the right margin is at the right end of the length of the control, but if one of the lines you enter is longer than the length of the control, the right margin will be at the end of the text of this line.
Dou you think it is possible to have a right margin (and left, and why not a first line indent margin !!!), so when you type a text and you ar near of this margin, the rest of the text go automaticaly on the next line ? And if so, can you do it ?

not-logged-in-daonlyfreez
  • Guests
  • Last active:
  • Joined: --
Excellent work!

What 'annoys' me though, is the size of the DLLs... too big to include it in any project right now... Any chance you can split the functionalities up into several small DLLs instead of one big one? And the size of the MFC DLLs is quite hefty, can they be made smaller, or - better - can we do without?

8)

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

And the size of the MFC DLLs is quite hefty, can they be made smaller, or - better - can we do without?

I think that WinXP is shipped with these DLLs, but I can be wrong.
They are also installed by a lot of applications, althought there are variants (version numbers).

Of course, if you plan to distribute a script depending on these controls, it can be risky to assume they are installed, but they can be easily found on the Net, or be distributed aside with the script, to be downloaded only if required.

These controls can be rewritten without MFC, but it is usually a lot of work...
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

Demokos as Guest
  • Guests
  • Last active:
  • Joined: --
@daonlyfreez :

Excellent work!

I'm agree with you

What 'annoys' me though, is the size of the DLLs... too big to include it in any project right now...

I don't see where is the problem. OK the size is big but acutally the supports are too (hard disks, memory sticks, CD, ...) It can't fit on a diskette, but is it really a problem ? I don't think so.

Any chance you can split the functionalities up into several small DLLs instead of one big one?

I'm absolutely agree, if it's possible, so we can use only the controls we need.

And the size of the MFC DLLs is quite hefty, can they be made smaller, or - better - can we do without?

I'm afraid we can do without the DLL, as the controls are MFC ones. I think that they are MS property, and that we have not the sources so we can't reduce their size. May be I'm wrong

@Micha : do you think that, for the LED Static control, there is a possibility to have more colors avaible ? Thanks