Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

C++ custom control for AHK

  • Please log in to reply
6 replies to this topic
  • Members
  • 42 posts
  • Last active: May 19 2013 01:45 PM
  • Joined: 05 Mar 2011
I need a new control on gui that is a multiline listbox.

I'm just wondering how hard it would be to create an dll in visual c++ that will allow me to add that control to a AHK gui?

Here is an example of that control.
Is there a lot of work to make it usable with ahk?

I know c++ a little but I'm not to experienced with advanced programming. Maybe someone has an source code/template for custom control that can work with ahk (I saw them on the board)?

Any help, informations, tips are welcome

  • Members
  • 138 posts
  • Last active: Nov 06 2012 01:58 AM
  • Joined: 17 Dec 2008
Ahk already has multiline listbox's..... You just have to seperate each value with | when you create it the gui


if you want to change it after you have already created the listview you have to use GuiControl. Its all in the help guide.

  • Administrators
  • 2709 posts
  • Hates playing Janitor
  • Last active: Jan 15 2016 11:37 PM
  • Joined: 09 Mar 2008
I believe he means something like this:
gui, add, listbox, x6 y6 w200 r10, Item1|item2|item3`nitem3|item4`nitem4`nitem4
gui, show
<!-- m -->http://img1.uploadsc... ... 5-orig.png<!-- m -->

As hinted by the image in the link. Note the different heights of the rows/colors?
Multi-lined text per 1 row.

rawr. be very afraid
. Populate the AutoHotkey city. Pointless but somewhat fun. .

  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
This might help:
<!-- m -->http://www.codeproje... ... st-Control<!-- m -->

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!

  • Members
  • 42 posts
  • Last active: May 19 2013 01:45 PM
  • Joined: 05 Mar 2011
Yea I saw a lot of modified controls written in c++ or any others but I have one basic question. How to add this control to the gui created in ahk? it must be written specially for ahk?

  • Members
  • 77 posts
  • Last active: Oct 15 2015 04:51 PM
  • Joined: 07 Jan 2009

You will have to make sure that the C++ dll is exporting the control. 
Next you will have to import the dll with AHK 

  • Moderators
  • 7439 posts
  • Last active: Jun 22 2016 09:14 PM
  • Joined: 18 Jun 2008

See for example how Scintilla control is loaded from the dll.

For AutoHotkey_L http://www.autohotke...-wrapper-v1424/

For AutoHotkey_H http://www.autohotke...ib/#entry426197