The first function is called in MFC Aplication [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 days ago.
Improve this question
I'm new to MFC C++ and have a big MFC Project. It's in single document type and contains lots of classes such as doc.cpp, view.cpp, MainFrame.cpp ...Of course, It also contains lots of threads, functions in other classes. But i dont know exactly the way that project works, the way these threads are called. What is the first function, class is called? I try to find in default class of that project and have no clue.
I need an instruction or document explain step by step how a mfc project work. Can i have your help?

Related

Is there a way to figure out the size of a program's canvas using c++? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm fairly new to c++ and was wondering if there is a way to figure out the canvas' size of another program?
For example, code something that will tell me the size and position of a program like Task Manager or CommandPropmt. Of course, they would have to be opened first.
It's quite easy to do this - get the window handle with FindWindow(), and then get the size of the window using GetWindowRect() or GetClientRect(), depending on which bit of the application window you want the size of. All these functions are part of the Win32 API and are fully documented online.

State Pattern Design using OOP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
A simple example of how you would structure this would be particularly useful.
This is how I would do it:
MyMotor is an instance of the class Motor. This class has four functions idle(), accelerate(), flat(), decelerate(). (I assume you know how to build a basic class with private members and its constructors)
Then in main(), I create MyMotor and control it based on states. States can be controlled/monitored using Boolean Values. Whatever state I am in and whenever, certain function will be called.
Next time give it a try before you ask here, in order to get better responses.

Can I run a DLL from an exe with parameters? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I would like to know if I can run a DLL function from a exe?
(C++ if it's important)
And If I can can I do it with parameters?
This isn't really code but the concept is the same
Run Calculator(time,0,int,max)
I would like to run something like that, using parameters to open up the dll in a certain way. Is it even possible?
Bonus Point for anyone who can give me an example in code :)
You can have just about any function you like in a DLL, and call it, just as you would call any library function. And have as many parameters as you like.

Controling the GUI with wxWidgets [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am writing this C++ application with wxWidgets.
I want to reproduce the following situation:
There must be one single mainFrame which should control the others.
Other windows should appear inside this mainFrame (like sections)
wxNotebook must not be used.
Imagine I have wxFrameMain, wxPanelA, and wxPanelB. The application should start wxFrameMain filled up with wxPanelA and after the user choses to change the view, it should get filled up with wxPanelB.
Does anyone have any tutorial or can explain how to do that?
It's really difficult to understand what does the requirement
wxNotebook must not be used
actually mean. Does this mean that the user shouldn't be able to change the pages on his own? If so, you are probably looking for wxSimplebook. If it just means that the user should be able to change pages but using UI different from wxNotebook, then perhaps one of the other book controls can be helpful.

Using DLL in C++ Win32 applicaiton [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have the library called Serial.dll that containts the file Serial.def that looks like this:
EXPORTS
ValidateSerial
GenerateSerial
I want to import the function GenerateSerial in my C++ Win32 application. I searched on the internet topics about using DLLs but I can't get the idea... Can anybody help me?
The info you provided only tells two funciton names. You can obtain their address doing LoadLibrary and GetProcAddress. But to make any use of them you need to know the proper signature, and the rules for the arguments and return values.
Without documentation (or a .h file) you can't go very far.