|
Thanx,I'll try it and reply soon.
bye
swapna_signsin
|
|
|
|
|
I have
CDialog::PostNcDestroy();
m_pParentWnd->SendMessage(UDM_LISTCLOSED,0,0);
delete this;
and in the .h file
public:
virtual BOOL OnInitDialog();
protected:
virtual void DoDataExchange(CDataExchange* pDX);
virtual void PostNcDestroy();
The dialog was created by:
if(!m_tgtInfo)
{
m_tgtInfo = new CTargetInfo(this, caseStudy);
if(!m_tgtInfo) return true;
m_tgtInfo->Create(IDD_DLGTGTINFO, (CWnd*)this);
m_tgtInfo->ShowWindow(SW_SHOW);
}
When I close this modeless dialog, execution does not enter the PostNcDestroy function. However if I close the whole app, then the code does go into this function. What am I missing? I looked at sample code and there does not seem to be anything else I need to do...
thanks,
sb
-- modified at 9:00 Monday 3rd April, 2006
|
|
|
|
|
ns wrote: CDialog::PostNcDestroy();
delete this;
Switch these two statements.
ns wrote: When I close this modeless dialog, execution does not enter the PostNcDestroy function.
Have you called m_tgtInfo->DestroyWindow() ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
When am I supposed to call m_tgtInfo->destroyWindow()? The user closes m_tgtInfo at which point I was trying to send a message to the parent (which instantiated m_tgtInfo)
thanks for helping,
sb
|
|
|
|
|
ns wrote: When am I supposed to call m_tgtInfo->destroyWindow()?
When you want to dismiss the modeless dialog.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
A miscommunication, I think.
The user closes the m_tgtInfo dialog using the system menu at the upper right corner (the cross). I don't dismiss it with code. Am I still missing your point? When the cross is clicked, I thought the postNcDestroy() function would run, but it doesn't. Thanks for your patience.
sb
|
|
|
|
|
Do you have the following:
void CTargetInfo::OnOK()
{
DestroyWindow();
}
void CTargetInfo::OnCancel()
{
DestroyWindow();
}
void CTargetInfo::OnClose()
{
DestroyWindow();
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
No, I didn't have that. I put it in, and everything works as expected now. Many thanks for spelling it out
|
|
|
|
|
Dear Members
Hello,
I have a problem.I have assigned to make such a calculator which has 4 modes
1.Binary
2.Decimal
3.Hexadecimal
4.Octal
In these four modes I want to make arithmetic calculations(Addition and Subtraction).But I haven't the proper source codes of this C++ programe.Plz if anyone has tht type of source codes then inform me as soon as possible.
Best Regard
|
|
|
|
|
And when you will find a job and that you will be asked to do something, will you also ask people to do the job for you ?
Start working on your homework, and when you get stuck, come back here and post SPECIFIC questions.
|
|
|
|
|
|
Hi 0300
This is not the proper way to ask. We all are here to help each other.
As Cedric said whenever you stuck to any problem and don't find the solution you can post your queries. No one here is going to provide the full source code.
So first start yourself .
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Hi 0300
for another modes
you should fisrt start to write your program and then asked a question
or if you have a problem.
(Cedric Moonen and Ganesh_T and another friends are good programers )
|
|
|
|
|
You Start it v help u PROCEED;)
|
|
|
|
|
Hey 0300,
if you are new to this forum its ok
from now try to avoid such words so that some one hurts
we are here for helping each other not dedicated for providing source, we can help you to give suggestions.
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
can anybody tell me how can i load & read the XML File.I'm stuck on this point please give me solution.
i have alrady wastage last two days & still there.
for ur information i can tell u that i have made a MFC Application using wizard.
and want to print the vital information of XML File on the Active Document.
Aavesh
|
|
|
|
|
aavesh wrote: i have alrady wastage last two days & still there.
Have you looked at DOMDocument or IXMLDocument ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
i saw it and i'm able to open the file successfully but the problem is to print the XML Data on the Active document.
how could i achieve this.
Aavesh
|
|
|
|
|
|
after openning a file one of my friend told me that use the following steps:
1) declare an _bstr_t variable say bstr in your CDocument
2) then, bstr = m_pIDomDoc->xml;
3) then, in the OnDraw method, write
CYourDocument* pDocument = (CYourDocument*)GetDocument();
CString xml (pDocument->bstr);
pDc->DrawText(xml, 0,0 );
first step is ok.
but what abt second step.where i have to write this line & what is xml.
Please tell me.
|
|
|
|
|
|
Hello Aavesh
hey u r still there
the code which i gave u is working man.
just 2 weeks before I was doing same task.
|
|
|
|
|
hi dude...
i have open the file successfully.but what abt ur second function.
i'm not getting how to use it.what will be the Parameters will be passed at the calling.becoz i have to print the XML information on the Active Document what will be the steps.
please dude help me.
now i'm feeling relax that u r with me.i hope i will do it today.
Reply ASAP
Aavesh
Aavesh
|
|
|
|
|
Thank god ur file got opened (& I hope by using my method)
after opening the file u just need to pass the tag name
as u know xml file contains user defined tags
ex: if in ur xml file there is a tag as
<aavesh>Iam a programmer</aavesh>
what u want is to print "iam a programmer" into a cntrl (I hope iam right)
if yes then call 2nd method as
GetProperty (or is it GetElement)
ok
GetProperty(_T("aavesh"), bstr);
declare bstr as
CComBSTR bstr;
u'll get bstr = "iam a programmer"
then convert bstr to CString as
USES_CONVERSION;
CString strTemp = W2A(bstr);
now u can assign the strTemp value to ur ctrl using appropriate method.
ok
|
|
|
|
|
hi dude,
thanx i haven't tried it but it seems to me that now it should be done.
dude what is ur name i think u r indian.
its not necessary to tell ur name but its my feeling so i shared with u.
Let me implement it.
if it will work then surely i will tell to u.
moreover,i have to print the data in the Active Document.
if i'll face any new problem then i will knock ur gate.
byeeeeee
Aavesh
|
|
|
|