摘要: 给MFC程序添加通知区域图标分类: MFC 2011-07-11 23:24 23人阅读 评论(0) 收藏 举报给MFC程序添加通知区域图标现在起来越多的程序都有一个通知区域图标(托盘图标),既美观又方便。但是MFC不像C#一样提供NotifyIcon控件,要实现通知区域图标,就要自己做一个CTrayIcon类或者使用NOTIFYICONDATA结构。 MSDN中关于NOTIFYICONDATA的介绍: http://msdn.microsoft.com/en-us/library/ms910625.aspx 我在这里记录一下自己通过NOTIFYICONDATA实现MFC程序中的通知区域图标的 阅读全文
posted @ 2011-11-15 11:28 ervid 阅读(427) 评论(0) 推荐(0) 编辑
摘要: PaintArea::PaintArea(){ scale=1;//初始化scale image=QImage(800,600,QImage::Format_RGB32); backColor=qRgb(255,255,255);//设置背景色为白色 image.fill(backColor); paint(image);}void PaintArea::paintEvent(QPaintEvent *){ QPainter paint(this); paint.scale(scale,scale); paint.drawImage(0,0,image);}void PaintArea::pa 阅读全文
posted @ 2011-04-07 11:04 ervid 阅读(1843) 评论(0) 推荐(0) 编辑
摘要: void PaintArea::mousePressEvent(QMouseEvent *event){ if(event->button()==Qt::LeftButton) { dragPosition = event->globalPos()-frameGeometry().topLeft(); event->accept(); }}void PaintArea::mouseMoveEvent(QMouseEvent *event) { if (event->buttons() & Qt::LeftButton) { move(event->glob 阅读全文
posted @ 2011-04-07 11:03 ervid 阅读(334) 评论(0) 推荐(0) 编辑
摘要: public struct testStram { public int userid; public int funid; public int limitStyle; [MarshalAs(UnmanagedType .ByValTStr,SizeConst=32)]// public string buffur;//预留32位 } private void Form1_Load(object... 阅读全文
posted @ 2010-11-07 11:42 ervid 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 工作第一周,用到的知识点已经主要代码。1.Directory和DirectoryInfo对文件夹的操作。Directory.createDirectory(路径);根据路径创建文件夹 (包括工作组共享路径)eg:@\\192.168.1.100\共享文件夹。2.定义结构体。/// <summary> /// 定义结构体 /// </summary> public struc... 阅读全文
posted @ 2010-11-05 16:52 ervid 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 今天发现了博客园!我将从这里开始记住我对IT知识的一切进展。 阅读全文
posted @ 2010-04-12 20:46 ervid 阅读(97) 评论(1) 推荐(0) 编辑