Jump to content
  • Advertisement

Archived

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

Ax

Win32 Randomness

This topic is 5793 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

I stepped away from the Win32 API for awhile, came back, and...memory lapse! Anyway, I'm having troubles with window's GetDlgItemInt/SetDlgItemInt functions; how do I go from a pointer to int to an int? Ex.:
int* variable;

...
GetDlgItemInt(dlg_hwnd, DLG_TEXTBOX, variable, TRUE);
...
//miles down the code
SetDlgItemInt(dlg_hwnd, DLG2_TEXTBOX, variable, TRUE);
...
 
Okay, the second is where the error occurs -- obviously. So, how do I go from the pointer obtained via the GetDlgItemInt to a regular int so I can pass it through the SetDlgItemInt function. Thanks, Ax [edited by - Ax on November 9, 2002 7:20:58 PM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
If you use *variable it passes the value that the pointer points to. So it will be treated as an int data type.

so....

SetDlgItemInt(dlg_hwnd, DLG2_TEXTBOX, *variable, TRUE);

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!