Share via

Seeking example on how to start with c++ gui programming in visual studio

Asger P 0 Reputation points
Dec 11, 2023, 2:29 PM

Hi
I've been programming in C++ builder for the last 30 years, but I never used visual studio so I don't really know where to start, I 've seen a couple of hallo world command line apps, but that is NOT what I'm looking for.

I'm looking for an example (preferable video) on how to make a a simple GUI app from scratch in visual studio e.g.
5 edit fields with labels a button and a listview with 5 columns
When the button is clicked the text in the edit are added to the listview.
The example could also be a simple calculator.

The code I need to write must be C/C++ .
Added: There must be a Visual designer for the GUI.

Anybody who knows where I can find such examples.

Best regards
Asger

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,776 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 67,401 Reputation points
    Dec 11, 2023, 4:35 PM

    MFC is a much lower level library than you are used to. You can also pick WinUI (still dated compared to other platforms) which is more recent and probably easier.

    https://learn.microsoft.com/en-us/windows/apps/winui/winui3/create-your-first-winui3-app


  2. Minxin Yu 12,176 Reputation points Microsoft Vendor
    Dec 12, 2023, 6:12 AM

    Hi, @Asger P

    Here is the Win32 GUI document:

    Module 1. Your First Windows Program
    button messages

    And you could create Win32 template project from Windows Desktop Wizard -> Desktop Application
    User's image

    User's image

    For your reference: MSDN CPP samples https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/overview/visual-cpp-samples.md#mfc-samples---general

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Castorix31 86,051 Reputation points
    Dec 12, 2023, 8:53 AM

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.