Thread: GUI and forms

  1. #1
    Registered User gilit2's Avatar
    Join Date
    Jan 2011
    Location
    Israel
    Posts
    10

    GUI and forms

    Hello ! I need gui for my software. I work in C++ visual Studio 2010. I need to enable the user insert a lot of input information. It should also support the that : 1. marking one a button , may change the value of the other buttons . 2. choosing a button may cause opening another form. 3. choosing a button may cause opening other output file (html files , that are the "output" of my tool. Should I use windows forms apps project and somehow link it to my software , by calling my function ? should I use visual basic or what ? Should I use html/asp forms and connect it to my project ? Does windows application supply all this functionality. Is it easy to implement ? what is the common way to do it in commercial applications ?

  2. #2
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    >> should I use visual basic or what ?
    Yeah, it seems that'll be your best bet. This seems like RAD. VB's better for RAD.

  3. #3
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by gilit2 View Post
    Hello ! I need gui for my software. I work in C++ visual Studio 2010. I need to enable the user insert a lot of input information. It should also support the that : 1. marking one a button , may change the value of the other buttons . 2. choosing a button may cause opening another form. 3. choosing a button may cause opening other output file (html files , that are the "output" of my tool. Should I use windows forms apps project and somehow link it to my software , by calling my function ? should I use visual basic or what ? Should I use html/asp forms and connect it to my project ? Does windows application supply all this functionality. Is it easy to implement ? what is the common way to do it in commercial applications ?
    Underlying all this stuff you asked about is 1 simple thing... Windows.

    Writing Windows programs is not all that hard if you don't go about it the lazy way. Forms and RAD and such merely hide the simplicity of the windows api. Yes they will let you build code (apparently) faster but forms etc. really just do visually what a WinApi programmer would do textually.

    Windows programs --no matter how they're created-- all revolve around just a few very basic things... You need a WindMain() as your entry point, you need to register a window Class for your program and then create windows within it, you need a message tosser and a message dispatcher... beyond that it's all about handling messages... little subroutines called from a switch() that respond to button presses and things like that. There's a lot of it... but very little of it is so complex the average coder can't figure it out.

    Have a look at this.... theForger's Win32 API Tutorial

    It's really not that difficult...


    1)

  4. #4
    Registered User \007's Avatar
    Join Date
    Dec 2010
    Posts
    179
    ^Nice link. I bookmarked it.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Forms and RAD and such merely hide the simplicity....
    I believe it is the other way around. Forms and WPF are supposed to simplify the complexity involved in doing pure Win32 API programming.

  6. #6
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Bubba View Post
    I believe it is the other way around. Forms and WPF are supposed to simplify the complexity involved in doing pure Win32 API programming.
    I agree that's the intent... but at what cost? There's a lot of overhead inovolved, producing much larger programs (which people don't seem to care about anymore) and I, for one, don't find it any easier... Maybe it's just me, but I really don't see windows API level as all that complicated. Yes there are complex function calls but if you have the docs that's not much of a problem.

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by \007 View Post
    ^Nice link. I bookmarked it.
    It's pretty good for getting someone started.

    The only thing I would suggest you not do, that he does, is putting code inside switch statements... Here the advice is keep it as simple as possible; rather than putting code into switches, write a function to do what's needed and call it from the switch. Yes, you will have a big mess of functions but the result is more modular and far easier to debug.

  8. #8
    Registered User gilit2's Avatar
    Join Date
    Jan 2011
    Location
    Israel
    Posts
    10
    How can I use arrays of buttons (in c++ ?)
    Because it is a managed code , and a c array is native - it did not accept it.

    Can I use array of buttons directly using the winapi ? where can I see a sample of using the winAPI directly. ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enhanced graphic forms with VisualC++
    By BrownB in forum Windows Programming
    Replies: 3
    Last Post: 08-30-2006, 10:55 AM
  2. Need help passing a variable between forms
    By GUIPenguin in forum C# Programming
    Replies: 8
    Last Post: 07-10-2006, 03:13 AM
  3. WinForms GUI TEST tools?
    By gicio in forum C# Programming
    Replies: 2
    Last Post: 04-19-2005, 04:41 PM
  4. Forms
    By Unregistered in forum C# Programming
    Replies: 2
    Last Post: 05-05-2002, 09:17 AM
  5. using VB for forms + vcc for processing
    By null in forum Windows Programming
    Replies: 1
    Last Post: 11-24-2001, 08:47 AM