Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

Adding Event Handler Places Code in the Wrong File in C++

$
0
0

I have created a project folder that contains the project file.  I have created two subfolders "src" and "include" to contain the .cpp files and .h file respectively.  I can compile and run and all is good.

However, if I use one of the many ways to add an event handler the wizard places the method declaration correctly in the .h file but it puts the actual code in a new .cpp file that it places in the project folder instead of in the .cpp file in "src".

Example:

\ProjectFolder\myproj.vcxproj

\ProjectFolder\src\myDialog.cpp

\ProjectFolder\include\myDialog.h

The generated code should be placed in the two myDialog files.  However, it creates the \ProjectFolder\myDialog.cpp file and puts the new code in there.

I can't figure out how to correct this behavior.

Thanks for all help.

Doug



Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>