AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Control ID question

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Pal18
Guest





PostPosted: Mon Jun 30, 2008 1:49 pm    Post subject: Control ID question Reply with quote

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? Smile
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Mon Jun 30, 2008 2:21 pm    Post subject: Reply with quote

You may create a customised control with CreateWindow(). Would not be worth the trouble, I guess.

Smile
_________________
Back to top
View user's profile Send private message
Pal18
Guest





PostPosted: Mon Jun 30, 2008 5:22 pm    Post subject: Reply with quote

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

PostPosted: Mon Jun 30, 2008 5:24 pm    Post subject: Reply with quote

they are called common controls for a reason.
_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
Pal18
Guest





PostPosted: Mon Jun 30, 2008 5:42 pm    Post subject: Reply with quote

Thank you, it is true this may be off the beaten path... but I am hoping (skan if you are still out there bud?Smile, this function from MS could be simplified into ahk language-speak somehow Smile Smile


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





PostPosted: Mon Jun 30, 2008 8:15 pm    Post subject: Reply with quote

Skan, might you have understanding on how to de-crypt this function into AHK for a gui-control Smile 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 Smile
Back to top
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Mon Jun 30, 2008 8:22 pm    Post subject: Reply with quote

I have been wading thru MSDN for past few hours.. It does not seem simple. Sad
_________________
Back to top
View user's profile Send private message
Pal18
Guest





PostPosted: Mon Jun 30, 2008 9:09 pm    Post subject: Reply with quote

Hi there again SKAN Smile 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?

Smile Rolling Eyes

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

PostPosted: Mon Jun 30, 2008 11:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group