Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

VanKurt

All those controls

This topic is 5246 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there! Creating a dialog with MSVC is really fun! ;-) Placing those controls, sizing them and giving names is really easy. The hard part is writing the code for them :-( I already know how to work with editboxes: By calling SetWindowText() and GetWindowText() It''s easy to check the contents or write some text to them. But what about other controls? Eg. checkboxes or scrollbars?? When I use the above mentioned functions on a checkbox I can only interact with the box''s caption...and that''s totally useless. Isn''t there a way to check if the box is checked or not? Or how do I get the value (maybe in percent) of a scrollbar? Or how do I set the fill-percentage of a statusbar??? I mean there are so many controls but I only found the two functions "SetWindowText() and GetWindowText()" to interact with them....what''s the magic trick about them? Can anyone help me PLEASE :-D ????? Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
Its been a while since I did any MFC stuff, but I think most of what you''re looking for is in the CWnd base class thats used for pretty much all dialog controls.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_mfc_cwnd_class_members.asp

Share this post


Link to post
Share on other sites
MFC? Nono! I''m not using any MFC. It''s just plain Win32-stuff...ye know?

I create the Dialog with CreateDialog() and have a CALLBACK WinProc to handle the events etc.....

Or DO I HAVE TO use MFC?

Share this post


Link to post
Share on other sites
The easiest way is setting member variables, either to the controls or what the controls represent. As I don't know which version of MSVC you're using I'm not sure how to tell you to do it (in 6 and previous there is a class wizard, in 7 it's a more ambiguous property page type thing).

If you're using the resource editor then, yes, you're more or less on the "using MFC" path.

-fel

[edited by - felisandria on June 9, 2004 11:33:58 AM]

Share this post


Link to post
Share on other sites
The Microsoft Developer Network is a massively helpful resource for finding information such as this.

http://msdn.microsoft.com/

It is admittedly much more useful if you have a copy locally and do not have to go out to the web to look something up. Also having a local copy lets you search only in C++ or only in VB. The April 2003 edition was released for free, you might be able to find that still.

When I started Win32 development I found the vast majority of my help from MSDN.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!