示例#1
0
文件: zogvmDlg.cpp 项目: dulton/brpj
void CZogvmDlg::OnButtonFind() 
{
	// TODO: Add your control notification handler code here
	UpdateData(TRUE);

	ListTotal=0;

	memset(SQLstr,0,1024);
	
	SQLupdown.type_video=m_c_video;
	SQLupdown.type_audio=m_c_audio;
	SQLupdown.type_sub=m_c_sub;
	SQLupdown.type_other=m_c_other;

	SQLupdown.point=POINT_PATH; 
	SQLupdown.path=true;
	SQLupdown.name=false;
	SQLupdown.creattime=false;
	SQLupdown.lasttime=false;
	SQLupdown.filesize=false;
	SQLupdown.resolution=false;

	if(m_sreach.IsEmpty())
	{
		SQLupdown.issearch=false;
		SQLDB.File_filterUpDown(SQLstr,SQLupdown);
		ListTotal=SQLDB.File_Number(SQLstr);
	}
	else
	{
		SQLupdown.issearch=true;
		SQLDB.File_filterUpDown(SQLstr,SQLupdown);
		ListTotal=SQLDB.File_NumberForSearch(SQLstr,m_sreach.GetBuffer(0));
	}

	ListNow=0;

	ModeFlag=MODE_FIND;
	DisplayerList();
}
示例#2
0
文件: zogvmDlg.cpp 项目: dulton/brpj
//列头点击事件
void CZogvmDlg::OnLvnColumnclickList(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
	// TODO: 在此添加控件通知处理程序代码
	int sort_column = pNMLV->iSubItem;//点击的列
	UpdateData(TRUE);

	if(MODE_FIND ==ModeFlag )
	{
		switch(sort_column)
		{
		case 4:		
			SQLupdown.point=POINT_PATH;
			SQLupdown.path=!SQLupdown.path;
			break;
		case 5:		
			SQLupdown.point=POINT_NAME;
			SQLupdown.name=!SQLupdown.name;
			break;
		case 8:		
			SQLupdown.point=POINT_CREATTIME;
			SQLupdown.creattime=!SQLupdown.creattime;
			break;
		case 9:		
			SQLupdown.point=POINT_LASTTIME;
			SQLupdown.lasttime=!SQLupdown.lasttime;
			break;
		case 10:	
			SQLupdown.point=POINT_FILESIZE;
			SQLupdown.filesize=!SQLupdown.filesize;
			break;
		case 16:	
			SQLupdown.point=POINT_RESOLUTION;
			SQLupdown.resolution=!SQLupdown.resolution;
			break;
		default:return ;
		}

		ListTotal=0;

		memset(SQLstr,0,1024);

		SQLupdown.type_video=m_c_video;
		SQLupdown.type_audio=m_c_audio;
		SQLupdown.type_sub=m_c_sub;
		SQLupdown.type_other=m_c_other;

		if(m_sreach.IsEmpty())
		{
			SQLupdown.issearch=false;
			SQLDB.File_filterUpDown(SQLstr,SQLupdown);
			ListTotal=SQLDB.File_Number(SQLstr);
		}
		else
		{
			SQLupdown.issearch=true;
			SQLDB.File_filterUpDown(SQLstr,SQLupdown);
			ListTotal=SQLDB.File_NumberForSearch(SQLstr,m_sreach.GetBuffer(0));
		}

		ListNow=0;

		ModeFlag=MODE_FIND;
		DisplayerList();
	}
	// TODO: Add your control notification handler code here
	*pResult = 0;
}