显示下一条  |  关闭

蓝剑的博客

付出最大努力,追求最高成就,享受最佳生活,收获无悔人生

 
 
 
 
 
 
模块内容加载中...
 
 
 
 
 

日历

 
 
模块内容加载中...
 
 
 
 
 
 
 
列表加载中...
 
 
 
 
 

天气

 
 
模块内容加载中...
 
 
 
 
 
 
 
 
模块内容加载中...
 
 
 
 
 
 
 

PICTURE控件的使用

2011-12-17 2:22:05 阅读20 评论0 172011/12 Dec17

方法1.先从最简单的开始,用picture 控件来实现.
步骤:
先在资源里Import一张图片,ID为IDB_BITMAP2
然后在对话框上添加一个picture控件,右键点击打开属性,
将type下拉框选择BITMAP,紧跟着下面就出现一个Image下拉框,
拉开就会看到所有已经载入好的图片,
选择你要的图片.运行程序即可看到.

方法2 vc picture控件通过CBitmap,HBITMAP,直接用OnPaint()绘制
首先在CTestDlg类中声明一个变量:    CBitmap   m_bmp;
然后我们在对话框中加入一个picture 标签,名为IDC_STATIC1
然后:
BOOL CDisplayPic::OnInitDialog()

作者  | 2011-12-17 2:22:05 | 阅读(20) |评论(0) | 阅读全文>>

加载背景图片

2011-12-17 1:16:45 阅读0 评论0 172011/12 Dec17

方法一:
在OnPaint事件

if (IsIconic())
{
}
else
{
        //CDialog::OnPaint();//注意要禁止这个调用
        CPaintDC dc(this);
        CRect   rect;
        GetClientRect(&rect);
        CDC   dcMem;
        dcMem.CreateCompatibleDC(&dc);
        CBitmap   bmpBackground;

作者  | 2011-12-17 1:16:45 | 阅读(0) |评论(0) | 阅读全文>>

选择文件夹

2009-12-5 14:01:47 阅读22 评论0 52009/12 Dec5

Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias "SHBrowseForFolderA" (LpBrowseInfo As BROWSEINFO) As Long
Private Declare Function SHGetPathFromIDlist Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Private Const BIF_RETURNONLYFSDIRS = &H1
Private Type BROWSEINFO
    hOwner As Long
    pidlroot As Long

作者  | 2009-12-5 14:01:47 | 阅读(22) |评论(0) | 阅读全文>>

清除ie临时文件

2009-12-2 23:50:15 阅读81 评论0 22009/12 Dec2

Option Explicit

Private Declare Function FindFirstUrlCacheGroup Lib "wininet.dll" ( _
    ByVal dwFlags As Long, _
    ByVal dwFilter As Long, _
    ByRef lpSearchCondition As Long, _
    ByVal dwSearchCondition As Long, _
    ByRef lpGroupId As Date, _
    ByRef lpReserved As Long) As Long

作者  | 2009-12-2 23:50:15 | 阅读(81) |评论(0) | 阅读全文>>

TransparentBlt图片透明

2009-9-8 12:28:55 阅读585 评论0 82009/09 Sept8

Private Declare Function TransparentBlt Lib "msimg32.dll" _
     (ByVal hdcDest As Long, _
     ByVal nXOriginDest As Long, _
     ByVal nYOriginDest As Long, _
     ByVal nWidthDest As Long, _
     ByVal nHeightDest As Long, _
     ByVal hdcSrc As Long, _

作者  | 2009-9-8 12:28:55 | 阅读(585) |评论(0) | 阅读全文>>

flash右键菜单

2009-8-13 10:07:05 阅读25 评论0 132009/08 Aug13

my_cm = new ContextMenu();// 申明一个新的菜单对象
my_cm.hideBuiltInItems();// 屏敞当前的右键菜单
my_cm.customItems.push(new ContextMenuItem("lianzy的日志", menu1));// 创建一个新的子菜单,名为“”,并设置menu1为响应函数
function menu1(obj, item) {
 trace("lianzy的日志");
 getURL(http://lianzy.blog.163.com, "_blank");// “”的响应函数具体内容
}
_root.menu = my_cm;// 将当前定义的菜单绑定到主场景的右键菜单

作者  | 2009-8-13 10:07:05 | 阅读(25) |评论(0) | 阅读全文>>

图片旋转

2009-8-11 13:23:29 阅读59 评论0 112009/08 Aug11

Option Explicit
Private Declare Function PlgBlt Lib "gdi32" (ByVal hdcDest As Long, _
lpPoint As POINTAPI, ByVal hdcSrc As Long, ByVal nXSrc As Long, _
ByVal nYSrc As Long, ByVal nWidth As Long, ByVal nHeight As Long, _
ByVal hbmMask As Long, ByVal xMask As Long, ByVal yMask As Long) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Const pi = 3.14159265358979

作者  | 2009-8-11 13:23:29 | 阅读(59) |评论(0) | 阅读全文>>

数组排序

2009-7-6 19:33:25 阅读31 评论0 62009/07 July6

Private Function MIM(Arr As Variant) '升序排列
    Dim i, j As Long
    Dim a As Variant, b As Variant
    For i = 0 To UBound(Arr)
        For j = i + 1 To UBound(Arr)
            a = Arr(i)
            b = Arr(j)
            If Arr(i) > Arr(j) Then
                Arr(i) = b

作者  | 2009-7-6 19:33:25 | 阅读(31) |评论(0) | 阅读全文>>

Mdi最大最小按钮不可用

2009-7-4 16:25:13 阅读17 评论0 42009/07 July4

Private   Declare   Function   SetWindowLong   Lib   "user32"   _  
  Alias   "SetWindowLongA"   (ByVal   hwnd   As   Long,   ByVal   _  
  nIndex   As   Long,   ByVal   dwNewLong   As   Long)   As   Long  
   
  Private   Declare   Function   GetWindowLong   Lib   "user32"   _  

作者  | 2009-7-4 16:25:13 | 阅读(17) |评论(0) | 阅读全文>>

截屏

2009-7-4 4:36:59 阅读30 评论0 42009/07 July4

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const theScreen = 0
Const theForm = 1

Private Sub Command1_Click()
    Call keybd_event(vbKeySnapshot, theForm, 0, 0)
    '若theForm改成theScreen则Copy整个Screen
    DoEvents
    SavePicture

作者  | 2009-7-4 4:36:59 | 阅读(30) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 
 
 

广东 广州

 发消息  写留言

 
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 
 
 
心情随笔列表加载中...
 
 
 
 
 
 
 
 
 
 
 
下载音乐盒  曲目表歌词秀
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2012

   
创建博客 登录  
 关注