Jump to content


C++ graphic


  • You cannot reply to this topic
3 replies to this topic

#1 Tasneem

    New Member

  • Members
  • Pip
  • 6 posts

Posted 03 July 2005 - 01:24 AM

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

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4976 posts
  • LocationBellevue, WA

Posted 03 July 2005 - 04:57 AM

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)
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 NeZbiE

    Member

  • Members
  • PipPip
  • 61 posts

Posted 03 July 2005 - 02:43 PM

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

#4 Tasneem

    New Member

  • Members
  • Pip
  • 6 posts

Posted 07 July 2005 - 05:40 PM

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..





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users