| View previous topic :: View next topic |
| Author |
Message |
booingthetroll Expert Cheater
Reputation: 0
Joined: 30 Aug 2011 Posts: 114 Location: ::1
|
Posted: Sat Feb 23, 2013 4:02 pm Post subject: Button IDs? |
|
|
| I'm sorry, but can anyone give me something explaining what these are? Apparently, buttons have "ids" that determine what they do. I'm really confused about this, so can someone correct me or explain this to me, please? I'm referring to this for CreateWindowEx buttons.
|
|
| Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 893
|
Posted: Sat Feb 23, 2013 4:48 pm Post subject: |
|
|
| Please show which parameter is confusing you or something to give us more context.
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sun Feb 24, 2013 4:47 am Post subject: |
|
|
The hMenu param in CreateWindowEx is what holds the buttons ID number to be used when catching when it's clicked (or any other event for it).
_________________
- Retired. |
|
| Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 893
|
Posted: Sun Feb 24, 2013 4:40 pm Post subject: |
|
|
| His question implied that he was looking at something that determined "what they do." If you're right, and he's just asking about the ID parameter, then the answer is easy: use anything you want, as long as it is unique. Most resource editors for GUI builders generate these IDs automatically and #define string constants for them, so you can refer to the generated controls by name. But in practice, you can put anything you want there (or even make it NULL and hang on to your return value).
|
|
| Back to top |
|
 |
|