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.
Related
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?
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.
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 want to explore about the signal of buttons from my gamepad, it's old but can use. And i want to code a small program that can detect and display the 'code' of these buttons when I touch to them in C++, can any body help me, I don't know where can I start ? Please !!!
To put it shortly, if you want to make a game playable in the command line, then don't. It's not meant for that kind of purpose.
I would personally suggest the SFML library. It has utilities for drawing on a window, handling events, graphics, sound, etc. and it's also pretty simple. Here is what you are (probably) looking for:
sf::Joystick class
However, if you don't want to use any external library, you will have to rely on your OS's library (e.g windows.h on windows) but that would make the code non portable, and most people hate that, since C/C++ were created specifically for that purpose. So this method is generally not suggested.
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
(Please note this is my first question so apologies on rule-breaking just let me know and I'll fix it)
I'm attempting to write a cancel operation for a software download application. This application will first transfer the software to the device and then install the software on it. (These are givens I'm not allowed to change).
What should the cancel operation do? When a user presses 'cancel', the application should stop transferring/installing the software immediately.
Question: Since I've never written a "cancel" function, I'm wondering what are the types of things to consider when writing the code, and what are the common bugs I should expect and how to deal with them?
Couldn't find anything in google so if you have some links that would be good reads I'd really appreciate it since I'm not looking for answers I'm just looking for guidelines/macro/concept help
It depends on your requirements, but usually in a cancel operation you will keep a stack of the operations that have been performed so that you can go back and undo them all when cancel is clicked.
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 was playing GTA IV recently and I noticed an interesting feature. I was in a cab and switched to a specific station. Niko then said something about that station.
I was wondering how they might have done this. The only way I can think of is to have an if/else statement that goes through each station and sees if that's the one he is currently listening to.
Is there a better way of doing it?
Use an enum, array of places, then you can have a piece of code like:
currentStation = .. get the current station
playSound(stations[currentStation]);
They likely do this by having a station change trigger an event. Niko is set to as a listener for this type of event. His characters programmed response to this event is to playback a certain sound.