CPropertySheet::Create( ) access violation? 
Author Message
 CPropertySheet::Create( ) access violation?

Hi,
I am having a strange problem,
First of all I am using VC6++ sp4 on WIN ME

When I run my program , (debug or release ), the once everything works
great.
The second time I get an access violation 0x000005.

the line causing is,
CPropertySheet::Create( pParentWnd, dwStyle, dwExStyle );
The exact line causing the violation in the Create function is
...
 HWND hWnd = (HWND)PropertySheet((PROPSHEETHEADER*)psh);
...(line 921 in Dlgprop.cpp).

I cannot understand why it works once but not the second time.
The style I use makes no difference it is
 m_WizPropSheet.Create( this, WS_CHILD   | WS_VISIBLE,  0 );
and I call it in my InitInstance() of the main app.

Any ideas?

Many thanks
Florent Guelfucci



Sun, 05 Oct 2003 15:03:38 GMT  
 CPropertySheet::Create( ) access violation?

Quote:
>First of all I am using VC6++ sp4 on WIN ME

>When I run my program , (debug or release ), the once everything works
>great.
>The second time I get an access violation 0x000005.

>the line causing is,
>CPropertySheet::Create( pParentWnd, dwStyle, dwExStyle );

Florent,

Have a look at Knowledge Base article Q158552 "PRB:
CPropertySheet::DoModal() or Create() Causes an Exception".

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sun, 05 Oct 2003 19:49:50 GMT  
 CPropertySheet::Create( ) access violation?
Thanks,

It fixed the problem, (the problem they refer to in the article is similar
to a new problem is WIN ME).

Florent Guelfucci

Quote:
> >First of all I am using VC6++ sp4 on WIN ME

> >When I run my program , (debug or release ), the once everything works
> >great.
> >The second time I get an access violation 0x000005.

> >the line causing is,
> >CPropertySheet::Create( pParentWnd, dwStyle, dwExStyle );

> Florent,

> Have a look at Knowledge Base article Q158552 "PRB:
> CPropertySheet::DoModal() or Create() Causes an Exception".

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Mon, 06 Oct 2003 02:42:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. CPropertySheet::Create( ) access violation?

2. CPropertySheet::Create( ) access violation?

3. BUG? CPropertySheet.DoModal() Causes Access Violation

4. access violation creating singleton instance

5. Access Violation when creating a dialog in a C++ console app

6. Access violation on CSocket.Create ??

7. Strange Access Violations in MFC created OCX Control

8. access violation when creating ifstream....

9. "Access violation" accessing a DLL

10. URGENT: Access Violation when accessing the POOM IAppointment

11. Access Keys In CPropertySheet

12. How to access a member variable of CPropertyPage from CpropertySheet

 

 
Powered by phpBB® Forum Software