User input DialogBox

Sep 28, 2010 at 1:49pm
Hi,

I'm trying to make a dialog box that have userinput interface
and then prompt up a MessageBox that give a certain output.

I'm using dev c++ program, and I only figured out how to make a message box that have 'ok' and 'cancel' button

Can anyone tell me if it's possible to write in c++ language (I've been google it and only have vc++ or vb examples)
and, if it's possible, what headers and additional library should I use? if give me a simple example, that would be so much helpful.

Thanks a lot
Sep 28, 2010 at 2:47pm
C++ does not have a standard GUI library. However, you could look at the wxWidgets tutorials. It's a cross-platform GUI library.

http://www.wxwidgets.org/

It's got information on using wxWidgets with Dev-C++: http://www.wxwidgets.org/docs/tutorials/devcpp.htm

Sep 28, 2010 at 5:07pm
If you want to use WinAPI, you'll have to create a dialog box.
Here are few tutorials:
http://www.winprog.org/tutorial/
http://zetcode.com/tutorials/winapi/
Sep 29, 2010 at 12:17am
Hi,
I got a pice of code from internet
HWNDhWnd = ::CreateDialog(NULL,MAKEINTRESOURCE(IDD_DIALOG),NULL,NULL);
but it seems HWNDhWnd is not a default phase in cpp?
what header should I add?
Sep 29, 2010 at 12:48am
Maybe <Windows.h> ?
Sep 29, 2010 at 2:53am
I think I got it work!

Thanks everyone!!
Topic archived. No new replies allowed.