Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Can someone please help!!.

Situation 1:
I have created an application based on PropertySheet and using Propertypage.
I am getting an access violation in the debug mode.
From the PropertySheet I have sucessfully been able to send a message to the PropertyPage using "QuerySibling" and using "PSM_QUERYSIBLINGS " I can receive the message on the page. The only drawback I can't and have not been able to resolve the "an access violation" short of that everythig else works.

Situation 2:
I have created the same application instead of using PropertySheet, I have used a dialog with a tab control. I don't get any "access violation". However I have not been able to send and receive messages to the page. using the same "QuerySibling" from the sending page and "PSM_QUERYSIBLINGS ".

For situation 1: Should I take the "Access Vilolation" ligthly considering, I get the message in debug with just bare minimum code. When I say minimum I literaly mean just the code for the ProperySheet and the PropertyPage. No other functuanality.

For Situation 2: How do I send a message to the PropertyPage from a Dialog that has a TabControl.
Any help or a little explanation whould be greatly appreciated.
Posted

I suspect you hit a well-known problem with property sheet.

When you call CPropertySheet::DoModal() or CPropertySheet::Create(), an exception might occur. The Output window displays the following message:
First-chance exception in <program.exe> (Comctl32.dll): 0xC0000005: Access Violation. The exception is expected and is handled by the operating system. This will only occur the first time you call either of these methods and subsequent calls will not generate this first-chance exception.

More from Microsoft:
http://support.microsoft.com/kb/q158552/[^]
 
Share this answer
 
Comments
FISH786 21-Jun-12 6:40am    
Thank you so much.
Each child could know its parent,
just extend the child's constructor by the parent's pointer
then accumulate the parent's pointer in a child's member.

Now it is possible to call any parent's public method by the children directly,
without any message :)
 
Share this answer
 
Comments
FISH786 21-Jun-12 6:40am    
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900