• 大小: 42.59MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-10
  • 语言: C/C++
  • 标签: MFC  绘图软件  

资源简介

用MFC单文档开发的简单绘图及图片管理软件

资源截图

代码片段和文件信息

// CanWrite.cpp : 实现文件
//

#include “stdafx.h“
#include “photomanage.h“
#include “CanWrite.h“
#include “afxdialogex.h“


// CCanWrite 对话框

IMPLEMENT_DYNAMIC(CCanWrite CDialogEx)

CCanWrite::CCanWrite(CWnd* pParent /*=NULL*/)
: CDialogEx(CCanWrite::IDD pParent)
{

}

CCanWrite::~CCanWrite()
{
}

void CCanWrite::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CCanWrite CDialogEx)
ON_BN_CLICKED(IDOK &CCanWrite::OnBnClickedOk)
ON_BN_CLICKED(IDC_BUTTON1 &CCanWrite::OnBnClickedButton1)
ON_WM_PAINT()
END_MESSAGE_MAP()


// CCanWrite 消息处理程序


void CCanWrite::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
UpdateData();
((CListBox *)GetDlgItem(IDC_LIST_Write))->ResetContent();
int n=0;
if(n!=1)
{
CString strSQL;
strSQL.Format(“select * from photomanage Where (用户名=\“%s\“ and 图片权限=‘写‘)“theApp.m_client.m_name);
m_pRecordset.CreateInstance(__uuidof(Recordset));
m_pRecordset->Open((_variant_t)strSQLtheApp.m_pConnection.GetInterfacePtr()adOpenDynamicadLockOptimisticadCmdText); 
if(!m_pRecordset->adoEOF)
m_pRecordset->MoveFirst();
while(!m_pRecordset->adoEOF)
{
((CListBox *)GetDlgItem(IDC_LIST_Write))->AddString((_bstr_t)(“图片名称:“+(CString)m_pRecordset->GetCollect(“图片名称“)+
“     创建者:“+(CString)m_pRecordset->GetCollect(“创建者“)));
n=1;
m_pRecordset->MoveNext();
}
m_pRecordset->Close();
strSQL.Format(“select * from photomanage Where 用户名=‘all‘ and (图片权限=‘读‘or 图片权限=‘写‘)“);
m_pRecordset.CreateInstance(__uuidof(Recordset));
m_pRecordset->Open((_variant_t)strSQLtheApp.m_pConnection.GetInterfacePtr()adOpenDynamicadLockOptimisticadCmdText); 
if(!m_pRecordset->adoEOF)
m_pRecordset->MoveFirst();
CString name;
while(!m_pRecordset->adoEOF)
{
name=m_pRecordset->GetCollect(“创建者“);
if(name!=theApp.m_client.m_name)
{
((CListBox *)GetDlgItem(IDC_LIST_Pic))->AddString((_bstr_t)(“图片名称:“+(CString)m_pRecordset->GetCollect(“图片名称“)+
“     创建者:“+(CString)m_pRecordset->GetCollect(“创建者“)));
n=1;
}
m_pRecordset->MoveNext();
}
if(!n)
MessageBox(“您尚未有具有写权限的图片!“);
m_pRecordset->Close();
}
UpdateData(FALSE);
}


void CCanWrite::OnBnClickedButton1()
{
// TODO: 在此添加控件通知处理程序代码
if(((CListBox *)GetDlgItem(IDC_LIST_Write))->GetCurSel()==-1)
MessageBox(“您未选取!“);
else
{
((CListBox *)GetDlgItem(IDC_LIST_Write))->GetText(((CListBox *)GetDlgItem(IDC_LIST_Write))->GetCurSel()theApp.m_client.m_select);
MessageBox(theApp.m_client.m_select);
}
}


void CCanWrite::OnPaint()
{
// device context for painting
// TODO: 在此处添加消息处理程序代码
// 不为绘图消息调用 CDialogEx::OnPaint()
CPaintDC   dc(this);   
CRect   rect;   
GetClientRect(&rect);   
CDC   dcMem;   
dcMem.CreateCompatibleDC(&dc);   
CBitmap   bmpBackground;   
bmpBackground.LoadBitmap(IDB_BITMAP5);    
BITMAP   bitmap;   
dc.SetStretchBltMode(HALFTONE);
bmpBackground.GetBitmap(&bitm

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3312  2013-09-14 23:19  photomanage\photomanage\CanWrite.cpp

     文件        500  2013-09-14 16:39  photomanage\photomanage\CanWrite.h

     文件        177  2013-09-14 00:09  photomanage\photomanage\CClient.h

     文件       1019  2013-09-16 15:41  photomanage\photomanage\CmdOperate.cpp

     文件        731  2013-09-15 09:58  photomanage\photomanage\CmdOperate.h

     文件       2611  2013-09-15 10:19  photomanage\photomanage\CmdOrder.cpp

     文件        420  2013-09-16 15:27  photomanage\photomanage\CmdOrder.h

     文件       1174  2013-09-14 17:00  photomanage\photomanage\ConfrimDlg.cpp

     文件        410  2013-09-14 16:44  photomanage\photomanage\ConfrimDlg.h

     文件     115938  2013-09-14 16:39  photomanage\photomanage\Debug\CanWrite.obj

     文件      12636  2013-09-14 16:44  photomanage\photomanage\Debug\cl.command.1.tlog

     文件      70774  2013-09-14 16:44  photomanage\photomanage\Debug\CL.read.1.tlog

     文件      44012  2013-09-14 16:44  photomanage\photomanage\Debug\CL.write.1.tlog

     文件      27484  2013-09-14 16:44  photomanage\photomanage\Debug\ConfrimDlg.obj

     文件     101772  2013-09-14 16:44  photomanage\photomanage\Debug\DeletePhoto.obj

     文件      27336  2013-09-14 16:44  photomanage\photomanage\Debug\ExitDlg.obj

     文件     153880  2013-09-14 16:44  photomanage\photomanage\Debug\GiveRightDlg.obj

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link-cvtres.read.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link-cvtres.write.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2008-cvtres.read.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2008-cvtres.write.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2008.read.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2008.write.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2168-cvtres.read.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2168-cvtres.write.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2168.read.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.2168.write.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.3236-cvtres.read.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.3236-cvtres.write.1.tlog

     文件          2  2013-09-14 16:44  photomanage\photomanage\Debug\link.3236.read.1.tlog

............此处省略204个文件信息

评论

共有 条评论