分类目录归档:C++

使用MSYS2+mingw+QT作为C++开发环境

 下载msys2

在中国科学技术大学镜像站点http://mirrors.ustc.edu.cn/msys2/distrib/下载最新版32(i686)/64(x86_64)位系统msys2

下载后安装

修改软件源

msys2采用pacman管理软件包,修改pacman的软件源提高下载速度

pacman的配置
编辑 /etc/pacman.d/mirrorlist.mingw32 ,在文件开头添加:

Server = http://mirrors.ustc.edu.cn/msys2/mingw/i686/
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/
Server = http://mirror.bit.edu.cn/msys2/mingw/i686/
Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/

编辑 /etc/pacman.d/mirrorlist.mingw64 ,在文件开头添加

Server = http://mirrors.ustc.edu.cn/msys2/mingw/x86_64/
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/x86_64/
Server = http://mirror.bit.edu.cn/msys2/mingw/x86_64/
Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/x86_64/

编辑 /etc/pacman.d/mirrorlist.msys ,在文件开头添加

Server = http://mirrors.ustc.edu.cn/msys2/msys/$arch/
Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/$arch/
Server = http://mirror.bit.edu.cn/msys2/msys/$arch/
Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/$arch/

然后执行 pacman -Sy 刷新软件包数据即可。

安装开发环境

安装基本开发环境和常用工具

pacman -S  base-devel  git  wget  p7zip  perl ruby python

安装 32位 MinGW-w64

pacman -S  mingw-w64-i686-toolchain

安装 64位 MinGW-w64

pacman -S  mingw-w64-x86_64-toolchain

安装Qt5和Qt Creator

pacman -S mingw64/mingw-w64-x86_64-qt5 mingw64/mingw-w64-x86_64-qt-creator

参考

C++学习资料

电子书

纸质书

Windows自动化打印Office文件(Word,PDF,Excel,PPT等)

Windows(C++)

WPF(.net C#)

打印机自助打印代码(队列监控拦截+取消+状态获取)(附C#,C++,VB实现)

Monitor jobs in a printer queue (.NET)

https://www.codeproject.com/Articles/51085/Monitor-jobs-in-a-printer-queue-NET

c# 完整代码展示了如何获取打印机任务状态

file

Print Spooler API

https://docs.microsoft.com/zh-cn/windows/win32/printdocs/print-spooler-api

The Print Spooler API provides an interface to the print spooler for applications to manage printers and print jobs.

The Print Spooler API is used by an application as part of its programming and not directly by end users.

PrintQueue.GetPrintJobInfoCollection Method

Creates a collection that contains a PrintSystemJobInfo object for each job in the queue.

https://docs.microsoft.com/en-us/dotnet/api/system.printing.printqueue.getprintjobinfocollection?view=netframework-4.8

"Virtual Printer" or "Moving Printjobs" (C++)

https://cboard.cprogramming.com/windows-programming/108156-virtual-printer-moving-printjobs.html

Monitoring a Printer Queue from VB.NET

https://www.codeproject.com/Articles/3313/Monitoring-a-Printer-Queue-from-VB-NET

How to catch printer event in python

https://stackoverflow.com/questions/15748386/how-to-catch-printer-event-in-python

Printers and SafeHandles

https://www.codeproject.com/Articles/14690/Printers-and-SafeHandles

Printers and SafeHandles (Part 2)

https://www.codeproject.com/Articles/15084/Printers-and-SafeHandles-Part-2