Why don't it work in OnInitialUpdate or other
I have the following Code to see some fields in a Combo box it works right but how can I do it in a FormView to see the combo with the items on start up so that I dont have to click any other button?
void CSetTagsForm::OnBnClickedWrite()
{
for(int x = 0; x < (sizeof(genres) / sizeof(char*)); ++x)
m_Combo.AddString(genres[x]);
}
thats the rest of the 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::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(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::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif //_DEBUG
// CSetTagsForm message handlers
hope anyone will help me its very important