0

我不知道有什麼變化,但由於某種原因,我得到與Visual Studio 2008的Windows窗體設計了一個問題:Windows窗體設計浮動溢出

C++ CodeDOM parser error: Line: 1978, Column: 80 --- Float overflow

似乎調用堆棧不點我的任何代碼:

at Microsoft.VisualC.CppCodeParser.OnMethodPopulateStatements(Object sender, EventArgs e) 
at System.CodeDom.CodeMemberMethod.get_Statements() 
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) 
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) 
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) 
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload) 

如果我編譯並運行代碼,它工作正常。有誰知道我爲什麼會看到這個問題?

回答

1
/// Required method for Designer support - do not modify 
    /// the contents of this method with the code editor. 
+0

+ 1 /接受:點了! – 2010-06-21 14:23:13

1

明白了。我已經取代了以下內容:

this->m_cmbStepSelect->Items->AddRange(gcnew cli::array<System::Object^>(5) {L"String1", L"String2", L"String3", L"String4", L"String5"}); 

有了:

#define NUM_OF_STRINGS (5) 
this->m_cmbStepSelect->Items->AddRange(gcnew cli::array<System::Object^>(NUM_OF_STRINGS) {L"String1", L"String2", L"String3", L"String4", L"String5"}); 

...它扔了設計師。