在CImageArea类中调用CGIFJPGDlg类(主对话框类)的DrawSelectedImage函数:
1. 在CImageArea类的.cpp文件中include CGIFJPGDlg类的头文件
#include "GIFJPGDlg.h"
2. 在要调用的函数中使用下面的语句:
void CImageArea::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CStatic::OnPaint() for painting messages
CGIFJPGDlg* pWnd = (CGIFJPGDlg*)(GetParent()) -> GetParent();
pWnd->DrawSelectedImage();
}

本文介绍如何在CImageArea类中调用CGIFJPGDlg类的DrawSelectedImage函数实现图像绘制。具体步骤包括在CImageArea的.cpp文件中包含CGIFJPGDlg的头文件,并在OnPaint函数中通过父窗口获取CGIFJPGDlg实例并调用其DrawSelectedImage方法。
6050

被折叠的 条评论
为什么被折叠?



