void UpdateDirectoryList()
{
	SendMessage(ghDirectoryListWindow, LB_RESETCONTENT, 0, 0);

	MediaServer *mserver = gMediaGate->getMediaServer();
	int dirCnt = mserver->getNContentDirectories();
	for (int n=0; n<dirCnt; n++) {
		Directory *dir = mserver->getContentDirectory(n);
		const char *name = dir->getFriendlyName();
        FTL::CFConversion conv;
		SendMessage(ghDirectoryListWindow, LB_ADDSTRING, 0, (LPARAM)conv.MBCS_TO_TCHAR(name));
	}
}
void DeleteDirectoryList(int selID)
{
	MediaServer *mserver = gMediaGate->getMediaServer();
	Directory *dir = mserver->getContentDirectory(selID);
	if (dir == NULL)
		return;
    
	
    if (FTL::FormatMessageBox(ghMainWindow, WINDOW_TITLE, MB_OKCANCEL, 
        TEXT("Are you delete the '%s' directory ?"),  dir->getFriendlyName()) != IDOK)
		return;
	mserver->removeContentDirectory(selID);
	UpdateDirectoryList();
}