VC++中单文档应用程序如何修改单文档应用程序的外观(图标,标题,背景,鼠标)
2022-03-20 19:41:39 131KB 图标 标题 背景 鼠标
1
原tab控件,仿360开关控件版权归原作者! VB控件背景透明代码来自:新浪 “玄雨清风”的博客 感谢以上两位源代码作者 链接:http://pan.baidu.com/s/1hrAEXqG 密码:nfhc '-----------------------以下是转自博客的控件透明源代码(可透明至父窗体或桌面)------------- '添加一个用户控件UserControl,代如下: Option Explicit '实现用户控件UserControl的"伪透明" Private Type POINTAPI X As Long Y As Long End Type Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hDC As Long) As Long Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long Private Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hDC As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long Private Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hDC As Long) As Long Private Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long) As Long Private Declare Function DeleteDC Lib "gdi32" (ByVal hDC As Long) As Long Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const WM_ERASEBKGND = &H14 Private Const WM_PAINT = &HF Private Const SRCCOPY = &HCC0020 ' (DWORD) dest = source Public Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Public Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Public Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Private m_BK As Boolean '复制控件在父窗口的背景 Private Sub CopyParentBackground(ByVal phWnd As Long, ByVal chWnd As Long, ByVal hDestDC As Long) Dim lpRect As RECT, lpPoint As POINTAPI, nWidth As Long, nHeight As Long Dim BitMap As Long, oldBitMap As Long, hDC As Long, memDC As Long Call GetWindowRect(phWnd, lpRect) 'Call GetClientRect(phWnd, lpRect) nWidth = lpRect.Right - lpRect.Left '获取控件的宽度 nHeight = lpRect.Bottom - lpRect.Top '获取控件的高度 hDC = GetDC(0) BitMap = CreateCompatibleBitmap(hDC, nWidth, nHeight) Call ReleaseDC(0, hDC) memDC = CreateCompatibleDC(0) oldBitMap = SelectObject(memDC, BitMap) Call SendMessage(phWnd, WM_ERASEBKGND, memDC, 0) Call SendMessage(phWnd, WM_PAINT, memDC, 0) '至此memDC上已经保存了父窗口的背景内容 '用户可以调用BitBlt(...)等函数拷贝memDC的内容到子窗口的某个区域, '这样就达到了透明效果; Call GetWindowRect(chWnd, lpRect) lpPoint.X = lpRect.Left lpPoint.Y = lpRect.Top Call ScreenToClient(phWnd, lpPoint) '获取控件在父窗口的左上角位置 Call BitBlt(hDestDC, 0, 0, nWidth, nHeight, memDC, lpPoint.X, lpPoint.Y, SRCCOPY) ''''''''''''''''''''''复制背景之后,在这里可以其他事情'''''''''''''''''''''''''''' UserControl.CurrentY = 10 UserControl.Print "透明用户控件" UserControl.Refresh ' Call SelectObject(memDC, oldBitMap) Call DeleteDC(memDC) Call DeleteObject(BitMap) End Sub '复制控件在屏幕的背景 Private Sub CopyScreenBackground(ByVal phWnd As Long, ByVal chWnd As Long, ByVal hDestDC As Long) Dim lpRect As RECT, nWidth As Long, nHeight As Long, hDC As Long Call GetWindowRect(chWnd, lpRect) nWidth = lpRect.Right - lpRect.Left '获取控件的宽度 nHeight = lpRect.Bottom - lpRect.Top '获取控件的高度 ShowWindow chWnd, 0 '隐藏 DoEvents hDC = GetDC(0) Call BitBlt(hDestDC, 0, 0, nWidth, nHeight, hDC, lpRect.Left, lpRect.Top, SRCCOPY) Call ReleaseDC(0, hDC) ShowWindow chWnd, 5 '显示 ''''''''''''''''''''''复制背景之后,在这里可以其他事情'''''''''''''''''''''''''''' UserControl.CurrentY = 10 UserControl.Print "透明用户控件" UserControl.Refresh End Sub Private Sub UserControl_Initialize() UserControl.ScaleMode = vbPixels End Sub Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) RaiseEvent MouseDown(Button, Shift, X, Y) End Sub Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) RaiseEvent MouseMove(Button, Shift, X, Y) End Sub Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) RaiseEvent MouseUp(Button, Shift, X, Y) CopyBKImage m_BK End Sub Private Sub UserControl_Resize() On Error Resume Next CopyBKImage m_BK End Sub Private Sub UserControl_Show() CopyBKImage m_BK End Sub Public Property Let CopyBKMode(ByVal bkm As Boolean) m_BK = bkm End Property Public Property Let BorderStyle(BStyle As Boolean) If BStyle = True Then UserControl.BorderStyle = 1 Else UserControl.BorderStyle = 0 End If End Property Public Sub Refresh() CopyBKImage m_BK UserControl.Refresh End Sub Private Sub CopyBKImage(Optional ByVal flag As Boolean = False) If flag = True Then CopyScreenBackground UserControl.Parent.hwnd, UserControl.hwnd, UserControl.hDC Else CopyParentBackground UserControl.Parent.hwnd, UserControl.hwnd, UserControl.hDC End If End Sub '''''''''''''''''''''''''''''''调用实例''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''Form1代码'''''''''''''''''''''''''''''' Option Explicit Dim LabX As Single, LabY As Single, IsMouseDownLab As Boolean Private Sub ctl1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) IsMouseDownLab = True LabX = X: LabY = Y End Sub Private Sub ctl1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If IsMouseDownLab = True Then '移动ctl1的位置 If Button = 1 Then ctl1.Move ctl1.Left + Me.ScaleX(X - LabX, 3, 3), ctl1.Top + ScaleX(Y - LabY, 3, 3) End If End Sub Private Sub ctl1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) IsMouseDownLab = False End Sub Private Sub Form_Load() Me.ScaleMode = vbPixels ctl1.CopyBKMode = True '复制控件在屏幕的背景 ctl2.CopyBKMode = False '默认值,复制控件在父窗口的背景 ctl2.BorderStyle = True '有边框 ctl1.BorderStyle = False '无边框 End Sub
2022-03-20 14:42:35 74KB 控件背景透明 控件透明 仿360开关
1
炫酷科幻粒子动态背景后台登录特效代码下载,带验证弹窗js特效。。 炫酷科幻粒子动态背景后台登录特效代码下载,带验证弹窗js特效。。
2022-03-19 18:16:48 271KB js登陆特效
1
1000张背景图片素材,图片清晰,便于编辑!!
2022-03-19 09:31:25 174.01MB 背景 素材
1
为了准确地划分运动目标和背景区域,提出一种自适应阈值的运动目标提取算法,对现有基于背景差的提取算法进行改进。本算法将运动目标和背景作为两个聚类,对图像中的点按像素灰度进行分类,以聚类间的方根—算术均值距离最大作为分割阈值选择的准则,使得运动目标提取算法中二值化阈值能够自动更新,从而实现对运动目标的准确完整提取。实验结果表明,该算法能够较准确快速地提取运动目标,并对环境亮度突变、背景存在微小运动等情况具有较好的鲁棒性。
1
文档解说演示demo,演示在接了youme talk sdk的情况下 u3d引擎如何实现音量按键控制媒体和通话音量
2022-03-17 14:25:36 46.24MB 音视频sdk 通话音量 媒体音量 背景音乐
1
PIVlab说明书,操作指南
2022-03-16 21:55:07 17KB PIV 透明土 岩土
1
本文实例讲述了JS实现在页面随时自定义背景颜色的方法。分享给大家供大家参考。具体实现方法如下: 代码如下:<HTML> <HEAD> <TITLE>JS实现在页面随时自定义背景颜色</TITLE> [removed] <!– Begin //以下代码将输入框及其所在的层写进窗口。 [removed]ln(‘<div align=”center” id=bgcolortestdiv style=”BACKGROUND-COLOR: gray;POSITION: absolute;width: 200; height: 70; top=100;
2022-03-16 19:53:00 26KB js js代码 方法
1
Unity WebGL版,背景透明化(画布透明),显示Html网页背景。内含Demo和项目文件。unity版本2018.4.2,测试通过。
2022-03-16 18:41:50 4.56MB unity unity3d WebGL 游戏开发
1
1、ListCtrl和HeaderCtrl支持共用位图底图,可以整个应用程序使用同一张完整底图图片,完美实现换肤等需要; 2、ListCtrl和HeaderCtrl支持独立位图底图,绘制背景时各自使用自己的独立底图; 3、ListCtrl和HeaderCtrl支持纯色背景色填充; 4、背景使用顺序是:共用底图→独立底图→纯背景色; 5、各种外观要素(底图、底色、字体、字色、列表头高度等)均可自定义设置; 6、HeaderCtrl中实现在当前选择列上绘制排序标志(升序或降序); 7、ListCtrl实现排序功能(升序或降序,字符串或数字),选择某列(即按下某列表头)时,先升序排列,再次按下该列表头时,变为降序,再按,又升序,如此反复。同时,列表头中的排序标志相应变化; 8、ListCtrl实现列表项拖拽功能,可以鼠标左键拖拽任意一项到某位置后松开,从而将该项插入到该位置处。
2022-03-15 22:55:53 4.28MB CListCtrl CHeaderCtrl 图片背景 换肤
1