Asking for guidance to make a Windows application (Click for details)

I have programmed several testing applications, all are being used by companies.
All of them were 32 bit console applications, which is fine and I prefer that
but it would be nice to make a Windows application.

I have the source code form my tests, but I am aware that working with
a GUI is different than 32bit console application, in that you need
to choose the layout and buttons etc.

That thing is I do not know where to start ?

Will my source code have to be reprogrammed form scratch or is it
a simple matter of assigning the buttons into the code ?

What do I choose to output the questions in txt in the Windows GUI
do I need one txt type box that will output all the questions ?

In the current 32 bit console app I have a timer, date and time display, random outputted answer choice as well as user keyword entries, some questions have 8 possible answers to a question.

At the end of the test, the user has a choice to output the score in a txt document, also connection to the website by choice.

If anyone can give me some help or direction to do this
I would be very grateful.


Last edited on

You will find a lot of tutorials and examples here: http://functionx.com/
Cbasic88 wrote:
Will my source code have to be reprogrammed form scratch or is it
a simple matter of assigning the buttons into the code ?

It depends on how you've designed your code. If you've thrown cin and cout spuriously throughout your code, then you'll need to rewrite it. If you've managed to separate the GUI from the functions, then you can re-use most of it.

The first thing you'll need to grasp is the concept of event-based programming. That means your program will do nothing until an input is received from one of many sources. An operation will be executed, output will be displayed, then you wait for the next input.

To learn the very basics, run through this C-based tutorial. It's what I used to learn the basics:
http://www.winprog.org/tutorial/

It'll take you 3-4 hours. Note that the WinAPI requires a lot of work to get anything done. You have full control, but it takes forever to make anything. To do something complicated or quickly, use a higher-level API which wraps this API. MFC is a native windows API. Qt is a very good multi-platform API. I definatley recommend Qt, and especially Qt Creator (graphical editor) for starting out.
Thanks Softrix for the link.

@ Stewbond Thanks for also for the resources, I have cin and cout a lot
in my programs so it looks as if I may need to rewrite them, what would
you use instead of cout and cin ?

Also the tutorial looks interesting I will have a look at it.

Thanks for the help.
Last edited on
It's not about what I'd use instead of cout/cin, it's about where I'd rather put my IO.

printf/cout are kinda synonomous and it really doesn't matter what syntax you use to print to a console. But you are talking about GUIs and that means completely replacing cout/printf.

If you like, you can use a similar syntax to cout. It could be something like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class OutputClass : QTextEdit
{
  QString m_str;

  template <class T>
  OutputClass& operator << (T input)
  {
    m_str.Append(input);
    this->Draw();
    return *this;
  }

  void Draw() 
  {
    QTextEdit::SetText(m_str);
    QTextEdit::Draw();
  }
} aout;
Topic archived. No new replies allowed.