Home

Fonts in a Combo Box

 
private: System::Void Form1_Load(System::Object *  sender, System::EventArgs *  e)
{
	 InstalledFontCollection *colFonts = new InstalledFontCollection;
	 FontFamily *fontFamilies[] = colFonts->Families;

	 for(int i = 0; i < fontFamilies->Length; i++)
		 this->cboFonts->Items->Add(fontFamilies[i]->Name);

	 this->cboFonts->Text = S"Times New Roman";
}

Home Copyright © 2005-2010 FunctionX, Inc.