question

BryanKelly-4107 avatar image
0 Votes"
BryanKelly-4107 asked JeanineZhang-MSFT answered

Tutorial for first dialog app, C++

Please help me find a tutorial that walks me through the process of creating a desktop app and ends up with a dialog containing, for example, some labels, text boxes, checkboxes, and buttons.
The project will eventually use OpenGL to draw some charts. I don’t know if it should use MFC, ATL, or something else.
This is for Windows 10 and visual Studio 2017 Professional, C++
Yes, I have googled and tried several MSDN walkthroughs but not discovered what is needed.
Thank you for your time

Note, apologies for the tags. they are required, but will accept nothing I typed in. Tried "di" for dialog and found nothing appropriate. Selected something from the options and went with that.

Example problem: A video tutorial begins with: New -> Project -> MFC -> MFC Application
This install of VS 2017 Professional has: New -> Project -> MFC/ATL -> ATL Project
MCS/ATL is the only MFC option at the Project level, and ATL Project is the only sub-option provided. Have I configured something wrong with VS 2017? How important is this?

c++
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

When I type c++ I get a tag for that and when I type opengl I get a tag for that too. Also note that in the Windows API dialog has a specific meaning; you probably do not want a dialog box project for OpenGL.

0 Votes 0 ·

About an hour ago I changed the tag to c++. I don't see a "save" or "post" button. I changed it again just now.
Oops. I can change the tag without using the edit feature. That is not a permanent change. I used the edit feature, changed it, and now looks permanent. Sorry about that.

The first sentence of the OP is the basic concept. Here it is again:

Please help me find a tutorial that walks me through the process of creating a desktop app and ends up with a dialog containing, for example, some labels, text boxes, checkboxes, and buttons.

0 Votes 0 ·
SimpleSamples avatar image
1 Vote"
SimpleSamples answered BryanKelly-4107 commented

I did a quick search and found OpenGL - Win32 apps. Did you see that? The following are other samples and tutorials.

And probably Visual Studio installs everything we need for OpenGL, we only need to add opengl32.lib as a linker input library for the project. Do you know how to do that in VS? So if you create an empty C++ desktop application and put something like minimal.c into it and add opengl32.lib as a linker input library then it can work just that easily. Except to close the samples from that site (they are very old) I need to click the "x" icon multiple times.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

My first step is to create the VS desktop app with some controls. The suggestions from SimpleSamples skips that part and goes right to OpenGL. The first step is to get the basic dialog with the user controls (labels, text fields, checkbox, etc). I need the instructions on creating the dialog and drag/drop the UI tools onto the screen.

Would it be better to install QT and skip the VS user interface tools?
I strongly prefer a text based tutorial rather than a video, but will go for a video if necessary.

0 Votes 0 ·

You were not clear about what you wanted. It is still not clear what you are trying to do. Perhaps what you mean is that you want to use OpenGL to create graphics that are then put into a dialog box. You still have not updated your tags, you certainly can do that much.

0 Votes 0 ·
JeanineZhang-MSFT avatar image
0 Votes"
JeanineZhang-MSFT answered

Hi

According to your description, If you want to try to create a Win32 project, I suggest you could refer to the Docs:
How to: Create a Dialog Box (C++)
Dialog Box Controls (C++)
How To: Add, Edit, or Delete Controls (C++)

If you want to create an MFC project, I suggest you could refer to the Docs:
Working with Dialog Boxes in MFC
Making and Using Controls

This install of VS 2017 Professional has: New -> Project -> MFC/ATL -> ATL Project

I suggest you should check whether you have installed the MFC SDK. Open the VS Installer window, you could click on "Individual Components", then scroll quite a way down to get to the "SDKs, libraries and frameworks" section. In there, you'll find a list of components for ATL and MFC support. You could choose the version you need to install.

Best Regards,

Jeanine Zhang



If the response is helpful, please click "Accept Answer" and upvote it.

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.