C++ graphic

82a47ed1cd4f646a15eb53476b8caa93
0
Tasneem 101 Jul 03, 2005 at 01:24

HI guys…

hey i was wondering how to create a Input dialog in C++ without using the .rc….

I mean i have created a window which shows the mouse position..joystick workings and all but now i need a button which would trigger a function that will allow the user to enter a charter.
Actually that program allows a user to perform particular function when a keyboard button is pressed.For instance,if ‘W’ is pressed then a message box apprears saying W is pressed.

but i need to make it so that the user would b able to select the charcter…i hope i made the question clear…
I m stuck with the project …doin a Game engine..so need to use this function for letting user select the button for his action…
plz help me soon…i need to submit the project soon..
tc guys
thanks for any help

3 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Jul 03, 2005 at 04:57

I’m not sure whether this is what you’re looking for - but you can create buttons, text boxes, and stuff like that on a regular (non-dialog) window. You use CreateWindow to set up these controls, and then use them like you would a regular dialog-box control.

For details: CreateWindow Function (scroll down to the Remarks section)

760a6f5fe0bf771163e05e808716020b
0
NeZbiE 101 Jul 03, 2005 at 14:43

Are you talking about getting user input under a Windows app, right? (Your phrasing isn’t very clear, and I assume by charter you mean character)
If that is the case, just look up a combination of WM_KEYDOWN/WM_KEYUP, “Message Loop”, and “Window Procedure”

Anyways, MSDN is your friend:

http://msdn.microsoft.com/library/default….yboardinput.asp

82a47ed1cd4f646a15eb53476b8caa93
0
Tasneem 101 Jul 07, 2005 at 17:40

thanks guys..
it helped me..i mean taking a input from the user and then checking which key the user pressed..so that i can show a pop up msg.the whole thing should b in a dialog box..thats all…
tc guys..