Thread: Windows GUI

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    71

    Question Windows GUI

    @Darius Dempsey what library you use for your game?

    Moderator note: this thread was split from Random suites for black jack game..
    Last edited by laserlight; 04-04-2011 at 12:44 PM.

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by nutzu2010 View Post
    @Darius Dempsey what library you use for your game?
    You're kidding right?

    Instead of trying to find libraries for everything, try writing some real code sometime...

    Really... his original code was less than 30 lines.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    71
    Quote Originally Posted by CommonTater View Post
    You're kidding right?

    Instead of trying to find libraries for everything, try writing some real code sometime...

    Really... his original code was less than 30 lines.
    sorry,I thought this game is make with a graphical interface
    Soon, I'll pass to GUI in C,and I wanted to see what library use

    maybe I do a game like this

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by nutzu2010 View Post
    sorry,I thought this game is make with a graphical interface
    Soon, I'll pass to GUI in C,and I wanted to see what library use

    maybe I do a game like this
    If you're on windows the best GUI library is the one built into windows itself. Everything else is just a wrapper and simply adds more code without providing much benefit... In fact some of the bad ones impose penaties both in performance and size.

    Take a look at theForger's Win32 API Tutorial for a start on windows GUI programming... but be warned, it ain't like no C code you've ever seen before.

  5. #5
    Registered User
    Join Date
    Dec 2010
    Posts
    71
    thanks,@CommonTater...I guess it works only on Windows.
    would be a wise decision to go to GUI on c++?

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by nutzu2010 View Post
    thanks,@CommonTater...I guess it works only on Windows.
    would be a wise decision to go to GUI on c++?
    Linux etc. have their own versions of "WinAPI" coding, you'll need to do that reasearch if you are not on a Windows system ... Google is your friend.

    You can do WinAPI in C or C++ ... that's up to you.

    I do WinAPI coding in C all the time... Remote Media (shameless plug )

  7. #7
    Registered User
    Join Date
    Dec 2010
    Posts
    71
    I am on windows...
    So to make an application with a graphical interface you have to do a different code for each system?

  8. #8
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    First off... Moderator... can you split this thread, it's turning into a hijack!


    Quote Originally Posted by nutzu2010 View Post
    I am on windows...
    So to make an application with a graphical interface you have to do a different code for each system?
    Well, windows GUI is very different than Linux GUI which is different than MAC GUI ... so yes each OS has it's own way of doing things.

    There are widget libraries you can use for cross-platform development but you pay a price in all of size, speed and capability for doing it.

    (also ... Please stop hitting "like" for everything. It is massively annoying to have to clear the notifications all the time)
    Last edited by CommonTater; 04-04-2011 at 09:49 AM.

  9. #9
    Registered User
    Join Date
    Dec 2010
    Posts
    71
    Well, windows GUI is very different than Linux GUI which is different than MAC GUI ... so yes each OS has it's own way of doing things.

    There are widget libraries you can use for cross-platform development but you pay a price in all of size, speed and capability for doing it.
    thanks again!(that was the last question)
    (also ... Please stop hitting "like" for everything. It is massively annoying to have to clear the notifications all the time)
    I gave only two "LIKE" and I thought it will help you

  10. #10
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by nutzu2010 View Post
    thanks again!(that was the last question)
    no worries....

    I gave only two "LIKE" and I thought it will help you
    Naaa... it makes no difference at all. It's a number that shows up in my profile but is otherwise totally meaningless. The problem is that each time we get a new "like" the little notifications area (where it says "private messages") shows a new item and I have to go and hunt it down to clear the notification.

  11. #11
    Registered User
    Join Date
    Dec 2010
    Posts
    71
    Quote Originally Posted by CommonTater View Post
    no worries....
    ok,but sorry for offtopic
    1)I looked over your link codes in GUI and yes, they are very different from what I did
    I must learn these functions?or just need to understand?
    Code:
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    	LPSTR lpCmdLine, int nCmdShow)
    2)When should I switch from the command Line to GUI?

  12. #12
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by nutzu2010 View Post
    ok,but sorry for offtopic
    1)I looked over your link codes in GUI and yes, they are very different from what I did
    I must learn these functions?or just need to understand?
    Code:
    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    	LPSTR lpCmdLine, int nCmdShow)
    That is the entry point for a windows graphic mode program. Same as int main(void) is the entry point for a console program.

    2)When should I switch from the command Line to GUI?
    Not quite shure what you're asking...

    1) If you mean inside a program... In the windows OS a program is either GUI or Console mode, you don't get to switch back and forth.

    2) If you are asking about skill levels... you need to be pretty confident in general C programming before you start trying graphic mode stuff.

    Your best bet is to get a good compiler --I generally recommend Pelles C because it comes with all the tools you need for GUI mode programming-- get fairly good with console mode first, then follow The Forger's tutorial step by step doing each of the examples as you go. Windos API incorporates ~30,000 function calls... you don't master it in an hour.

  13. #13
    Registered User
    Join Date
    Dec 2010
    Posts
    71
    yes, I mean 2)
    is good this IDE(codeblocks with mingw) ?anyway,I'll try more IDE/compiler

  14. #14
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by nutzu2010 View Post
    yes, I mean 2)
    is good this IDE(codeblocks with mingw) ?anyway,I'll try more IDE/compiler
    Did you click on the link I gave you to Pelles C? (hint: Bold faced red typeface...)

    Code::Blocks has no (= zero) windows GUI aids included. If you use it you will have to find editors for dialogs, string tables, menus, accellerators, manifests, icons, bitmaps, etc. separately, as free standing components... and good luck finding a free standing Message Table editor at all.

    Pelles C has all that (and more) built in, it's C-99 standard C, with some extra libraries... and yes, it's free.

  15. #15
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    If you want to go C++ save yourself alot of headache and just go to Products — Qt - A cross-platform application and UI framework and download Qt creator. You will have a designer with drag-and-drop for building your GUI and Qt is an excellent framework to do GUI programming in c++.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making a windows GUI app
    By Pota in forum C++ Programming
    Replies: 7
    Last Post: 03-09-2011, 05:29 PM
  2. C++ gui for windows where to start
    By prixone in forum Windows Programming
    Replies: 2
    Last Post: 12-16-2006, 11:48 PM
  3. Windows GUI Preprocessing
    By Jaken Veina in forum Windows Programming
    Replies: 5
    Last Post: 07-22-2005, 01:22 PM
  4. Linux's GUI slower than windows'....
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 02-16-2002, 08:47 PM
  5. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 03:22 PM