본문 바로가기

mfc11

[MFC, C++] error C2011: "struct' type redefinition에러를 고치다... 데브피아에 질문글 올렸다... 답변 기다리는중... http://www.devpia.com/MAEUL/Contents/Detail.aspx?BoardID=1&MAEULNO=3&no=1479&ref=1479&page=1 내가 올린 질문글 안녕하세요. 에러가 있던걸 고치긴 했는데 왜 고쳐졌는지 몰라서 질문올립니다... -_-;; 일단 아래와 같은 구조체를 Image.h에 정의하였구요. struct ImageInfo {int nW, nH;int nPosX, nPosY; BYTE *Image1D;};이 구조체를 쓰는 도큐멘트에는 아래와 같이 인클루드 했습니다. #include "Image.h" 그런데 error C2011: "struct' type redefinition" error가 나는 것입니다. 정의를 2.. 2012. 10. 24.
[MFC]error C2065: 'm_hWnd' : undeclared identifier 해결 ㅠ_ㅠ error C2065: 'm_hWnd' : undeclared identifier 위와같은 에러가 나오면 m_hWnd멤버를 사용하는 클래스에 "CWnd m_hWnd;" 2012. 10. 22.
[MFC,윈도우 프로그래밍] 핸들 얻기 (HWND hWnd) 예제있는 코드를 복사하려고하는데 에러가난다...m_hWnd가 없다고 에러난다.bi.hwndOwner= m_hWnd; //예제코드 Go To definition을 누르면 아래와 같은소스가 있다 파일은 afxwin.hclass CWnd : public CCmdTarget{DECLARE_DYNCREATE(CWnd)protected:static const MSG* PASCAL GetCurrentMessage(); // Attributespublic:HWND m_hWnd; // must be first data member 왜 저렇게 했는지 모르겠다 그래서 밑에와 같은 소스로 변경 CWnd *pWnd = AfxGetMainWnd(); HWND hWnd = pWnd->m_hWnd; bi.hwndOwner = hWn.. 2012. 10. 19.
AssertValid()에 대해.. AssertValid()에 대해 잘나와있다. http://artwook.tistory.com/entry/ASSERTVALID-AssertValid-Dump MSDN형님http://msdn.microsoft.com/en-us/library/t2za4dew(v=vs.100).aspx The definition of "validity" depends on the object's class. As a rule, the function should perform a "shallow check." That is, if an object contains pointers to other objects, it should check to see whether the pointers are not null, but it .. 2012. 10. 19.
반응형