代码拉取完成,页面将自动刷新
#if !defined(AFX_DLGIMGLST_H__7AD465A0_80DF_11D5_8752_00D009619765__INCLUDED_)
#define AFX_DLGIMGLST_H__7AD465A0_80DF_11D5_8752_00D009619765__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgImgLst.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDlgImgLst dialog
#include "MImage.h"
#include "Cphs.h"
#define IMG_ID 4000
class CImgList : public CTypedPtrList <CObList,CMImage* >
{
private:
long m_Count;
public:
CImgList(){
m_Count=0;
}
virtual ~CImgList(){
CMImage* mTmp;
POSITION po;
po=GetHeadPosition();
while(po!=NULL)
{
mTmp=GetNext(po);
delete mTmp;
}
RemoveAll();
}
void SetCount(long nCount)
{
CMImage* mTmp;
/*po=GetHeadPosition();
while(po!=NULL)
{
mTmp=GetNext(po);
mTmp->DestroyWindow();
delete mTmp;
}
RemoveAll();
for(int i= 0 ;i<nCount;i++)
{
mTmp=new CMImage;
AddTail(mTmp);
}*/
m_Count=this->GetCount();
if(m_Count < nCount)
{
int C=nCount-m_Count;
for(int i=0;i<C;i++)
{
mTmp=new CMImage;
AddTail(mTmp);
}
}
else if(m_Count > nCount)
{
int C=m_Count-nCount;
for(int i=0;i<C;i++)
{
mTmp=GetTail();
if(IsWindow(mTmp->m_hWnd))
{
mTmp->DestroyWindow();
}
delete mTmp;
RemoveTail();
}
}
}
CMImage* operator [] (int nIndex ){
POSITION po;
po=FindIndex(nIndex);
return GetAt(po);
}
};
class CDlgImgLst : public CWnd
{
// Construction
public:
int m_ImgIx;
void OnImgClick(int Index);
void LoadAllImage();
virtual ~CDlgImgLst();
CDlgImgLst(CListBox* pListZDG,CListBox* pListBox); // standard constructor
// Dialog Data
//{{AFX_DATA(CDlgImgLst)
//enum { IDD = IDD_IMG_LST };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
int m_imgCount;
CImgList m_Image;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDlgImgLst)
public:
virtual BOOL Create(CWnd* pParentWnd=NULL);
protected:
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
protected:
CListBox* m_pListBox;
CListBox *m_pListZDG;
CBrush m_bkbr;
// Generated message map functions
//{{AFX_MSG(CDlgImgLst)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLGIMGLST_H__7AD465A0_80DF_11D5_8752_00D009619765__INCLUDED_)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。