|
Thanks for the timely help for you too!!!
bollapalli
|
|
|
|
|
Cedric Moonen wrote: As far as I know, you cannot use import to load a dll.
Actually you can. The OP's problem is simply that the DLL could not be found by the preprocessor.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Actually you can.
It's the first time I heard that. How does it work then ? How can you call functions from your dll afterwards ?
|
|
|
|
|
Cedric Moonen wrote: How can you call functions from your dll afterwards ?
In the same way you would any other type library.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
So, basically it is the same as implicit linking, except you don't need the lib file anymore ? Am I right ?
Never heard about such a thing...
|
|
|
|
|
See if this helps clear the fog.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Ok, I got it. But still, for regular dll's, this won't work. So, his post was not totally clear about it, he just said that he wanted to load a dll (for me, that means a regular dll).
|
|
|
|
|
I think the point here is that #import is used to pull in TLBs, so just as you can import a TLB file directly, you can use it on a DLL that has an embedded TLB in it...?
Just a thought...
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hey,
how can I cut needless decimal digits from a calculation result
e.g. calculation with pow(10.0,-1.0)
10^-1 = 0.100000000001 but I need to have 0.1
|
|
|
|
|
You can't. This is due to the precision of the floating point representation. But why do you want to do such a thing ? I think the error due to precision is very neglectable here.
|
|
|
|
|
You mean for display, or internally ? ((int)(x*10))/10.0 would give you one decimal place. Not sure if there's a more built in way to do it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I need this for displaying the result value (e.g. in a diagram)
|
|
|
|
|
So just format the value using sprintf(..., "%.1f", ...) .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Can somebody help me ...That how to update the file path in the combobox when user clicks on any item(file/folder) in the Listbox .
Thanks
Shikha
|
|
|
|
|
Where are these items ? There's a selection changed event on the listbox, you can access the selected item from there and put it in the text of the combo box, assuming they are items in your form.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks or ur reply...
yes i agree with u that i set the selected item from the Listbox into combobox but if i need to retrieve that path from combobox what i will use ...
that is now how i get the text from the combobox back ....if use getcurSel() what index does it return me or how i retrieve the text ...
Thanks
Shikha
|
|
|
|
|
Shikha Jain wrote: ...if use getcurSel() what index does it return me...
The zero-based index of the currently selected item in the control.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Replying to your message , it is not asked that what index does getcursel() return to me , but my question is with the context that i want the combobox to get update the path of the current item which get selected in the ListBox .
Which way should i proceed...
Thanks n Regards
Shikha
|
|
|
|
|
Shikha Jain wrote: ...it is not asked that what index does getcursel() return to me...
Actually, you did. However, if that's not what you meant to ask, please rephrase your question.
Shikha Jain wrote: ...i want the combobox to get update...
Populate a combobox using either AddString() or InsertString() .
Shikha Jain wrote: ...current item which get selected in the ListBox .
Which is obtained with GetText() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
We are working on a scientifical related product which is most sensitive towards mathematical functions (even 7th decimal place chang can cause considereble differences in the output values). We’ve observed that the trignometric functions are behaving differently in Visual C++ 2003 and Visual C++ 2005 versions. We've recently upgraded IDE from VS2003 to VS2005 and compiled the unmanaged vc++ code in both versions.
To explain this in detail, please consider the following console application and please compile it in both 2003 and 2005 versions.
// CosSinDemo.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <math.h>
const float PI = 3.1415926535f;
const float PI_OVER_180 = PI / 180.0f;
int _tmain(int argc, _TCHAR* argv[])
{
static double fDummy1 = 0;
static double fDummy2 = 0;
float fDiffLat = -0.19629669; //input values to cos()
float fDiffLon = 0.060424805;
fDummy1 = cos( fDiffLon * PI_OVER_180);
fDummy2 = cos( -fDiffLat* PI_OVER_180);
printf("fDummy1 - %3.20f\nfDummy2 - %3.20f", fDummy1, fDummy2);
return 0;
}
output with VS2005:
fDummy1 - 0.99999946355819702000
fDummy2 - 0.99999415874481201000
output with VS2003:
fDummy1 - 0.99999944389707407000
fDummy2 - 0.99999413118713976000
The values are differing in 7th decimal place. Could you please someone help me out on how to make VS2005 cos/sin functions behave same as was there in 2003 version.
cheers,
PraK
|
|
|
|
|
If you're that worried about accuracy, why are you using float and not double ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanks for your reply, yes that is true, with 'double' data type the behaviour of cos/sin functions is same, but the system which was compiled with VS2003 has been already released and now we are trying to see the possibility of getting consistency in the system when compiled with VS2005. once again thanks for your time.
PraK
|
|
|
|
|
prakash reddy wrote: float fDiffLat = -0.19629669; //input values to cos()
float fDiffLon = 0.060424805;
As CG has already indicated, float s only have 6-7 significant digits. Use double s for 15-16 significant digits.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi everyone,
on my Dialog i have multiple components for example a label with a textbox a side
If i resize the CFormView ( Not the dialog -> MDI Project ) the event reacts each pixel.
How can i center the label with the textbox a side ?
My only idea is to get the position of the component and to move the LEFT (re-setting) one pixel farer.
Next event the RIGHT one pixel farer...
But aren't there more possibilities to center components?
many thanks
|
|
|
|
|
The only way to position something is to set it's position yourself, in code. Handle the WM_SIZE event.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|