All those controls

Started by
3 comments, last by VanKurt 19 years, 10 months ago
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!
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
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?
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]
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~
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.

This topic is closed to new replies.

Advertisement