| View previous topic :: View next topic |
| Author |
Message |
Pal18 Guest
|
Posted: Mon Jun 30, 2008 1:49 pm Post subject: Control ID question |
|
|
Hi, just a question for support. If I build a ahk app with a GUI progress 'control', ... by default it may have a naming description like "msctls_progress123" or something. Is there anyway I can assign a custom ID like "mycontrolA" instead of default name Windows assigns?  |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Mon Jun 30, 2008 2:21 pm Post subject: |
|
|
You may create a customised control with CreateWindow(). Would not be worth the trouble, I guess.
 _________________
 |
|
| Back to top |
|
 |
Pal18 Guest
|
Posted: Mon Jun 30, 2008 5:22 pm Post subject: |
|
|
| That is interesting! I didn't know it would be so difficult. I am creating a custom application, where I am afraid the gui controls might change over time from the Windows default (if Microsoft has its way). I am curious, how would the CreateWindow( construct, be applicable to a AHK function?? |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1249 Location: USA
|
Posted: Mon Jun 30, 2008 5:24 pm Post subject: |
|
|
they are called common controls for a reason. _________________
ʞɔпɟ əɥʇ ʇɐɥʍ |
|
| Back to top |
|
 |
Pal18 Guest
|
Posted: Mon Jun 30, 2008 5:42 pm Post subject: |
|
|
Thank you, it is true this may be off the beaten path... but I am hoping (skan if you are still out there bud? , this function from MS could be simplified into ahk language-speak somehow
I don't quite understand the conversion process
, ......... thank you if you can help me out!
| Code: |
HWND CreateWindow(
LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
);
|
|
|
| Back to top |
|
 |
Pal18 Guest
|
Posted: Mon Jun 30, 2008 8:15 pm Post subject: |
|
|
Skan, might you have understanding on how to de-crypt this function into AHK for a gui-control I am very much not an expert, but I hope to have at least give it a try if I have a basis for where to go with this to write it out myself  |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Mon Jun 30, 2008 8:22 pm Post subject: |
|
|
I have been wading thru MSDN for past few hours.. It does not seem simple.  _________________
 |
|
| Back to top |
|
 |
Pal18 Guest
|
Posted: Mon Jun 30, 2008 9:09 pm Post subject: |
|
|
Hi there again SKAN Thank you for giving some try and for connecting back.... this group seems very friendly and I appreciate the direct and true responses..... I cannot make this work either.
I am barely 3 weeks into AHK so please forgive me if I don't know all the technical use-words. Do I have to build common controls only? I thought at first I could just run the function and fill in the blanks, but it looks like I cannot do this Nativity and this needs some special effort into maybe figuring out how to parse this into AHK. Where do I start?? Why & where would MSDN be helpful to this extent?
Thank you SKAN for trying.
...
So to all --
I am still trying to set this up as a special simple function to call a GUI elegantly,..... like progress or list view apparatus, with a custom name instead of listview321 i might use ThisListViewA for example,.... so If anyone really knows where to go with this, it would be greatly appreciated for this q here.. |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 666 Location: MN, USA
|
Posted: Mon Jun 30, 2008 11:15 pm Post subject: |
|
|
When calling your own Gui controls internally via the GuiControl command:
| AHK Help File wrote: | | If the target control has an associated variable, specify the variable's name as the ControlID... For this reason, it is usually best to assign a variable to any control that will later be accessed via GuiControl or GuiControlGet, even if that control is not an input-capable type... |
_________________ http://autohotkey.net/~jaco0646/ |
|
| Back to top |
|
 |
|