Creating Windows Application first time

Creating Windows Application first time

I have a few questions, I'm currently trying to create a windows application that can copy and paste a string of characters that has been typed through various textboxes and combo boxes. I do not know anything about data input validation and wondering if you have tips, tutorials on this or examples how I can start creating this.

The example of the application I want to create

1. Text box created, creating a string of characters 2-6 long
2. Same as above but 3-6 characters long
3. Combo box created from a selection of created list of characters, but you can also create a bespoke string of characters with a limit of two characters.
4.Selection from a combo box with an option to type bespoke characters, limit of two characters
5.Same as above but with a limit of one character
6.Textbox,can create a string of numerical numbers but a limit of 4 digits
7. Optional fields, check box option, type any string of characters
8. Optional fields, check box option, same as above

All of this can be created into an output text box from a "create file name" button with hyphen separators, an example from the output from all of above

AAA-AA-B1-CC-A-0001-OptionalField-OptionalField

All of this can then be copied once the "Copy to clipboard" has been selected

[IMG]http://i64.tinypic.com/2hoin95.png[/IMG]
What do you want to use - Win API or MFC or C++ / CLR or ... ?
Generally speaking there are several ways to validate the input.

1. When the user pressed a key
2. When the user leaves the textbox
3. When the user clicks the copy button

BTW For me it looks a bit too complex for a beginner. Why don't you just start with a single textbox and play around with the different options I mentioned to get a feeling how things work.
Last edited on
closed account (E0p9LyTq)
Walkthrough: Creating Windows Desktop Applications (C++)
https://docs.microsoft.com/en-us/cpp/windows/walkthrough-creating-windows-desktop-applications-cpp

theForger's Win32 API Programming Tutorial
http://www.winprog.org/tutorial/
Hi Thomas,

C++ but willing to try others if it's easier

Is there no way of limiting the characters of strings, numerical and alphabetical through C++?
For example I don't want a user of an application to enter more character than necessary, the limit is 2 characters and the user has entered 10 characters, and will flag an error when it happens

Here's the image of the application I've created I just need to code it

https://ibb.co/cw6gbx
To create an app like this you need to use either Win Api which is very old(fashioned) or a framework like MFC, Qt or ...
I think each framework has a kind of Textbox control where you can limit the number of characters the user can enter. Some even provide a kind of MaskedEdit conrol where you can specify a particular format like zip or phone number.

I personally don't recommend using C++ for GUI apps. On exception is C++ / CLR for some simple apps for yourself.

If you like to learn sth. modern I would recommend WPF together with C#.
http://www.wpf-tutorial.com/
https://www.wpftutorial.net/Home.html
https://www.youtube.com/watch?v=Vjldip84CXQ

Another modern technology is JavaFX, but I have never used it.

Of course it depends what you want to do. Just writing an app for yourself, becoming a freelance programmer, a software engineer...
I can vouch for WPF, it was very convenient to use when I was making some tree-based customizable menus and charts, but for GUI frameworks, C++ isn't necessarily bad. But I 100% agree the Win32 API is atrocious.

Qt and other smaller projects like wxWidgets can be good to use in C++. But the thing is, for a beginner that's never installed a huge library or framework like this before, the task of compiling it and learning that can be daunting. With built-in windows C++, you at least don't have to figure out how to compile the library. But you gotta rip off the bandage of using libraries at some point, might as well start now :)
Topic archived. No new replies allowed.