Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Any C++ person will know newer....

Posted on 2004-09-07
Medium Priority
Last Modified: 2012-05-05
Ok, im doing win32 programming and begining to figure things out. I just want to know howto do a couple basic things. Although it does'nt really matter too much I am compiling using Mingw 3. All sample programs built for MS vC++ have compiled fine.  I am hard coding all the events and everything although as noted below i want to use dialogs.
What i want to know includes:

Utilize and use a dialog interface compiled with resource compiler in my code.

Access\Alter a controls properties [I know a bunch of api calls that can manipulate certain properties, but i want like the -> or . funcitons so i can directly access properties of a control.] Or is this done using the Getmessage and Sendmessage? How do i use them to do this?

If its not too complex access to Active X would also be nice. Im not using MFC. Im rather new to c++ but have a pretty solid base. If someone built a sample application it would be nice for them to include howto put a value from one textbox to another, howto add items to a listbox, and howto set common form properties. I would sacrifice much of this if i just knew howto use dialog resources from my code.
Question by:Th3_GOD
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2

Author Comment

ID: 11998310
Ok ive figured out howto manipulate properties of controls but now need to know howto get the text from text boxes etc. I would also like to know what a good reference for the list of commands to use with SendMessage and its corresponding common controls. By the way im an experienced VB programmer and know many server side web scripting langauges including php, if that helps anyone calibrate their answers.
LVL 30

Expert Comment

ID: 11998818
You can use the GetWindowText API function
LVL 30

Expert Comment

ID: 11998832
Example usuage:
char szCurrentWindowName[1024];
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 30

Expert Comment

ID: 11998862

  (HWND) hWnd,              // handle to destination window
  WM_GETTEXT,               // message to send
  (WPARAM) wParam;          // number of characters to copy
  (LPARAM) lParam;          // text buffer

Author Comment

ID: 12007769
The sendmessage stuff is what im specifically looking for. I know about all the special API funcitons that can set backgrounds get text etc.  That works but i like a universal way to access control properties weather or not theirs an API call for it. I take it i just stick the variable \ a pointer to the variable in the lParam. One thing though thats still unanswered. Where can i get a reference for all the messages i can send with send message? Also is it easy to use activeX controls? One thing that i do Need anwers to is howto use dialogs once I've compiled them using a resource compiler. :|
LVL 30

Accepted Solution

Axter earned 720 total points
ID: 12008020
Check out following links:

If you need details on any of the WM_ variables, you can also do a keyword search on MSDN.

LVL 30

Expert Comment

ID: 12008033
>>That works but i like a universal way to access control properties weather or not theirs an API call for it

There's no universal way to access control properties.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question