Th3_GOD
asked on
Any C++ person will know this...im newer....
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.
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.
You can use the GetWindowText API function
Example usuage:
char szCurrentWindowName[1024];
::GetWindowText(hwndNextCh ild,szCurr entWindowN ame,sizeof (szCurrent WindowName ));
char szCurrentWindowName[1024];
::GetWindowText(hwndNextCh
Also see WM_GETTEXT and WM_SETTEXT.
SendMessage(
(HWND) hWnd, // handle to destination window
WM_GETTEXT, // message to send
(WPARAM) wParam; // number of characters to copy
(LPARAM) lParam; // text buffer
);
SendMessage(
(HWND) hWnd, // handle to destination window
WM_GETTEXT, // message to send
(WPARAM) wParam; // number of characters to copy
(LPARAM) lParam; // text buffer
);
ASKER
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. :|
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>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.
There's no universal way to access control properties.
ASKER