开发者

How to create a C Program in a GUI window?

I have a bunch of simple programs that I would like to display in a GUI window ra开发者_StackOverflowther than a DOS terminal. How can I accomplish this? Do I need to call upon a library or what? Thanks.


You will need to use a library to do this; the C language does not define any windowing or GUI constructs. Since you're talking about DOS terminals, I'm assuming that you're in Windows, and so you might want to look at the Windows API, which is a C library with all sorts of powerful windowing tools. You might also want to look at one of the many wrapper libraries that are layered on top of this API, like MFC or WPF.


you need to create a windows application project in your compiler, any compiler i know has that option, and include the windows.h library (#include ).


Have a look at the gtk library http://www.gtk.org and if you feel comfortable with c++ i recommend you wxwidgets GUI framework http://www.wxwidgets.org.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜