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

Asger P 0 Reputation points
2023-12-11T14:29:18.94+00:00

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,757 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 66,226 Reputation points
    2023-12-11T16:35:39.54+00:00

    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 11,996 Reputation points Microsoft Vendor
    2023-12-12T06:12:21.4566667+00:00

    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 85,711 Reputation points
    2023-12-12T08:53:47.13+00:00

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.