|
Chandrasekharanp wrote: i am getting an exception.
Did you try to debug your program to pinpoint where the problem occurs exactly ? Use the callstack to locate the problem in your code when the crash occurs.
Without having more information, we can't really help you. We need some relevant piece of code (don't paste the complete source files ). If you can't fix the problem using your debugger, provide also the info you gathered with it.
|
|
|
|
|
i had added DoModal() which i should not have done.. now i am not getting that exception. but the value is not being updated on dialog2. but when i debug in the watch list the value is updating.
|
|
|
|
|
Please read my previous answer and provide the required information. I'm still not able to read what's written on your screen (although I'm trying hard, it's probably because of the distance...)
|
|
|
|
|
Hey man, you're a CP 's MVP : charge your CPMRU 's (Code Project Mind Reader Unit) battery pack and start helping that guy!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
It seems broken, I probably tried to use it too much recently
|
|
|
|
|
Looks like these days we need to boot up the CPMRU for answering almost 90% of the posts.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Unfortunately soooo true
|
|
|
|
|
And:
(1) "First Google about" (8%)
(2) "Please don't use CString::GetBuffer for such things" (1.5%)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Tough being a man.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
We live in hard times.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
are you calling updatedata() to reflect the changes on dialog box.
|
|
|
|
|
When you are opening modeless dialog?
You add same type of variable to modeless dialog class, before creating it assign first dialog value to modeless dialog variable, after creating it, show the value.
Chandrasekharanp wrote: in the second dialog box i have an edit control which is of type CString.
Hi Edit controls are of type CEdit. Did you mean you have control variable for edit control?
Thanks,
Suman
|
|
|
|
|
Hi,
I am using the MFC doc/view framework to do the printing in my application but it isnt clear what I need to do to print multiple copies (as entered by the user in the print dialog). I can retrieve the number of copies but where do I use it? I figured that Windows print manager or the framework would do all the work involved but it doesnt seem to work so maybe I need to do something.
Any ideas?
Tony
|
|
|
|
|
I'm a little surprised that the basic MFC framework doesn't handle that for you.
But printing is harder than it looks! MFC glosses over some details, but the moment you deviate a little, you're on your own.
I strongly recommend Roger Allen[^]'s articles for reading. Many of them are involving printing, and all are good.
I vaguely remember him buying me a pint once...
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Hello All
i need a DirectX tutorial using MFC.
|
|
|
|
|
You should know there's a wonderful thing called CP article search engine [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
How to cast a float expression into int safely without data loss?
Is there any standard function for this other than just casting like(int) ?
Best Regards,
Suman
|
|
|
|
|
rp_suman wrote: How to cast a float expression into int safely without data loss?
Are you kidding ?
You can't do that because an integer, well, only stores integer values. So you'll loose all the number after the floating point.
Or maybe you need to explain a bit more in details what you are trying to achieve.
|
|
|
|
|
For example the code:
<br />
float f;<br />
f = some_value;<br />
int i = f * 10;<br />
For the above case, say for example if "f" is 0.1, i should become 1.
As the float is actually working in exponential form, will it work without problem or any chance for loss of data, like the above calculation result in zero or else?
Thanks,
Suman
modified on Wednesday, March 19, 2008 10:50 AM
|
|
|
|
|
rp_suman wrote: How to cast a float expression into int safely without data loss?
That cannot be done.
rp_suman wrote: Is there any standard function for this other than just casting like(int)?
Nope.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
rp_suman wrote: How to cast a float expression into int safely without data loss?
float f;
f = whatever;
int i = *(int *)&f;
Of course it is only a technical exercise and probably not what you're searching for.
BTW you should know that real numbers cannot mapped to countable (i.e. integers) ones, someone proved that [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
to insert a space in a string,when it is reversed.
|
|
|
|
|
Insert a space into what? Can you be precise? Why can't you give an example, with input and desired output?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
What does being reversed have to do with a space being inserted? From the STL, use the string::insert() method, and the reverse() function.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
how are you reversing the string!?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|