6 Replies - 12736 Views - Last Post: 11 June 2011 - 02:54 AM Rate Topic: -----

#1 j33h4d  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 75
  • Joined: 16-March 10

Microsoft Visual Studio: How To Program GUI in C?

Posted 09 June 2011 - 08:33 AM

Hey guys~!

I've developed an application which is based on C. The problem is... someone asked me to program a nice GUI for the application. From the day I started doing programming till today, I ever coded GUI only once which was based on Java. :P Now, I need to do it again + in C.

I tried to use Microsoft Visual Studio. I realized, it will automatically generate code in C++. The problem is, I don't know C++. The application I developed is on pure C platform. So, can I just combine both? I mean, GUI in C++ and the engine behind the GUI is in C. If can, can anyone suggests me any website which I can refer to?

I've Google this problem but I couldn't get the right keywords. :blink:

Is This A Good Question/Topic? 0
  • +

Replies To: Microsoft Visual Studio: How To Program GUI in C?

#2 trixt.er  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 52
  • View blog
  • Posts: 426
  • Joined: 28-September 08

Re: Microsoft Visual Studio: How To Program GUI in C?

Posted 09 June 2011 - 08:35 AM

View Postj33h4d, on 09 June 2011 - 09:33 AM, said:

The problem is, I don't know C++.


Learn it! Look into OpenGL and Visual C++ for Visual Studio.
Was This Post Helpful? 0
  • +
  • -

#3 sk1v3r  Icon User is offline

  • D.I.C Addict

Reputation: 231
  • View blog
  • Posts: 668
  • Joined: 06-December 10

Re: Microsoft Visual Studio: How To Program GUI in C?

Posted 09 June 2011 - 09:21 AM

You could, using extern to define the c functions. However you could just change the settings to compile c instead of c++, letting you use c.
Most of the libraries that allow GUI in c++ are written in c.
So, if you are just beginning GUI I would recommend SDL. A good tutorial is lazyfoo. Also SDL has a great documentation wiki. Just type in the function that you wish to understand and the first link is (at least for me) the wiki :)
Was This Post Helpful? 0
  • +
  • -

#4 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 766
  • View blog
  • Posts: 2,229
  • Joined: 20-March 10

Re: Microsoft Visual Studio: How To Program GUI in C?

Posted 09 June 2011 - 09:24 AM

You can still use your c program as the engine.

Aphex19 has a three part tutorial on using win32 API for newbies

Intro to Windows API Part One

Intro to Windows API Part Two

Intro to Windows API Part Three

It wouldnt hurt to also learn some C++ as stated above
you could try a book or

Learn C++
Was This Post Helpful? 1
  • +
  • -

#5 Xupicor  Icon User is offline

  • Nasal Demon
  • member icon

Reputation: 249
  • View blog
  • Posts: 582
  • Joined: 31-May 11

Re: Microsoft Visual Studio: How To Program GUI in C?

Posted 09 June 2011 - 12:55 PM

OpenGL, SDL? Didn't OP want to develop GUI and not a game? :) Sure, you can implement GUI in those, but it'd be many times easier to use ready-made solutions, I think, like GTK+.
http://stackoverflow...-for-c-language
http://www.gtk.org/

This post has been edited by Xupicor: 09 June 2011 - 12:57 PM

Was This Post Helpful? 1
  • +
  • -

#6 Peter Hayman  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 1
  • Joined: 10-June 11

Re: Microsoft Visual Studio: How To Program GUI in C?

Posted 10 June 2011 - 11:16 AM

View Postj33h4d, on 09 June 2011 - 08:33 AM, said:

Hey guys~!

I've developed an application which is based on C. The problem is... someone asked me to program a nice GUI for the application. From the day I started doing programming till today, I ever coded GUI only once which was based on Java. :P Now, I need to do it again + in C.

I tried to use Microsoft Visual Studio. I realized, it will automatically generate code in C++. The problem is, I don't know C++. The application I developed is on pure C platform. So, can I just combine both? I mean, GUI in C++ and the engine behind the GUI is in C. If can, can anyone suggests me any website which I can refer to?

I've Google this problem but I couldn't get the right keywords. :blink:


xvt (xvt.com) is the only c GUI toolkit. I own the product. It may be what you want to do. Check contact page and you can call sales to chat or email. All the best.
Was This Post Helpful? -5
  • +
  • -

#7 Xupicor  Icon User is offline

  • Nasal Demon
  • member icon

Reputation: 249
  • View blog
  • Posts: 582
  • Joined: 31-May 11

Re: Microsoft Visual Studio: How To Program GUI in C?

Posted 11 June 2011 - 02:54 AM

What exactly do you mean by "the only c GUI toolkit"? O_o
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1