alright, now i get just another error. its very weird. it doesnt matter if i build on the VS2005 prof edition, or the express edition. anyway...
public ref class CTree{
private:ArrayList^ _TreeNodes;
public:CTree() {}
void AddTreeNode(VCNode^ Node){TreeNodes->Add(Node);
}
void Repaint(TreeView^ Tree){ for (int i = 0; i <= _TreeNodes->Items->Count; i++){ if (_TreeNodes->ItemsVCNode^ TempNode = _TreeNodes->Items
;
Tree->Nodes->Add(TempNode->Node);
}
}
}
now, when i compile, i get a error that VCNode doesnt excist. this error is only for Repaint, and not for AddTreeNode. I tried everything. but its just that as soon as i create a new function in my class witch's using VCNode, i get an error.
anyone know the reason of this bug
even more bugs
When i add a new component. he defines it 4 times in the source. every new auto created source is defined 4 times. same as in the error window. i got each error message 4 times.

Compiling bug?
GPK2005
Jin Feng - MSFT
clearlydotnet2
cdonner
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System:
using namespace System:
namespace DCOMProductions {
namespace InteractiveTeamSystem {
namespace ITSDev {
/// <summary>
/// Summary for FormTextEdit
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class FormTextEdit : public System::Windows::Forms::Form
{
public:
FormTextEdit(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~FormTextEdit()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::MenuStrip^ menuStripMain;
private: System::Windows::Forms::RichTextBox^ rtxtData;
private: System::Windows::Forms::ContextMenuStrip^ rtxtMenu;
private: System::Windows::Forms::ToolStripMenuItem^ boldToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ italicToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ underlinedToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ strikeoutToolStripMenuItem;
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator1;
private: System::Windows::Forms::ToolStripComboBox^ cbFontFamily;
private: System::Windows::Forms::ToolStripComboBox^ cbFontSize;
private: System::Windows::Forms::ToolStripComboBox^ cbFontColor;
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator2;
private: System::Windows::Forms::ToolStripMenuItem^ cutToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ copyToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ pasteToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ selectAllToolStripMenuItem;
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator3;
private: System::Windows::Forms::ToolStripMenuItem^ wordWrapToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ exitToolStripMenuItem;
private:
/// <summary>
/// Required designer variable.
/// </summary>
private: System::ComponentModel::Container^ components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(FormTextEdit::typeid));
this->menuStripMain = (gcnew System::Windows::Forms::MenuStrip());
this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->rtxtData = (gcnew System::Windows::Forms::RichTextBox());
this->rtxtMenu = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
this->boldToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->italicToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->underlinedToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->strikeoutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->toolStripSeparator1 = (gcnew System::Windows::Forms::ToolStripSeparator());
this->cbFontFamily = (gcnew System::Windows::Forms::ToolStripComboBox());
this->cbFontSize = (gcnew System::Windows::Forms::ToolStripComboBox());
this->cbFontColor = (gcnew System::Windows::Forms::ToolStripComboBox());
this->toolStripSeparator2 = (gcnew System::Windows::Forms::ToolStripSeparator());
this->cutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->copyToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->pasteToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->selectAllToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->toolStripSeparator3 = (gcnew System::Windows::Forms::ToolStripSeparator());
this->wordWrapToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->menuStripMain->SuspendLayout();
this->rtxtMenu->SuspendLayout();
this->SuspendLayout();
//
// menuStripMain
//
this->menuStripMain->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->fileToolStripMenuItem});
this->menuStripMain->Location = System:
this->menuStripMain->Name = L"menuStripMain";
this->menuStripMain->RenderMode = System::Windows::Forms::ToolStripRenderMode:
this->menuStripMain->Size = System:
this->menuStripMain->TabIndex = 0;
//
// fileToolStripMenuItem
//
this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->exitToolStripMenuItem});
this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
this->fileToolStripMenuItem->Size = System:
this->fileToolStripMenuItem->Text = L"File";
//
// exitToolStripMenuItem
//
this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem";
this->exitToolStripMenuItem->Size = System:
this->exitToolStripMenuItem->Text = L"Exit";
this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &FormTextEdit::ExitTextEditor);
//
// rtxtData
//
this->rtxtData->ContextMenuStrip = this->rtxtMenu;
this->rtxtData->Dock = System::Windows::Forms:
this->rtxtData->Location = System:
this->rtxtData->Name = L"rtxtData";
this->rtxtData->Size = System:
this->rtxtData->TabIndex = 1;
this->rtxtData->Text = L"";
//
// rtxtMenu
//
this->rtxtMenu->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(15) {this->boldToolStripMenuItem,
this->italicToolStripMenuItem, this->underlinedToolStripMenuItem, this->strikeoutToolStripMenuItem, this->toolStripSeparator1,
this->cbFontFamily, this->cbFontSize, this->cbFontColor, this->toolStripSeparator2, this->cutToolStripMenuItem, this->copyToolStripMenuItem,
this->pasteToolStripMenuItem, this->selectAllToolStripMenuItem, this->toolStripSeparator3, this->wordWrapToolStripMenuItem});
this->rtxtMenu->Name = L"rtxtMenu";
this->rtxtMenu->ShowCheckMargin = true;
this->rtxtMenu->ShowImageMargin = false;
this->rtxtMenu->Size = System:
//
// boldToolStripMenuItem
//
this->boldToolStripMenuItem->CheckOnClick = true;
this->boldToolStripMenuItem->Font = (gcnew System:
this->boldToolStripMenuItem->Name = L"boldToolStripMenuItem";
this->boldToolStripMenuItem->Size = System:
this->boldToolStripMenuItem->Text = L"Bold";
//
// italicToolStripMenuItem
//
this->italicToolStripMenuItem->CheckOnClick = true;
this->italicToolStripMenuItem->Font = (gcnew System:
this->italicToolStripMenuItem->Name = L"italicToolStripMenuItem";
this->italicToolStripMenuItem->Size = System:
this->italicToolStripMenuItem->Text = L"Italic";
//
// underlinedToolStripMenuItem
//
this->underlinedToolStripMenuItem->CheckOnClick = true;
this->underlinedToolStripMenuItem->Font = (gcnew System:
this->underlinedToolStripMenuItem->Name = L"underlinedToolStripMenuItem";
this->underlinedToolStripMenuItem->Size = System:
this->underlinedToolStripMenuItem->Text = L"Underlined";
//
// strikeoutToolStripMenuItem
//
this->strikeoutToolStripMenuItem->CheckOnClick = true;
this->strikeoutToolStripMenuItem->Font = (gcnew System:
this->strikeoutToolStripMenuItem->Name = L"strikeoutToolStripMenuItem";
this->strikeoutToolStripMenuItem->Size = System:
this->strikeoutToolStripMenuItem->Text = L"Strikeout";
//
// toolStripSeparator1
//
this->toolStripSeparator1->Name = L"toolStripSeparator1";
this->toolStripSeparator1->Size = System:
//
// cbFontFamily
//
this->cbFontFamily->AutoSize = false;
this->cbFontFamily->DropDownStyle = System::Windows::Forms::ComboBoxStyle:
this->cbFontFamily->FlatStyle = System::Windows::Forms::FlatStyle:
this->cbFontFamily->Margin = System::Windows::Forms:
this->cbFontFamily->Name = L"cbFontFamily";
this->cbFontFamily->Size = System:
//
// cbFontSize
//
this->cbFontSize->AutoSize = false;
this->cbFontSize->DropDownStyle = System::Windows::Forms::ComboBoxStyle:
this->cbFontSize->FlatStyle = System::Windows::Forms::FlatStyle:
this->cbFontSize->Items->AddRange(gcnew cli::array< System:
L"22", L"24", L"26", L"32", L"48", L"64", L"72"});
this->cbFontSize->Margin = System::Windows::Forms:
this->cbFontSize->Name = L"cbFontSize";
this->cbFontSize->Size = System:
//
// cbFontColor
//
this->cbFontColor->AutoSize = false;
this->cbFontColor->DropDownStyle = System::Windows::Forms::ComboBoxStyle:
this->cbFontColor->FlatStyle = System::Windows::Forms::FlatStyle:
this->cbFontColor->Items->AddRange(gcnew cli::array< System:
L"Navy", L"Orange", L"Pink", L"Purple", L"Red", L"Silver", L"Yellow"});
this->cbFontColor->Margin = System::Windows::Forms:
this->cbFontColor->Name = L"cbFontColor";
this->cbFontColor->Size = System:
//
// toolStripSeparator2
//
this->toolStripSeparator2->Name = L"toolStripSeparator2";
this->toolStripSeparator2->Size = System:
//
// cutToolStripMenuItem
//
this->cutToolStripMenuItem->Name = L"cutToolStripMenuItem";
this->cutToolStripMenuItem->Size = System:
this->cutToolStripMenuItem->Text = L"Cut";
//
// copyToolStripMenuItem
//
this->copyToolStripMenuItem->Name = L"copyToolStripMenuItem";
this->copyToolStripMenuItem->Size = System:
this->copyToolStripMenuItem->Text = L"Copy";
//
// pasteToolStripMenuItem
//
this->pasteToolStripMenuItem->Name = L"pasteToolStripMenuItem";
this->pasteToolStripMenuItem->Size = System:
this->pasteToolStripMenuItem->Text = L"Paste";
//
// selectAllToolStripMenuItem
//
this->selectAllToolStripMenuItem->Name = L"selectAllToolStripMenuItem";
this->selectAllToolStripMenuItem->Size = System:
this->selectAllToolStripMenuItem->Text = L"Select All";
//
// toolStripSeparator3
//
this->toolStripSeparator3->Name = L"toolStripSeparator3";
this->toolStripSeparator3->Size = System:
//
// wordWrapToolStripMenuItem
//
this->wordWrapToolStripMenuItem->Checked = true;
this->wordWrapToolStripMenuItem->CheckOnClick = true;
this->wordWrapToolStripMenuItem->CheckState = System::Windows::Forms::CheckState::Checked;
this->wordWrapToolStripMenuItem->Name = L"wordWrapToolStripMenuItem";
this->wordWrapToolStripMenuItem->Size = System:
this->wordWrapToolStripMenuItem->Text = L"Word Wrap";
//
// FormTextEdit
//
this->AutoScaleDimensions = System:
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System:
this->Controls->Add(this->rtxtData);
this->Controls->Add(this->menuStripMain);
this->MainMenuStrip = this->menuStripMain;
this->Name = L"FormTextEdit";
this->Text = L"Text Editor";
this->Load += gcnew System::EventHandler(this, &FormTextEdit::FormTextEdit_Load);
this->menuStripMain->ResumeLayout(false);
this->menuStripMain->PerformLayout();
this->rtxtMenu->ResumeLayout(false);
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void ExitTextEditor(System:
private: System::Void FormTextEdit_Load(System:
};
}
}
}
al2torres
Dinesh Kulkarni - MSFT
Kranti
Vi_High_0017
ref class VCNode;
VCNode is declared and defined in the same file, see the header
Mindaugas Luko?ius
thedawn
http://polity.magnoon.nl/Other/Engine_Tree.h
thats the complete class. i hope thats enought
( the code aint prefect. but i'm learning :) )
dont want to be annoing, but... Now i get this warning to
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Hide
at EnvDTE.CodeFunction.GetStartPoint(vsCMPart Part)
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 System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
CougarT
Sorry you are right... I was to fast in looking at the code.
I am not sure, but maybe typeid can only be called when the class is fully defined. So what happens if you define VCNode in front of your CTree class
Its just a guess.
You only predefined the type. The compiler only knows the name. You are right that the compiler could accept typeid for this type too, because its a global static member. But the compiler has no final knowledge about this type.