Pelles C forum

Pelles C => General discussions => Topic started by: post from old forum on September 13, 2004, 09:22:21 PM

Title: Getting variables
Post by: post from old forum on September 13, 2004, 09:22:21 PM
how do i get a word from an input box and make it into a variable that i can work with.

Bryan Whitehorn
Title: Getting variables
Post by: post from old forum on September 13, 2004, 09:22:50 PM
I'm not fully sure what you mean by an input box. Are you referring to an edit control or something like that? If so, you'll want to use GetWindowText to get the text from it. If you mean a console window then you'd use one of the functions from the standard library such as scanf.
If you need to split a buffer of text into words, you could use strtok to loop through them.

Whatever
Title: Getting variables
Post by: post from old forum on September 13, 2004, 09:23:18 PM
i mean from a windows application
from a Editbox in a dialog

Bryan Whitehorn
Title: Getting variables
Post by: post from old forum on September 13, 2004, 09:23:42 PM
Try using the Windows API function GetDlgItemInt().

Pelle