|
I have three controls in my Modal Dialog there are EDITTEXT and the Variables I am using are CString
After the modal Dialog Box comes in my OnOk I do an UpdateData(TRUE) the data I enter is 2E000 however when it is returned between every character there is a Null so it would be in hex 32004500300030
this happens with all the varaible
thanks
|
|
|
|
|
One word. UNICODE
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Have to change the settings in the VS property page ?
|
|
|
|
|
It depends what you are trying to do with the content of the string. The CString is using Unicode, so presumably, the entire application is also. And you cannot (easily) change one part of the application without affecting other elements.
|
|
|
|
|
|
Yes that will work fine, but you really need to consider why your application is using Unicode in the first place.
|
|
|
|
|
Richard
I have a lot of my pieces in place from my windows client debugger setting breakpoints stepping thru code I just created this project to finish off the last piece displaying modifying storage
As whenever I have to re-test in my development project I have to reinit my machine ( long story) don’t know how I unicode got set
Thanks for your help
|
|
|
|
|
ForNow wrote: don’t know how I unicode got set
It would appear that it is the default for new projects, at least in VS 2019.
|
|
|
|
|
I am trying to reference a member of Derived CDialog and am getting an intelligence error not defined it is #included in the file
when I copy the actual class and members to the source file it is able to reference them
seem like changes to my headers arent taking
thanks
|
|
|
|
|
It sounds like something is messed up in your project. Your source files should be dependent on all the associated headers, and if a header changes then the sources should be rebuilt. You need to look at the project settings for all the source files.
|
|
|
|
|
Richard you are right I copied a .cpp and .h from another project instead of instead of going to Add --> exiting item I guess I should delete and recopy ? I mean copy a copy to another directory and then delete and then do add -> resource item
thanks again
|
|
|
|
|
NO need to delete! Just Add the existing (file that you have already copied!)
|
|
|
|
|
that updates the project file thanks maybe I can try that for resource.h as well ?
|
|
|
|
|
Yes, you should ensure that all files are in the Project tree that is displayed in Visual Studio. If they are not included in the actual Project then Visual Studio will not be aware of them.
|
|
|
|
|
I think I’m going to do add—> existing items (.cpp and .h) in all my files that should update the project settings
Thanks
|
|
|
|
|
You only need to add the ones that are missing.
|
|
|
|
|
Does it hurt to do them all seems like it would refresh my project settings
Thanks
|
|
|
|
|
I am not sure what happens if you add one that is already included. Try it on a single file just to check.
|
|
|
|
|
If you attempt to add a file that already exists in the project, Visual Studio will simply ignore the command silently.
This means that you can select all the files in the folder to add, and Visual Studio will sort out which ones already exist in the project.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
That means I take my the .cpp that’s giving me issues copy it somewhere use to VS to remove / delete
Then paste back to the folder have VS add —> existing item ?
|
|
|
|
|
You do not need to move it anywhere; just add it back in to the project. Once you have all the files correctly included in the project you can rebuild it and start looking at any residual errors.
Note: adding files into a project does not move them physically, it just builds a list in the Visual Studio Project settings.
|
|
|
|
|
I tried that didn’t pick up my changes don’t think there is anybharm in remove / delete and then pasting and add / existing
Thank.
|
|
|
|
|
It's a waste of time. If it does not correctly add the files that are already present, then removing and restoring them will make no difference. Unfortunately we cannot see your system so cannot be certain if there is something else missing from your project settings. If you could post your .vxproj and .vxproj,filters files from the project folder, we may be able to spot something.
|
|
|
|
|
thanks for the offer
but looks too big of a job here is the project below is the filters maybe if takes a few minutes thanks
<project defaulttargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<itemgroup label="ProjectConfigurations">
<projectconfiguration include="Debug|Win32">
<configuration>Debug
<platform>Win32
<projectconfiguration include="Release|Win32">
<configuration>Release
<platform>Win32
<projectconfiguration include="Debug|x64">
<configuration>Debug
<platform>x64
<projectconfiguration include="Release|x64">
<configuration>Release
<platform>x64
<propertygroup label="Globals">
<vcprojectversion>16.0
<projectguid>{78197285-AA04-442D-9595-B4B8F59B97DF}
<keyword>MFCProj
<rootnamespace>DriveStorage
<windowstargetplatformversion>10.0
<import project="$(VCTargetsPath)\Microsoft.Cpp.Default.props">
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>true
<platformtoolset>v142
<characterset>Unicode
<useofmfc>Dynamic
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|Win32'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>false
<platformtoolset>v142
<wholeprogramoptimization>true
<characterset>Unicode
<useofmfc>Dynamic
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|x64'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>true
<platformtoolset>v142
<characterset>Unicode
<useofmfc>Dynamic
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|x64'" label="Configuration">
<configurationtype>Application
<usedebuglibraries>false
<platformtoolset>v142
<wholeprogramoptimization>true
<characterset>Unicode
<useofmfc>Dynamic
<import project="$(VCTargetsPath)\Microsoft.Cpp.props">
<importgroup label="ExtensionSettings">
<importgroup label="Shared">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<importgroup label="PropertySheets" condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<import project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" label="LocalAppDataPlatform">
<propertygroup label="UserMacros">
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<linkincremental>true
<propertygroup condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<linkincremental>true
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<linkincremental>false
<propertygroup condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<linkincremental>false
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<sdlcheck>true
<preprocessordefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<sdlcheck>true
<preprocessordefinitions>_WINDOWS;_DEBUG;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>_DEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<functionlevellinking>true
<intrinsicfunctions>true
<sdlcheck>true
<preprocessordefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<enablecomdatfolding>true
<optimizereferences>true
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemdefinitiongroup condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<clcompile>
<precompiledheader>Use
<warninglevel>Level3
<functionlevellinking>true
<intrinsicfunctions>true
<sdlcheck>true
<preprocessordefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
<precompiledheaderfile>pch.h
<subsystem>Windows
<enablecomdatfolding>true
<optimizereferences>true
<midl>
<mktyplibcompatible>false
<validateallparameters>true
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<resourcecompile>
<culture>0x0409
<preprocessordefinitions>NDEBUG;%(PreprocessorDefinitions)
<additionalincludedirectories>$(IntDir);%(AdditionalIncludeDirectories)
<itemgroup>
<clinclude include="..\..\DBGR\DBGR\DBGR\CModalStorage.h">
<clinclude include="..\..\DBGR\DBGR\DBGR\CStorge.h">
<clinclude include="CModalStorage.h">
<clinclude include="CPie.h">
<clinclude include="CStorge.h">
<clinclude include="DriveStorage.h">
<clinclude include="framework.h">
<clinclude include="MainFrm.h">
<clinclude include="pch.h">
<clinclude include="PieWnd.h">
<clinclude include="Resource.h">
<excludedfrombuild condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false
<clinclude include="targetver.h">
<itemgroup>
<clcompile include="..\..\DBGR\DBGR\DBGR\CModalStorage.cpp">
<clcompile include="..\..\DBGR\DBGR\DBGR\CStorge.cpp">
<clcompile include="CPie.cpp">
<clcompile include="CStorge.cpp">
<clcompile include="DriveStorage.cpp">
<clcompile include="MainFrm.cpp">
<clcompile include="pch.cpp">
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create
<precompiledheader condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create
<clcompile include="PieWnd.cpp">
<itemgroup>
<resourcecompile include="DriveStorage.rc">
<itemgroup>
<none include="res\DriveStorage.rc2">
<itemgroup>
<import project="$(VCTargetsPath)\Microsoft.Cpp.targets">
<importgroup label="ExtensionTargets">
Project filters
<project toolsversion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<itemgroup>
<filter include="Source Files">
<uniqueidentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
<extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
<filter include="Header Files">
<uniqueidentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}
<extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
<filter include="Resource Files">
<uniqueidentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
<extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
<itemgroup>
<clinclude include="DriveStorage.h">
<filter>Header Files
<clinclude include="framework.h">
<filter>Header Files
<clinclude include="targetver.h">
<filter>Header Files
<clinclude include="MainFrm.h">
<filter>Header Files
<clinclude include="pch.h">
<filter>Header Files
<clinclude include="..\..\DBGR\DBGR\DBGR\CStorge.h">
<filter>Header Files
<clinclude include="PieWnd.h">
<filter>Header Files
<clinclude include="CPie.h">
<filter>Header Files
<clinclude include="..\..\DBGR\DBGR\DBGR\CModalStorage.h">
<filter>Header Files
<clinclude include="Resource.h">
<filter>Header Files
<clinclude include="CStorge.h">
<filter>Header Files
<clinclude include="CModalStorage.h">
<filter>Header Files
<itemgroup>
<clcompile include="DriveStorage.cpp">
<filter>Source Files
<clcompile include="MainFrm.cpp">
<filter>Source Files
<clcompile include="pch.cpp">
<filter>Source Files
<clcompile include="..\..\DBGR\DBGR\DBGR\CStorge.cpp">
<filter>Source Files
<clcompile include="..\..\DBGR\DBGR\DBGR\CModalStorage.cpp">
<filter>Source Files
<clcompile include="PieWnd.cpp">
<filter>Source Files
<clcompile include="CPie.cpp">
<filter>Source Files
<clcompile include="CStorge.cpp">
<filter>Source Files
<itemgroup>
<resourcecompile include="DriveStorage.rc">
<filter>Resource Files
<itemgroup>
<none include="res\DriveStorage.rc2">
<filter>Resource Files
<itemgroup>
<filter>Resource Files
<filter>Resource Files
|
|
|
|
|
It looks OK, assuming the list contains all of the files you expect to be included. However, I notice you have two versions of two source and header files: CModalStorage and CStorge, and wonder if that is a cause of confusion.
|
|
|
|