Board index » Visual Studio » Got problem with CView::Create

Got problem with CView::Create

Visual Studio376
I had a class. It works so good on my many demo applications. But when I add

that class into other application, it doesn't work. It got error at line:

if(!CView::Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectClient, pWnd,

NULL, NULL))

return FALSE;

(Error message: Unhandled exception 0xC0000005: Access Violation)

Somebody help me please! Thanks for reading! Have a nice day!


-
 

Re:Got problem with CView::Create

Well, that access fault happens on a specific line of code. Note that you cannot use the

syntax below because CView::Create is not a static method, so I have no idea what this is

doing because you have shown no context. You would have to allocate a CView object and

call object->Create to get a view created.

joe



On Tue, 8 Jan 2008 13:45:56 +0700, "Phuc Dam" <tidolili@yahoo.com>wrote:



Quote
I had a class. It works so good on my many demo applications. But when I add

that class into other application, it doesn't work. It got error at line:

if(!CView::Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectClient, pWnd,

NULL, NULL))

return FALSE;

(Error message: Unhandled exception 0xC0000005: Access Violation)

Somebody help me please! Thanks for reading! Have a nice day!



Joseph M. Newcomer [MVP]

email: newcomer@flounder.com

Web: www.flounder.com">www.flounder.com

MVP Tips: www.flounder.com/mvp_tips.htm">www.flounder.com/mvp_tips.htm

-

Re:Got problem with CView::Create

can you step into this function during debugging?



--

Sheng Jiang

Microsoft MVP in VC++

"Phuc Dam" <tidolili@yahoo.com>wrote in message

Quote
I had a class. It works so good on my many demo applications. But when I

add

that class into other application, it doesn't work. It got error at line:

if(!CView::Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rectClient, pWnd,

NULL, NULL))

return FALSE;

(Error message: Unhandled exception 0xC0000005: Access Violation)

Somebody help me please! Thanks for reading! Have a nice day!









-