Visual C++ Why are two button clicks required to obtain button click event handler result
Q&A - I have a small C++ app in which it takes two clicks of a button to produce the desired even handler action. The app controls a voltage digitizer over the USB and plots the measured result in a pictureBox control. The app GUI has several Button…
![](https://techprofile.blob.core.windows.net/images/1P-HevJX50CFOQJZsnsiMg.png?8D86C2)
VS-2019 Debugging MFC
I'm using MFC as a shared DLL in a program with an EXE and a number of my own DLLs, some of which use MFC. Using VS-2019, when I step through my program's DEBUG build, it won't step into the MFC library source code. How do I get it to do so? Dave
CMFCButton as a radio button
I have just discovered that the 'Feature Pack' class CMFCButton allows me to have an image and text on push-like radio button. (Normally this would require it to be owner-draw, and radio buttons don't have the owner-draw possibility, so I'm quite…
![](https://techprofile.blob.core.windows.net/images/1P-HevJX50CFOQJZsnsiMg.png?8D86C2)
Copy string in C
Hello, Could you please explain why we cannot assign a string to another, whereas, we can assign a char pointer to another char pointer? Thanks #include<stdio.h> int main() { char str1[] = "Hello"; char str2[10]; char* s =…
VS 2017 C++ cannot sccroll view
Alert me|Edit|Delete|Change type Question You cannot vote on your own post 0 I am having a problem with scrolling my view (single document, only one view). In older versions of mfc I used the following coding to set the scroll: void…
Microsoft Visual C++ 2015-2019 Downloading Problem
Hello, first of all. I tried many times download C++ 2015-2019 but it gives me error every times. When I tried to download it, it says ''vc_runtimeminimum_x64 msi''. I tried couple solutions but it doesn't solved. I downloaded Visual Studio 2017 and…
Inline Assembly Call to compiled Subroutine gives access violation executing location
I have recently updated a large C++ program from Visual Studio 2005 to Visual Studio 2019. All has worked well except for this one problem where using inline assembly, we call into a compiled subroutine. Stepping into the "CALL" in disassembly…
Activate MDI window
I have an MDI app, which start as hidden, and an icon is shown in system tray. After a time (few seconds), from that system tray icon is show up a notification balloon. And when I click on this balloon, I call this code: void CMainFrame::On0Restore()…
Expression must be a modifiable lvalue
Hello, The below code doesn't work. # include <stdio.h> int main() { int arr[] = { 12,14,15,23,45 }; for (size_t i = 0; i < 5; i++) { printf("%d\t",*arr); arr++; } return 0; } But the following…
Visual C++ ABI question
I have Visual C++ 2019 community (version 16.7.3) with compiler version 19.27.29111. I have some code compiled with Visual C++ 2015 14.0 build 23026 that uses various STL containers and classes (including std::wstring) Can I mix the Visual C++ 2015…
CDateTimeCtr border
Hi , Iam using CDateTimeCtrl datepicker in MFC c++ while creation it has 3D borders ,but i like to set it to normal border .How can i do so? iam creating datepicker as DTPicker.Create(WS_CHILD | WS_VISIBLE| DTS_UPDOWN| WS_BORDER, …
A midi controller in a desktop program freezes the graphic controls, though they still function
I have made a music program in Visual Studio for Windows with C and Fmod that contains a graphical keyboard, a selection of sound files etc., and which also contains a midi controller. I use the midi controller by connecting a midi keyboard to the…
MFC -CRichEditCtrl Paste Text
Hi, In MFC dialog based application, I have subclassed CRicheditctrl. In the cricheditctrl, If a text is cut/copy from same richeditctrl, I need to allow pasting of text otherwise, if a text is copied from other control or microsoft word kind of…
Using Visual C++ 2019
Seems like Visual C++ 2019 has special codes that are not supported by the standard C++ command structures. For example, many tutorials on-line suggest that one can get input from a console by entering the command as follows: Libraries #include…
![](https://techprofile.blob.core.windows.net/images/1P-HevJX50CFOQJZsnsiMg.png?8D86C2)
Microsoft Visual C++ xxxx Redistributable (x64) Installation
Hello, Is there a way to install Microsoft Visual C++ xxxx Redistributable (x64) - xx.x.xx.xx through MEM-CM / Softare Updates / WSUS ? Thanks, Dom
MFC CRichEditCtrl::PreTranslateMessage
Hi, I subclassed CRichEditCTrl and in PreTranslateMessage I am handling ctrl+x. On ctrl+x I am confirming the user whether to delete text case 88: //ctrl+x if(IDNO==AfxMessageBox(_T("Do you want to delete selected…
Address of Array in C
Hello, Could you please explain the second printf_s? I expect &arr+1 to be similar to arr+1. because arr and &arr are the same. Why sixteen added? Thanks # include <stdio.h> int main() { int arr[] =…
Error with class definition in header file
I built the example program from the "Header files (C++)" guide, and when I compile the solution I get a number of errors because the class 'my_class' is not recognized by 'my_class.cpp' nor 'my_program.cpp' (codes C2065, C2653, etc).
c++ on VS19 - how can I display a table of number with cloumns aligned using cout
I want to display a scoreboard on the console with the columns lining up as shown in the example below. Team 1 (2) 5 30 45 62 Long name team (0) 10 28 49 165 The team names are…
DirectX12 Line Geometry Shader
I created a desktop application for win32 based off a skeleton from the book I have Introduction to 3D Game Programming with Directx12 by Frank D Luna. class BoxApp : public D3DApp { public: BoxApp(HINSTANCE hInstance); BoxApp(const BoxApp& rhs) =…