开发者

Windows Forms Designer Float overflow

开发者 https://www.devze.com 2023-01-04 00:18 出处:网络
I\'m not sure what\'s changed, but for some reason I\'m getting a problem with Visual Studio 2008 Windows Forms Designer:

I'm not sure what's changed, but for some reason I'm getting a problem with Visual Studio 2008 Windows Forms Designer:

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

The call stack doesn't seem to point to any of my code either:

 at Microsoft.VisualC.CppCodeParser.OnMethodPopulateStatements(Object sender, EventArgs e开发者_如何学Python)
 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) 

If I compile and run the code it works fine. Does anyone have any idea why I might be seeing this issue?


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


Got it. I'd replaced the following:

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

With:

#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"});

...which threw the designer.

0

精彩评论

暂无评论...
验证码 换一张
取 消