Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I used PieChart class and this is my code:

CRect rect1;
rect1.left = 250;
rect1.top = 10;
rect1.bottom = 530;
rect1.right = 1250;
m_pieChart.Create(L"", rect1, this, 1);


with this code if I use AfxMessageBox , the box of AfxMessageBox is hidden, but if I remove
m_pieChart.Create(L"", rect1, this, 1);


I can see box of AfxMessageBox

What I have tried:

I tried to remove

<pre>
	m_pieChart.Create(L"", rect1, this, 1);	
Posted
Updated 6-Dec-21 13:39pm
Comments
Dave Kreskowiak 6-Dec-21 12:34pm    
One has nothing to do with the other. The only "relationship" there is between the two is whatever your code is doing to impose it.

Perhaps this can help to find an answer.

AfxMessageBox appears behind MFC dialog
https://stackoverflow.com/questions/9263269/afxmessagebox-appears-behind-mfc-dialog[^]
 
Share this answer
 
Comments
Member 14594285 7-Dec-21 2:53am    
thanks I solved
This is the same issue as Afxmessagebox doesn't work[^]. But you are not showing the complete code. Where is the call to AfxMessageBox relative to your pie chart code?
 
Share this answer
 
Comments
Member 14594285 6-Dec-21 12:26pm    

void CCReadQueryDlg::OnBnClickedButton3()
{
AfxMessageBox(L"dsfds", MB_OK);	
}
<pre>

I have a button on the dialog and if I press box of AfxMessageBox is hidden
Richard MacCutchan 6-Dec-21 12:33pm    
Most likely because it gets hidden behind the dialog. You should not be using it in a dialog.

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