会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一叶扁舟
2019.08.23 慢慢积累,总会变强大的 2024.07.09 温故而知新 可以为师矣
博客园
首页
新随笔
联系
管理
上一页
1
···
32
33
34
35
36
37
38
39
下一页
2019年11月20日
用IDesktopWallpaper接口设置png壁纸
摘要: #include <Windows.h> #include <string> #include "Shobjidl.h" int main() { std::wstring x = L"C:\\Users\\strives\\Desktop\\ScreenShot\\panda.png"; HRES
阅读全文
posted @ 2019-11-20 09:56 strive-sun
阅读(741)
评论(0)
推荐(0)
2019年11月13日
从rc文件访问字符串
摘要: 有.rc文件,其中包含用于exe文件详细信息的版本,说明等。 如何获得在代码内使用的值?例如,要获取ProductName。 IDI_ICON1 ICON DISCARDABLE "abc-logo.ico" #if defined(UNDER_CE) #include <winbase.h> #e
阅读全文
posted @ 2019-11-13 16:05 strive-sun
阅读(527)
评论(0)
推荐(0)
2019年11月12日
指针示例----01
摘要: 今天在论坛看见关于指针使用的讨论,原帖:https://bbs.csdn.net/topics/394991693 我整理一下他们所说的几种方法,可能涉及到内存泄漏 case 1: #include <stdlib.h> #include <stdio.h> int *min(int x, int
阅读全文
posted @ 2019-11-12 09:33 strive-sun
阅读(181)
评论(0)
推荐(0)
2019年11月11日
使用CreateMetaFile创建WMF文件,并转换为EMF文件
摘要: #include <iostream> #include <stdio.h> #include <WINDOWS.H> #include <shellapi.h> #include <gdiplus.h> #include <Shlwapi.h> #pragma comment (lib,"Shlw
阅读全文
posted @ 2019-11-11 16:22 strive-sun
阅读(846)
评论(0)
推荐(0)
2019年11月8日
使用GDI+(WIC)加载32位的位图或者PNG图片(具有透明通道)
摘要: #include <windows.h> #include <gdiplus.h> HBITMAP LoadBitmapFromResource(DWORD ResourceID, bool transparent = true) { HANDLE hGlobal = NULL; ULONG_PTR
阅读全文
posted @ 2019-11-08 14:24 strive-sun
阅读(2413)
评论(0)
推荐(0)
C++最快获取像素值
摘要: HDC hdc, hdcTemp; RECT rect; BYTE* bitPointer; int x, y; int red, green, blue, alpha; while(true) { hdc = GetDC(HWND_DESKTOP); GetWindowRect(hWND_Desk
阅读全文
posted @ 2019-11-08 09:49 strive-sun
阅读(1006)
评论(0)
推荐(0)
2019年11月7日
如何连接虚拟的OneNote打印机
摘要: include <Windows.h> #include <iostream> int main() { HANDLE handle = CreateFile(L"OneNote", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE
阅读全文
posted @ 2019-11-07 18:11 strive-sun
阅读(1865)
评论(0)
推荐(0)
2019年11月6日
捕捉屏幕和光标
摘要: 另外使用createfile函数将捕捉后的图片储存为文件 #include <Windows.h> #include <stdio.h> #include <assert.h> void scrshot() { Sleep(1000); BITMAP bmpScreen; HWND hwnd = G
阅读全文
posted @ 2019-11-06 16:56 strive-sun
阅读(306)
评论(0)
推荐(0)
关于局部变量
摘要: 问题代码: #include <iostream> int *foo() { int a = 5; return &a; } int main() { int *p = foo(); std::cout << *p; *p = 8; std::cout << *p; } 最后会打印:58 理论上,a
阅读全文
posted @ 2019-11-06 15:58 strive-sun
阅读(176)
评论(0)
推荐(0)
2019年11月5日
win32 - 打开文件的属性对话框
摘要: 用到ShellExecuteEx 为了防止属性对话框无法成功打开(程序运行太快,以至于没有时间打开属性对话框,程序就结束了) 调用SHSetInstanceExplorer并使其保持活动状态,直到该COM对象被释放: #include <windows.h> #include <shlobj_cor
阅读全文
posted @ 2019-11-05 15:58 strive-sun
阅读(1039)
评论(2)
推荐(1)
上一页
1
···
32
33
34
35
36
37
38
39
下一页
公告