在VC6对话框中绘制矩阵数据 [英] Matrix data plotting on dialog box in VC6

查看:84
本文介绍了在VC6对话框中绘制矩阵数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用颜色值填充的2D矩阵(也就是说,整个矩阵数据代表一幅图像).我的问题是如何将这些数据绘制在图片框区域中,以便在绘制所有数据后在图片框区域中显示图像.我的图片框ID为IDC_DISPLAY

我已经调用了一个函数:

I have a 2D matrix filled with color value (that is, whole matrix data represent an image). My problem is how can i plot those data in a picture box area so that after plotting all data an image will be shown in picture box area.My picture box ID is IDC_DISPLAY

I have called a function:

showImage(int matrix[][])
{
 ''PLEASE HELP
}

推荐答案

您可以使用 http://www.antigrain.com/index.html [^ ]

这是一个非常好的2D图形库

您使用 CWnd :: GetDlgItem [
You can create the image using http://www.antigrain.com/index.html[^]

It''s a very good 2D graphics library

You use CWnd::GetDlgItem[^] to get the window handle for the control identified by IDC_DISPLAY ...



Regards
Espen Harlinn


您可以创建HBITMAP并使用 STM_SETIMAGE [ ^ ]消息您的控件的参数.
You can create a HBITMAP and set its pixel values with SetDIBits[^]. Depending on how you store pixel data in your matrix[][] you might have to do a conversion to RGB.

When you have your HBITMAP, you can send a STM_SETIMAGE[^] message with IMAGE_BITMAP argument to your control.


这篇关于在VC6对话框中绘制矩阵数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆