 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat Apr 05, 2008 1:12 am Post subject: C++ dlg item id |
|
|
could anyone tell me how to assign an id to a control, im using win32 and im using createwindow to create edit controls, but i dont know how to set the id without creating a whole new class
i need to use GetDlgItemInt to read the value of the box, and i dont know any other way
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sat Apr 05, 2008 1:22 am Post subject: |
|
|
| Quote: | | Code: | HWND CreateWindowEx(
DWORD dwExStyle,
LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
HMENU hMenu,
HINSTANCE hInstance,
LPVOID lpParam
); |
Parameters
...
hMenu
[in] Handle to a menu, or specifies a child-window identifier, depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window. |
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat Apr 05, 2008 1:40 am Post subject: |
|
|
yes i've read it
but how do i set hMenu as an integer
i've defined my integers and created my hMenu, even got the command to read from the dlgitem working, but my hMenu or control doesn't have that integer value related to it in any way
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Apr 05, 2008 3:10 am Post subject: |
|
|
hMenu is the ID of the control in this case.
Say you used 123 for it. GetDlgItemInt wants a handle to the parent and the child ID.
Example being
| Code: | unsigned int boners = 0;
boners = GetDlgItemInt(hwnd, 100, NULL, FALSE); |
easy as 123 (hurr)
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Sat Apr 05, 2008 4:15 am Post subject: |
|
|
| Code: | #define WINDOW2 666
CreateWindowEx( dwExStyle,
LPCTSTR lpClassName,
LPCTSTR lpWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hWndParent,
(HMENU)WINDOW2,
HINSTANCE hInstance,
LPVOID lpParam ); |
Hehe
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Apr 05, 2008 3:16 pm Post subject: |
|
|
Just a side note, if you are using CreateWindowEx to create your window and controls, then you aren't using dialogs. Instead, you are using pure Win32 API to create your programs interface.
_________________
- Retired. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|