mfc application

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
im going to make a programm that display(show) bmp file by MFC app and SDI i went to this site
http://msdn.microsoft.com/en-us/magazine/cc301454.aspx
i made picture.h picture.cpp
<span class="x_x_Apple-tab-span" style="white-space:pre view.h view.cpp
<span class="x_x_Apple-tab-span" style="white-space:pre PictCtrl.h PictCtrl.cpp
i copied codes below each according
Picture.h
<pre style="border:0px; font-family:inherit; outline:0px; padding:0px; color:#333333; font-size:12.666666984558105px; line-height:15.333333015441895px <code style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px ////////////////////////////////////////////////////////////////
// MSDN Magazine — October 2001
// If this code works, it was written by Paul DiLascia.
// If not, I dont know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000
// too.
// Set tabsize = 3 in your editor.
//
#pragma once
#include <atlbase.h>

//////////////////
// Picture object—encapsulates IPicture
//
class CPicture {
public:
CPicture();
~CPicture();

// Load from various resources
BOOL Load(UINT nIDRes);
BOOL Load(LPCTSTR pszPathName);
BOOL Load(CFile& file);
BOOL Load(CArchive& ar);
BOOL Load(IStream* pstm);

// render to device context
BOOL Render(CDC* pDC, CRect rc=CRect(0,0,0,0),
LPCRECT prcMFBounds=NULL) const;

CSize GetImageSize(CDC* pDC=NULL) const;

operator IPicture*() {
return m_spIPicture;
}

void GetHIMETRICSize(OLE_XSIZE_HIMETRIC& cx, OLE_YSIZE_HIMETRIC& cy)
const {
cx = cy = 0;
const_cast<CPicture*>(this)->m_hr = m_spIPicture->get_Width(&cx);
ASSERT(SUCCEEDED(m_hr));
const_cast<CPicture*>(this)->m_hr = m_spIPicture->get_Height(&cy);
ASSERT(SUCCEEDED(m_hr));
}

void Free() {
if (m_spIPicture) {
m_spIPicture.Release();
}
}

protected:
CComQIPtr<IPicture>m_spIPicture; // ATL smart pointer to IPicture
HRESULT m_hr; // last error code
};
[/code][/code]
Picture.cpp
<pre style="border:0px; font-family:inherit; outline:0px; padding:0px; color:#333333; font-size:12.666666984558105px; line-height:15.333333015441895px <code style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px ////////////////////////////////////////////////////////////////
// MSDN Magazine — October 2001
// If this code works, it was written by Paul DiLascia.
// If not, I dont know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000
// too.
// Set tabsize = 3 in your editor.
//
#include "StdAfx.h"
#include "Picture.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

////////////////////////////////////////////////////////////////
// CPicture implementation
//

CPicture::CPicture()
{
}

CPicture::~CPicture()
{
}

//////////////////
// Load from resource. Looks for "IMAGE" type.
//
BOOL CPicture::Load(UINT nIDRes)
{
// find resource in resource file
HINSTANCE hInst = AfxGetResourceHandle();
HRSRC hRsrc = ::FindResource(hInst,
MAKEINTRESOURCE(nIDRes),
"IMAGE"); // type
if (!hRsrc)
return FALSE;

// load resource into memory
DWORD len = SizeofResource(hInst, hRsrc);
BYTE* lpRsrc = (BYTE*)LoadResource(hInst, hRsrc);
if (!lpRsrc)
return FALSE;

// create memory file and load it
CMemFile file(lpRsrc, len);
BOOL bRet = Load(file);
FreeResource(hRsrc);
return bRet;
}

//////////////////
// Load from path name.
//
BOOL CPicture::Load(LPCTSTR pszPathName)
{
CFile file;
if (!file.Open(pszPathName, CFile::modeRead|CFile::shareDenyWrite))
return FALSE;
BOOL bRet = Load(file);
file.Close();
return bRet;
}

//////////////////
// Load from CFile
//
BOOL CPicture::Load(CFile& file)
{
CArchive ar(&file, CArchive::load | CArchive::bNoFlushOnDelete);
return Load(ar);
}

//////////////////
// Load from archive—create stream and load from stream.
//
BOOL CPicture::Load(CArchive& ar)
{
CArchiveStream arcstream(&ar);
return Load((IStream*)&arcstream);
}

//////////////////
// Load from stream (IStream). This is the one that really does it: call
// OleLoadPicture to do the work.
//
BOOL CPicture::Load(IStream* pstm)
{
Free();
HRESULT hr = OleLoadPicture(pstm, 0, FALSE,
IID_IPicture, (void**)&m_spIPicture);
ASSERT(SUCCEEDED(hr) && m_spIPicture);
return TRUE;
}

//////////////////
// Render to device context. Covert to HIMETRIC for IPicture.
//
BOOL CPicture::Render(CDC* pDC, CRect rc, LPCRECT prcMFBounds) const
{
ASSERT(pDC);

if (rc.IsRectNull()) {
CSize sz = GetImageSize(pDC);
rc.right = sz.cx;
rc.bottom = sz.cy;
}
long hmWidth,hmHeight; // HIMETRIC units
GetHIMETRICSize(hmWidth, hmHeight);
m_spIPicture->Render(*pDC, rc.left, rc.top, rc.Width(), rc.Height(),
0, hmHeight, hmWidth, -hmHeight, prcMFBounds);

return TRUE;
}

//////////////////
// Get image size in pixels. Converts from HIMETRIC to device coords.
//
CSize CPicture::GetImageSize(CDC* pDC) const
{
if (!m_spIPicture)
return CSize(0,0);

LONG hmWidth, hmHeight; // HIMETRIC units
m_spIPicture->get_Width(&hmWidth);
m_spIPicture->get_Height(&hmHeight);
CSize sz(hmWidth,hmHeight);
if (pDC==NULL) {
CWindowDC dc(NULL);
dc.HIMETRICtoDP(&sz); // convert to pixels
} else {
pDC->HIMETRICtoDP(&sz);
}
return sz;
}
[/code][/code]
<a name="x_x_fig4" style="border:0px; font-weight:inherit; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:#0066dd Figure 4 <span style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px CView <span style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px <br style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px
<br style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px
View.h
<pre style="border:0px; font-family:inherit; outline:0px; padding:0px; color:#333333; font-size:12.666666984558105px; line-height:15.333333015441895px <code style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px ////////////////////////////////////////////////////////////////
// MSDN Magazine — October 2001
// If this code works, it was written by Paul DiLascia.
// If not, I dont know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000
// too.
// Set tabsize = 3 in your editor.
//
#include "Doc.h"

/////////////////
// Picture view is a typical scroll view.
//
class CPictureView : public CScrollView {
public:
virtual ~CPictureView();
CPictureDoc* GetDocument() { return (CPictureDoc*)m_pDocument; }

protected:
BOOL m_rcImage; // rect to display image in
UINT m_iHowScale; // how to scale image

CPictureView();
void GetImageRect(CRect& rc);
void SetScrollSizes();

virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnInitialUpdate(); // called first time after construct

// command/message handlers
afx_msg void OnViewScale(UINT nID);
afx_msg void OnUpdateViewScale(CCmdUI* pCmdUI);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnSize(UINT nType, int cx, int cy);

DECLARE_DYNCREATE(CPictureView)
DECLARE_MESSAGE_MAP()
};
[/code][/code]
View.cpp
<pre style="border:0px; font-family:inherit; outline:0px; padding:0px; color:#333333; font-size:12.666666984558105px; line-height:15.333333015441895px <code style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px ////////////////////////////////////////////////////////////////
// MSDN Magazine — October 2001
// If this code works, it was written by Paul DiLascia.
// If not, I dont know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000
// too.
// Set tabsize = 3 in your editor.
//
#include "StdAfx.h"
#include "View.h"
#include "resource.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

////////////////////////////////////////////////////////////////
// CPictureView
//
IMPLEMENT_DYNCREATE(CPictureView, CScrollView)

BEGIN_MESSAGE_MAP(CPictureView, CScrollView)
ON_WM_ERASEBKGND()
ON_WM_SIZE()
ON_COMMAND_RANGE(ID_VIEW_TOFIT, ID_VIEW100, OnViewScale)
ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_TOFIT, ID_VIEW100, OnUpdateViewScale)
END_MESSAGE_MAP()

CPictureView::CPictureView()
{
m_iHowScale = ID_VIEW_TOFIT;
}

CPictureView::~CPictureView()
{
}

void CPictureView::OnInitialUpdate()
{
SetScrollSizes();
}

//////////////////
// Set scroll sizes based on picture. Page size = client hieight/width;
// line size = 1/10 of this.
//
void CPictureView::SetScrollSizes()
{
CRect rcClient;
GetClientRect(&rcClient);

CRect rcImage;
GetImageRect(rcImage);

CSize szTotal = rcImage.Size();
CSize szPage = rcClient.Size();

CSize szLine = szPage;
szLine.cx /= 10;
szLine.cy /= 10;

CScrollView::SetScrollSizes(MM_TEXT, szTotal, szPage, szLine);
Invalidate();
}

//////////////////
// View was sized: readjust scroll sizes if Im in "zoom to fit" mode
//
void CPictureView::OnSize(UINT nType, int cx, int cy)
{
CScrollView::OnSize(nType, cx, cy);
if (m_iHowScale==ID_VIEW_TOFIT) {
SetScrollSizes();
}
}

//////////////////
// Erase the background. This is required in case the image is smaller than
// the client area, to paint the extra background. Use clipping to avoid
// flicker.
//
BOOL CPictureView::OnEraseBkgnd(CDC* pDC)
{
CPictureDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);

// get client rectangle
CRect rcClient;
GetClientRect(&rcClient);
CRect rc = rcClient;

// get image rectangle
CRect rcImage;
GetImageRect(rcImage);
rc = rcImage;

CPoint pt = pDC->GetViewportOrg();
CSize sz = GetTotalSize();

// create clipping region
CRgn clipRgn;
clipRgn.CreateRectRgnIndirect(&rcClient);
pDC->SelectClipRgn(&clipRgn);
pDC->ExcludeClipRect(&rcImage);

CBrush brush(RGB(0,0,0)); // black
pDC->FillRect(&rcClient, &brush);

pDC->SelectClipRgn(NULL);

return TRUE;
}

//////////////////
// Draw the picture — call CPicture to do it.
//
void CPictureView::OnDraw(CDC* pDC)
{
CPictureDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CPicture* ppic = pDoc->GetPicture();
ASSERT(ppic);
if (*ppic) {
CRect rc;
GetImageRect(rc);
ppic->Render(pDC,rc);
}
}

//////////////////
// Get image rectangle, scaled for current zoom factor.
//
void CPictureView::GetImageRect(CRect& rc)
{
CPictureDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CPicture* ppic = pDoc->GetPicture();
ASSERT(ppic);

if (!ppic || !*ppic) {
rc.SetRect(0,0,0,0);
} else if (m_iHowScale==ID_VIEW_TOFIT) {
GetClientRect(&rc);
} else {
CSize sz = ppic->GetImageSize();
switch (m_iHowScale) {
case ID_VIEW25:
sz.cx >>= 2;
sz.cy >>= 2;
break;
case ID_VIEW33:
sz.cx /= 3;
sz.cy /= 3;
break;
case ID_VIEW50:
sz.cx >>= 1;
sz.cy >>= 1;
break;
case ID_VIEW75:
sz.cx = (sz.cx * 3)/4;
sz.cy = (sz.cy * 3)/4;
break;
}
rc.SetRect(0,0,sz.cx,sz.cy);
}
}

//////////////////
// Handle zoom command.
//
void CPictureView::OnViewScale(UINT nID)
{
if (m_iHowScale != nID) {
m_iHowScale = nID;
ScrollToPosition(CPoint(0,0));
OnInitialUpdate();
}
}

//////////////////
// Update zoom menu — check whichever zoom factor Im at now.
//
void CPictureView::OnUpdateViewScale(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(pCmdUI->m_nID == m_iHowScale);
}
[/code][/code]
<a name="x_x_fig6" style="border:0px; font-weight:inherit; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px; color:#0066dd Figure 6 <span style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px CPictureCtrl <span style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px <br style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px
<br style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:12.666666984558105px; line-height:15.333333015441895px
PictCtrl.h
<pre style="border:0px; font-family:inherit; outline:0px; padding:0px; color:#333333; font-size:12.666666984558105px; line-height:15.333333015441895px <code style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px ////////////////////////////////////////////////////////////////
// MSDN Magazine — October 2001
// If this code works, it was written by Paul DiLascia.
// If not, I dont know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000
// too.
// Set tabsize = 3 in your editor.
//
#include "picture.h"
#include "StatLink.h"
#pragma once

//////////////////
// Class to encapsulate IPicture. This does not wrap all IPicture methods,
// only the ones I needed to implement ImgView — feel free to add the
// others yourself.
//
class CPictureCtrl : public CStaticLink {
public:
CPictureCtrl(BOOL bAutoLoadImage=TRUE);
~CPictureCtrl();

// brainless wrappers call CPicture
BOOL LoadImage(UINT nIDRes) {
Invalidate();
return m_pict.Load(nIDRes);
}
BOOL LoadImage(LPCTSTR pszPathName) {
Invalidate();
return m_pict.Load(pszPathName);
}
BOOL LoadImage(CArchive& ar) {
Invalidate();
return m_pict.Load(ar);
}
BOOL LoadImage(IStream* pstm) {
Invalidate();
return m_pict.Load(pstm);
}

CSize GetImageSize() {
return m_pict.GetImageSize();
}

const CPicture* GetPicture() {
return &m_pict;
}

protected:
CPicture m_pict; // picture
BOOL m_bAutoLoadImage; // automatically load image w/same Ctrl ID

virtual void PreSubclassWindow();

// message handlers
afx_msg void OnPaint();
afx_msg int OnCreate(LPCREATESTRUCT lpcs);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);

DECLARE_DYNAMIC(CPictureCtrl)
DECLARE_MESSAGE_MAP()
};
[/code][/code]
PictCtrl.cpp
<pre style="border:0px; font-family:inherit; outline:0px; padding:0px; color:#333333; font-size:12.666666984558105px; line-height:15.333333015441895px <code style="border:0px; font-style:inherit; font-family:inherit; margin:0px; outline:0px; padding:0px ////////////////////////////////////////////////////////////////
// MSDN Magazine — October 2001
// If this code works, it was written by Paul DiLascia.
// If not, I dont know who wrote it.
// Compiles with Visual C++ 6.0 for Windows 98 and probably Windows 2000
// too.
// Set tabsize = 3 in your editor.
//
#include "StdAfx.h"
#include "PictCtrl.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

////////////////////////////////////////////////////////////////
// CPictureCtrl is like a static bitmap, but displays any kind of
// image — BMP, JPG, or GIF.
//
IMPLEMENT_DYNAMIC(CPictureCtrl, CStaticLink)
BEGIN_MESSAGE_MAP(CPictureCtrl, CStaticLink)
ON_WM_CREATE()
ON_WM_PAINT()
ON_WM_ERASEBKGND()
END_MESSAGE_MAP()

CPictureCtrl::CPictureCtrl(BOOL bAutoLoadImage)
: m_bAutoLoadImage(bAutoLoadImage)
{
}

CPictureCtrl::~CPictureCtrl()
{
}

//////////////////
// Created: load picture with same ID as me, if there is one. In theory,
// this should not be required because PreSubclassWindow is called whether
// the control is created directly or subclassed from a dialog—but for some
// odd reason unbeknownst to me, GetDlgCtrlID always returns 0 in OnCreate.
// Go figure.
//
int CPictureCtrl::OnCreate(LPCREATESTRUCT lpcs)
{
if (CStaticLink::OnCreate(lpcs)!=0)
return -1;
int nID = GetDlgCtrlID();
if (m_bAutoLoadImage && nID > 0 && !m_pict) {
LoadImage(nID);
}
return 0;
}

//////////////////
// Subclassed: load picture with same ID as me, if there is one.
//
void CPictureCtrl::PreSubclassWindow()
{
int nID = GetDlgCtrlID();
if (m_bAutoLoadImage && nID > 0 && !m_pict) {
LoadImage(nID);
}
CString s;
SetNoLink(!s.LoadString(GetDlgCtrlID()));
}

//////////////////
// Paint the picture — override static stuff and do my own thing.
// Call CPicture to do the work.
//
void CPictureCtrl::OnPaint()
{
CPaintDC dc(this);
if (m_pict) {
CRect rcClient;
GetClientRect(&rcClient);
CRect rcImage(CPoint(0,0),m_pict.GetImageSize());
CRect rc;
rc.IntersectRect(&rcImage, &rcClient);
m_pict.Render(&dc, rc);
}
}

//////////////////
// If picture is smaller than client area, paint extra with background
// color.
//
BOOL CPictureCtrl::OnEraseBkgnd(CDC* pDC)
{
// get client rectangle
CRect rcClient;
GetClientRect(&rcClient);
CRect rc = rcClient;

// get image rectangle
CRect rcImage(CPoint(0,0), m_pict.GetImageSize());

// create clipping region
CRgn clipRgn;
clipRgn.CreateRectRgnIndirect(&rcClient);
pDC->SelectClipRgn(&clipRgn);
pDC->ExcludeClipRect(&rcImage);

CBrush *pBrush =
CBrush::FromHandle((HBRUSH)GetWindowLong(m_hWnd, GCL_HBRBACKGROUND));
pDC->FillRect(&rcClient, pBrush);
pDC->SelectClipRgn(NULL);

return TRUE;
}[/code][/code]

but many errors made
here are errors
Error<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
error C1083: Cannot open include file: Doc.h: No such file or directory<span class="x_x_Apple-tab-span" style="white-space:pre
c:userszuchidocumentsvisual studio 2012projectsmfcapplication6mfcapplication6view.h<span class="x_x_Apple-tab-span" style="white-space:pre
1<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
Error<span class="x_x_Apple-tab-span" style="white-space:pre 2<span class="x_x_Apple-tab-span" style="white-space:pre
error C2664: FindResourceW : cannot convert parameter 3 from const char [6] to LPCWSTR<span class="x_x_Apple-tab-span" style="white-space:pre
c:userszuchidocumentsvisual studio 2012projectsmfcapplication6mfcapplication6picture.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
31<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 4<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: cannot open source file "StatLink.h"<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.h<span class="x_x_Apple-tab-span" style="white-space:pre
2<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 5<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: not a class or struct name<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.h<span class="x_x_Apple-tab-span" style="white-space:pre
10<span class="x_x_Apple-tab-span" style="white-space:pre 29<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
Error<span class="x_x_Apple-tab-span" style="white-space:pre 3<span class="x_x_Apple-tab-span" style="white-space:pre
error C1083: Cannot open include file: StatLink.h: No such file or directory<span class="x_x_Apple-tab-span" style="white-space:pre
c:userszuchidocumentsvisual studio 2012projectsmfcapplication6mfcapplication6pictctrl.h<span class="x_x_Apple-tab-span" style="white-space:pre
2<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 6<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: name followed by :: must be a class or namespace name<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
14<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 7<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: identifier "CStaticLink" is undefined<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
15<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 8<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: invalid type conversion<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
16<span class="x_x_Apple-tab-span" style="white-space:pre 4<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 9<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: invalid type conversion<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
17<span class="x_x_Apple-tab-span" style="white-space:pre 4<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 10<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: invalid type conversion<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
18<span class="x_x_Apple-tab-span" style="white-space:pre 4<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 11<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: name followed by :: must be a class or namespace name<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
19<span class="x_x_Apple-tab-span" style="white-space:pre 1<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 12<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: name followed by :: must be a class or namespace name<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
39<span class="x_x_Apple-tab-span" style="white-space:pre 8<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 13<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: too few arguments in function call<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
41<span class="x_x_Apple-tab-span" style="white-space:pre 27<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 14<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: too few arguments in function call<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
53<span class="x_x_Apple-tab-span" style="white-space:pre 27<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 15<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: identifier "SetNoLink" is undefined<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
58<span class="x_x_Apple-tab-span" style="white-space:pre 4<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 16<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: too few arguments in function call<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
58<span class="x_x_Apple-tab-span" style="white-space:pre 41<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 17<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: no instance of constructor "CPaintDC::CPaintDC" matches the argument list<br/>
argument types are: (CPictureCtrl *)<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
67<span class="x_x_Apple-tab-span" style="white-space:pre 16<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 18<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: argument of type "CRect *" is incompatible with parameter of type "HWND"<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
70<span class="x_x_Apple-tab-span" style="white-space:pre 21<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 19<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: too few arguments in function call<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
70<span class="x_x_Apple-tab-span" style="white-space:pre 30<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 20<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: argument of type "CRect *" is incompatible with parameter of type "HWND"<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
86<span class="x_x_Apple-tab-span" style="white-space:pre 18<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 21<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: too few arguments in function call<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
86<span class="x_x_Apple-tab-span" style="white-space:pre 27<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
<span class="x_x_Apple-tab-span" style="white-space:pre 22<span class="x_x_Apple-tab-span" style="white-space:pre
IntelliSense: identifier "m_hWnd" is undefined<span class="x_x_Apple-tab-span" style="white-space:pre
c:UsersZuchiDocumentsVisual Studio 2012ProjectsMFCApplication6MFCApplication6PictCtrl.cpp<span class="x_x_Apple-tab-span" style="white-space:pre
99<span class="x_x_Apple-tab-span" style="white-space:pre 48<span class="x_x_Apple-tab-span" style="white-space:pre
MFCApplication6<br/>
what i need to do help me please


View the full article
 

Similar threads

A
Replies
0
Views
162
ANIL AYDINALP
A
D
Replies
0
Views
104
Donald Uko
D
D
Replies
0
Views
153
Drew1903
D
K
Replies
0
Views
224
Khan345
K
Back
Top