S
S
samokiller2020-10-06 18:48:58
C++ / C#
samokiller, 2020-10-06 18:48:58

Is it possible to create a dialogBox from an empty c++ vs15 dll project?

Wrote a dll for an external program. vs15. I created an empty project when I started.
Now we need to create a dialog box. Googled - everywhere they write that you need to create an mfc application or atl. Even at the level of project creation.
Is it possible to add some library in code to an already existing project, which was not originally created as mfc or atl, such as through include, and then create objects that provide dialogBox, and then work with them. Or should I now create a new project and move the dll there?

If it is possible, you can give some simple example of which libraries to connect and display window + button with the simplest logic of the button. Type when pressed int a = 1;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-10-06
@firedragon

Draw a dialog in the resource editor. In win32 see functions to create. In theory, you need to create a message queue handler in dllmain. I don't remember years ago. By the way, look at the examples in the platform sdk

S
Sumor, 2020-10-06
@Sumor

Everything is possible only with the help of WinApi.
But it's too old school, unusual and wordy.
The general scheme is something like this:
RegisterClass - registration of the name (type) of the main window
CreateWindow - creation of the main window of its type
CreateWindow - creation of a button on the main window.
The main function must be WinMain. And it should have a processing cycle with GetMessage and TranslateMessage.
There is a slightly different way. Create a dialog in a resource, and then create it via CreateDialog or equivalents.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question