-
May 14th, 2011, 09:16 PM
#1
Windows Controls To Hold Numbers
Hey everyone. I have a beginner question. I have recently started writing programs with the winapi and its controls. My question is which control is the best to use for storing numerical data. I am writing a small game and need to know what control to use to store player data and display the data in the program. It should not be a control editable by the user but be able to display game data. Thanks.
-
May 15th, 2011, 10:23 AM
#2
Re: Windows Controls To Hold Numbers
The most appropriate for your purpose are Static controls.
Alternatively, you can use Edit controls with ES_READONLY style set.
To set and get numeric data, you can call SetDlgItemInt and GetDlgItemInt, respectively.
-
May 15th, 2011, 11:15 AM
#3
Re: Windows Controls To Hold Numbers
what control to use to store player data and display the data in the program
It's important to understand that the mentioned static and edit controls' primary intention is to display numbers, but not store ones. To store data of any kind program variables should be used in the most of the cases.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|