当前位置:网站首页>一种快速创建测试窗口的方法
一种快速创建测试窗口的方法
2022-06-12 13:26:00 【拓扑梅尔-漫漫开发路】
有时候,你可能想快速创建一个简单的窗口来测试某些功能,这个时候,你又不想花时间从头到尾一步一步地按照标准流程来建立它。例如,你可能需要测试一小段DDE代码,或者只是简单地想测试一下你新实现的消息提示框。那么,有什么好办法吗?
有。
为了帮你省去创建窗口时繁琐的各项工作,你可以简单地注册一个名为”scratch window”的窗口类,然后根据需要对它进行简单的子类化(Subclass)就可以使用了。
下面是参考代码:

至此,一个简单的测试窗口就出来了。
后面,我们将看到如何使用这个窗口来做些有意义的事情。
总结
注意,这里注册的窗口类,使用了默认的窗口过程DefWindowProc,然后,我们使用了自定义的窗口过程来对它创建的窗口进行了子类化。
最后
Raymond Chen的《The Old New Thing》是我非常喜欢的博客之一,里面有很多关于Windows的小知识,对于广大Windows平台开发者来说,确实十分有帮助。
本文来自:《The scratch window》

边栏推荐
- C language structure
- 【云原生 | Kubernetes篇】深入了解Ingress
- Summary of question brushing in leetcode sliding window
- NVIDIA Jetson Nano Developer Kit 入门
- Teach you how to create SSM project structure in idea
- Application of list and Dict
- The goods are full. You must take this knowledge
- verilog-mode的简要介绍
- Realization of Joseph Ring with one-way ring linked list
- imagemagick:a gentle introduction to magick++
猜你喜欢

Pytorch to onnx, onnxruntime reasoning in mmclas

Application of binary search -- finding the square root sqrt of a number

Pytorch framework

The goods are full. You must take this knowledge

Further understanding of the network

import torch_ Data view of geometric
FFmpeg 学习指南

Multi source BFS problem template (with questions)

Summary of question brushing in leetcode sliding window

简历 NFT 平台 TrustRecruit 加入章鱼网络成为候选应用链
随机推荐
VGA display color bar and picture (FPGA)
Hudi key generation
442 authors, 100 pages! It took Google 2 years to release the new benchmark big bench | open source
2066: [example 2.3] buying books
Innovation training (XI) summary of some bugs in the development process
章鱼网络进展月报 | 2022.5.1-5.31
TCP的“非”可靠性
m1 pod install pod lint 失败解决方案
import torch_ Geometric loads some common datasets
[embedded] serial communication and its case
Online picture material
达梦数据库DM8 windows环境安装
基于华为云鲲鹏弹性云服务器ECS部署openGauss数据库【这次高斯不是数学家】
Getting to know blob objects
hudi 键的生成(Key Generation)
Application of short circuit expression (||) in C language
在 Debian 10 上独立安装MySQL数据库
How to balance multiple losses in deep learning?
安装MySQL时出错,照着下面这个链接,做到cmd就不行了
403 you don't have permission to access this resource