Visual C++ how do you debug a button click? [closed] - c++

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'm extremely new to visual c++, I thought that having the debugger be able to debug a button click would be as simple as vb/c# .net but it's clearly not :) I'm having difficulty finding anything online explaining how you debug visual C++ button clicks. Since there's no events like in VB, how does one go about doing this?

Regardless of the framework in question, or really the language in question, when debugging an application using Visual Studio you simply place a breakpoint on the line in question.
You can place a breakpoint by hitting F9 on the line you would like to stop at or by right clicking on the line and going to Breakpoint > Insert Breakpoint.
That being said, if you have no code to "handle" (in the general sense of the term, as I'm not certain what framework you're using) a button click, then you will have no code to insert a breakpoint into.

Related

How can I view the hierarchy of function calls when an error occurs in Visual Studio? [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 25 days ago.
This post was edited and submitted for review 19 days ago.
Improve this question
Before working in Visual Studio, I worked in the Matlab program and there, when an error occurred, function calls were consistently displayed in the command window, indicating the line number, which part of the code caused the error. Now I work in Visual Studio and I really need the same a tool.
I found the "call hierarchy" window, but unfortunately it does not display so conveniently, since entering a function can be from different functions, it is not clear which one caused the error.
If you are using Visual Studio when you get an error you can go to Debug>Windows>Call Stack

CLion breakpoints crossed out [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 days ago.
Improve this question
I am making a simple program that allows the user to create a tune. When I debug a certain part of the program with breakpoints, CLion fails to hit the breakpoints. Like this:
why are my breakpoints crossed out in CLion? What can I do to fix it?
Here is my CMake file:
I have tried running the debugger, expecting the breakpoints to be hit, and the breakpoints are not being hit.
my question is -1. so lets make my question more clear. In CLion, when you click on the left column while debugging, you can set a breakpoint. it shows as a red dot. This works for me. When I run my program however, CLion replaces my red dots (breakpoints) with white circles with a line through it (as in the screenshot shown). I want to know:
What do the circles with the line through it mean?
Why does CLion replace my breakpoints with circles with a line through them?
How can I get rid of the circles with the line through them?

Most useful (productive) shortcuts in Qt Creator [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
What is the your most useful and productive keyboard shortcut in Qt Creator?
Following the trend of great questions asked about Eclipse CDT, vim, Intellij IDEA.
Comment/uncomment lines (select text and press). With this shortcut you can simply comment very large piece of code and uncomment it in future:
Ctrl + /
Autocomplete:
Ctrl + Space
History of clipboard. You get popup menu with all text which you pasted in Qt Creator and if you choose something and press Enter you paste this formatted text into your code
Ctrl + Shift + V
F2 aka "Follow Symbol Under Cursor"
(You can also use Ctrl + Left Mouse Button for this.)
Let me explain. In visual studio to obtain the same you have F12 (Go to definition) but this one open the search result and need you to select the possible matches. The difference between instant result and a possible two seconds or more to get what you want (especially with common names like open)
F4 aka "Switch\Header Source"
In several other visual text editors for C++ (including Visual) you have to manually locate the header corresponding to the current source or vice-versa. But it's effectiveness greatly depend on whether or not you are using SCU for your classes.

Get one file's name method - Customize the interface - Microsoft Visual Studio 2010 [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 9 years ago.
Improve this question
I'm looking for some guide for Microsoft Visual Studio 2010, but I can't find nothing useful.
I'm coding in c++.
What I need is to create a button (in the dialog box) that, when I click on it, gives me the possibility to choose a file from my pc.
After that, I only need to charge in memory (like in a string variable nameFile) the name of this file.
Do anyone know how to do this operation?
And second problem, do you guys know any youtube guide or similar to customize the interface??
Like to put one picture on the background of the application, or change button style etc.
I used Eclipse before, coding in Java and It was totally different.
Thank you all!!
Here is an MFC tutorial for adding a button to a dialog and what has to be done to "wire it up" so that clicking the button invokes an event handler for the BN_CLICKED event.
Inside the BN_CLICKED event handler (that is, the function that is called when you click the button), you'll want to launch the dialog that lets you selecte the file. #Jongware suggested this link, which has a couple of approaches.
Once the file has been selected and the dialog disappears, you'll have access to the string containing the selected file. How you do this will depend on which approach you take in the preceding step. Once you have the string, you can use the appropriate File Management functions to slice-and-dice the file name as necessary.
That's far short of the actual code you'll need to write, I know, but it should give you enough of a start to get going. HTH.

Remote program control using winapi [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 9 years ago.
Improve this question
How I can remotely control a GUI program using winapi?
I need to open skype or icq and click on the right contact and then read the last message. There's a program in VS spy++, but if you want to trace window messages, you need to remotely control spy++. So the problem is how can you remotely control a program and the other thing, where can you find application codes.
The White framework hides a lot of the details of UI automation, and you may find it easier to use than raw UI Automation.