-
Environment: VC6 Win2K/NT/98 This sample describes the difference between CONSOL...
Environment: VC6 Win2K/NT/98
This sample describes the difference between CONSOLE and GUI applications with 20 lines of code.
There are 2 small projects in this sample. The first project shows how to create a console in WinMain(). First of all, we need to allocate a console with AllocConsole() secondly, we in turn retrieve the operating system handle (GetStdHandle), run-time handle (_open_osfhandle), stream (_fdopen) and standard stream (stdout) finally, we can call functions like printf() and scanf().
The second project demonstrates how to create a window in main(). I created an edit box in a separate thread, so that you can control this window from the console. I retrieved the module handle through GetModuleHandle(), and then I called CreateWindow with the predefined class name EDIT.
As you can see, there is not much essential difference between console and GUI applications, even though VC requires us to indicate the type of the application when you create a p
- 2022-02-03 12:24:58下载
- 积分:1
-
绘制曲面,直线的程序,大家试试看,欢迎提出改进意见。
绘制曲面,直线的程序,大家试试看,欢迎提出改进意见。-drawing surface, a linear process, we try and welcome suggestions for improvement.
- 2022-07-11 17:15:36下载
- 积分:1
-
MFC程序中显示JPG或GIF图像文件示例,能方便的运用到自己的程序中。...
MFC程序中显示JPG或GIF图像文件示例,能方便的运用到自己的程序中。-MFC process shows JPG or GIF image files example, can facilitate the use of its own procedures.
- 2022-10-08 14:45:03下载
- 积分:1
-
对散乱数据点进行三角化的程序,大家试试看,欢迎提出改进意见。...
对散乱数据点进行三角化的程序,大家试试看,欢迎提出改进意见。-to scattered data points triangulation process, we try and welcome suggestions for improvement.
- 2023-08-13 22:15:02下载
- 积分:1
-
在桌面上绘制连续折线的程序,
可实现存储与打开
在桌面上绘制连续折线的程序,
可实现存储与打开-Drawing on the desktop continuous line of these procedures is to realize storage and open
- 2022-12-23 19:05:06下载
- 积分:1
-
上机位源码,不错的代码,大家可以看看,感兴趣的交流一下
上机位源码,不错的代码,大家可以看看,感兴趣的交流一下-On machine-bit source code, good code, we will look at, interested in exchange
- 2022-08-19 16:16:37下载
- 积分:1
-
VC&matlab混合编程的研究
VC&matlab混合编程的研究-VC
- 2022-02-07 23:38:37下载
- 积分:1
-
这个是visual C++ 实践与提高 数字图像处理工程应用篇的源代码,希望可以给你们带来帮助...
这个是visual C++ 实践与提高 数字图像处理工程应用篇的源代码,希望可以给你们带来帮助 -This is a visual C++ Practice and enhance digital images of the articles deal with engineering application source code, hope that we can bring you to help
- 2022-09-16 07:20:03下载
- 积分:1
-
笔者在开发县级电网调度自动化系统的过程中,碰到一个要绘制电力系统一次接线图的问题。由于电力系统一次接线图比较复杂,图上有一
些特殊的符号,象变压器符号、开...
笔者在开发县级电网调度自动化系统的过程中,碰到一个要绘制电力系统一次接线图的问题。由于电力系统一次接线图比较复杂,图上有一
些特殊的符号,象变压器符号、开关符号等等,用一般的编程方法来绘制比较困难,因此,笔者用C语言开发了一个手工绘制电力系统一次接线图
的键盘绘图程序,使用该程序绘制的一次接线图符合用户需求,效果良好。
2.使用方法
程序中定义了几个特殊键:
"V”:画笔提起
"W”:开始画图
"R”:开始擦图
"S”:当前图形存入文件
"E”:调出已有文件
"C”:画圆
程序一运行,屏幕上出现一个黄色的边框来设定画图的区域,区域中间出现提起的画笔符号 ,当按下”W“键时,画笔符号变为 ,此时可移动方向键(上、下、左、右、左上、左下、右上、右下)来画图;当按下”R“键时,画笔符号变为 ,此时可移动方向键来擦图;在画图过程中,按下“C”键,可画出一个半径为20个象素点的圆;当结束画图时,按下“S”键,将画好的图形存盘;按下“E”键可调出已有的图形进行编辑。-c
- 2022-05-21 20:17:39下载
- 积分:1
-
直接读文件的方式显示位图文件,运行就可出现位图文件。
直接读文件的方式显示位图文件,运行就可出现位图文件。-Direct reading of the document displayed bitmap file, run bitmap file can occur.
- 2023-03-14 08:35:04下载
- 积分:1