000
31.12.2002, 13:35 Uhr
~andreasK
Gast
|
Habe da folgende Funktion:
void CSetTagsForm::OnBnClickedWrite() { for(int x = 0; x < (sizeof(genres) / sizeof(char*)); ++x) m_Combo.AddString(genres[x]); }
Die mir ein ComboBox mit bestimmten Zeichen füllen soll! Jetzt will ichd dass dies direkt geschieht, wenn ich den View aAufrufe in welche Funktion muss ich den Code schreiben dass dies geschieht?
hier der restlcihe Code:
// SetTagsForm.cpp : implementation file //
#include "stdafx.h" #include "MP3Locater.h" #include "SetTagsForm.h" #include "DirDialog.h" #include "..\id3lib-3.8.0\include\id3\tag.h"
//Genresarten static const char *genres[] = { "Blues ", "Classic Rock ", "Country ", "Dance ", "Disco ", "Funk ", "Grunge ", "Hip-Hop ", "Jazz ", "Metal ", "New Age ", "Oldies ", "Other ", "Pop ", "R&B ", "Rap ", "Reggae ", "Rock ", "Techno ", "Industrial ", "Alternative ", "Ska ", "Death Metal ", "Pranks ", "Soundtrack ", "Euro-Techno ", "Ambient ", "Trip-Hop ", "Vocal ", "Jazz+Funk ", "Fusion ", "Trance ", "Classical ", "Instrumental ", "Acid ", "House ", "Game ", "Sound Clip ", "Gospel ", "Noise ", "Altern Rock ", "Bass ", "Soul ", "Punk ", "Space ", "Meditative ", "Inst. Pop ", "Instrum. Rock ", "Ethnic ", "Gothic ", "Darkwave ", "Techno-Indus ", "Electronic ", "Pop-Folk ", "Eurodance ", "Dream ", "Southern Rock ", "Comedy ", "Cult ", "Gangsta ", "Top 40 ", "Christian Rap ", "Pop/Funk ", "Jungle ", "Native American", "Cabaret ", "New Wave ", "Psychadelic ", "Rave ", "Showtunes ", "Trailer ", "Lo-Fi ", "Tribal ", "Acid Punk ", "Acid Jazz ", "Polka ", "Retro ", "Musical ", "Rock & Roll ", "Hard Rock " };
/////////////////////////////////////////////////////////////////////////////////
// CSetTagsForm
IMPLEMENT_DYNCREATE(CSetTagsForm, CFormView)
CSetTagsForm::CSetTagsForm() : CFormView(CSetTagsForm::IDD) , m_Directory(_T("")) , m_Edit_Title(_T("")) , m_Edit_Artist(_T("")) { }
CSetTagsForm::~CSetTagsForm() { }
void CSetTagsForm:oDataExchange(CDataExchange* pDX) { CFormView:oDataExchange(pDX); DDX_Text(pDX, IDC_DIRECTORY, m_Directory); DDX_Text(pDX, IDC_EDIT_TITLE, m_Edit_Title); DDX_Text(pDX, IDC_EDIT_ARTIST, m_Edit_Artist); DDX_Control(pDX, IDC_COMBO1, m_Combo); }
BEGIN_MESSAGE_MAP(CSetTagsForm, CFormView) ON_BN_CLICKED(IDC_OPEN, OnBnClickedOpen) ON_BN_CLICKED(IDC_WRITE, OnBnClickedWrite) END_MESSAGE_MAP()
// CSetTagsForm diagnostics
#ifdef _DEBUG void CSetTagsForm::AssertValid() const { CFormView::AssertValid(); }
void CSetTagsForm:ump(CDumpContext& dc) const { CFormView:ump(dc); } #endif //_DEBUG |