|
(EDIT: Corrections)
1.#INF stands for positive infinity.
1.#IND stands for positive ideterminite.
If you add a negative, then they are negative infinity.
This can happen if a variable has yet to be initialized. It can also happen during ASCII to float conversions and math operations.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
So can I use that value just like other values in my code, for example in an if statement, could I say:
if(x==1.#INF)
{
//do stuff
}
or when I say
if(x>=9000)
{
//do stuff
}
will the infinite value be regarded as greater than 9000?
|
|
|
|
|
You can use _finite to test to see if a value is finite. Thus your NAN, QNAN, INF, IND should return false. (???)
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
1.#INF means positive infinity - usually you get it when you divide by zero. 1.#IND represents so-called 'quiet-nan' - for example, when you take the logarithm of negative value.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
So can I use that value just like other values in my code, for example in an if statement, could I say:
if(x==1.#INF)
{
//do stuff
}
or when I say
if(x>=9000)
{
//do stuff
}
will the infinite value be regarded as greater than 9000?
|
|
|
|
|
Don't - instead figure out what is setting the bad values.
Those numbers indicate that you are doing something wrong. If the variables are uninitialized there is no guarantee that they will always be the same. If you are dividing by 0 or taking the log of a negative number you should be checking your inputs because they are faulty.
Dave Huff
There are no small projects - only young ones.
|
|
|
|
|
1.INF/-1.INF = Positive/Negative infinity
1.IND/-1.IND = Positive/Negative indeterminate
1.QNAN/-1.QNAN = Positive/Negative quiet not-a-number
1.NAN/-1.NAN = Positive/Negative not-a-number
IEEE Reference information
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi,
Can someone tell me ,
How to show and handle CFormView in
an ActiveX Control.
Thanks,
Sansky
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
FormView wasn't really designed for placing in an activex control. What are you try to achieve as there may be a better way.
I'm guessing you are wanting an activex control made up on a number of other controls? Have a search on MSDN for composite controls.
Michael
|
|
|
|
|
Hi,
Actually trying to develop an ActiveX , where I can
show other some ActiveX's , which also needs to be dragged.
So I believe that I need CFormView for this.
According to the art Q155973, this is possible , but I am
unable to find the sample DLGX.EXE at microsoft.com,
any suggestions .
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
If you do not intend to take advantage of SDI/MDI architecture, it's much easier to embed a CDialog -based object, just by specifying the ActiveX window as the parent when creating the dialog. Some CRect arithmetic could be needed too in the process of embedding. If you follow this approach, you can even get scroll bars without much effort.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi,
1.how to find weather the item clicked is a root or leaf in a tree.
2.should the menu resource be initialised or something before loading it to diaplay popup menu because I get run time error saying the handle is null. I use the same procedure said all over this site.
help
|
|
|
|
|
Regarding (1):
Handle WM_LBUTTONDOWN. Use CTreeCtrl::HitTest to get HTREEITEM. CTreeCtrl::GetRootItem returns root, so simple comparison of HTREEITEMS will answer your question. If you need to check if item is leaf, call CTreeCtrl::GetChildItem and pass clicked HTREEITEM - if it returns NULL, your item is a leaf.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi,
I have a dialog-based MFC application. In response to a button
click on the dialog I need another dialog to popup. So far so good.
I also need the text in an edit field in Dialog_1 to appear in an
edit field in Dialog_2.
In short, I need parameters to be passed from one window to another.
How can I do this?
With best regards,
Sayan Mukherjee
(sayanmukherjee@indiatimes.com)
|
|
|
|
|
Add data members do dialog2 and initialize them before calling DoModal.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Your comment is FILTHY You are SICK
|
|
|
|
|
Did you forget to take your pills today?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi Tomasz
Initially I was confused as to his post too. The I guessed.
The sig must have upset him. Or if I guess right "upset her".
The anonymous poster is in all probability a woman
Your sig :- "** If you're going to rape, pillage and burn, be sure to do things in that order. **"
Nish
p.s. don't worry Tomasz. different people have different senses and levels of humor.
I am looking for a free racing game. Old style racing game without any complicated 3D stuff. Around 4 MB download. If anyone has such a game, please inform me.
|
|
|
|
|
Nish [BusterBoy] wrote:
don't worry Tomasz. different people have different senses and levels of humor
I'm absolutely not worried. Actually, I was thinking about changing the sig - it's about week old. But now I'll keep it for another week
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Hi,
Thanks for the answer. It was really helpful.
A related question:
In Windows SDK, each window has a place where a 32 bit pointer can be passed
which is accessible from other windows. Using the heap, one can pack any
amount of data and pass it.
Is there any equivalent to that under MFC? I am sorry if the question is
vague.
With best regards,
Sayan
Email:sayanmukherjee@indiatimes.com
|
|
|
|
|
Sayan Mukherjee wrote:
In Windows SDK, each window has a place where a 32 bit pointer can be passed
which is accessible from other windows.
I'm not sure what you're referring to - WPARAM/LPARAM passed with messages or extra bytes per window which you request during class registration?
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Sayan Mukherjee wrote:
Is there any equivalent to that under MFC?
To the best of my knowledge, no. If you're using MFC, your Window subclassed object should have a data member that you can set and get. Of course, you could always access a CWnd derived class' public m_hWnd member, but that's nasty!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
hi,
If you want a very stable mechanism,go for user defined messages.
else
get the data from one dialog and store it in mainframe and display it in the second dialog.Mainframe because it is present as long as the app is running;you may also use App class.
hope it helped
Rajendra Gowda
|
|
|
|
|
I'm using a dynamic splitter window to display multiple views. I would like to create a window similar to the MS Outlook window, with one view on the LHS and two views on the RHS, one above the other.
m_wndSplitter.Create(...) arguments insist that you create a number of rows and columns for the views.
My question is, given that I must create a splitter window with 2 rows and 2 columns in order to achieve the desired effect, How do I hide/remove(?) the unwanted view?
Many thanx
funbag
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
No, you achieve the Outlook-like layout with *two* splitters. First splitter splits window vertically. LHS is a view and RHS is another splitter which splits horizontally and hosts two views.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|