|
Alternatively you could use the the WebBrowser ActiveX control in your application, that would give you access to all the IE favourites and settings. For that you have to use the ShDocVw.dll and the MsHtml.dll files and create a wrapper class for the activeX control which you can then add to your applciation.
There is an excellent tutorial here on CP but it's written in C#, you shouldn't have any problem doing the same in VC++.
But if you are looking to write your own rendering engine or something like that then i think you'll have to use CHtmlView although i am not too sure.
|
|
|
|
|
I have stumbled across this function "conjg" in the complex class template. But I don't seems to be able to access it. Any kind soul can tell me how to access this function?
Thanks in advance!
|
|
|
|
|
#include <complex>
void foo()
{
using namespace std;
complex<double> cX(1.0, 1.0);
complex double cY = cX.conjg();
_ASSERTE(cX.imag() == -cY.imag());
}
You don't need to sleep to see a nightmare Anne Clark [sighist]
|
|
|
|
|
Thanks for the reply. I can't seems to get it compile under VC++ 6.0
Here's what I have attempted to do.
#include <iostream>
#include <complex>
using namespace std;
void main()
{
complex<double> abc;
double myvar = abc.conjg();
cout << myvar;
}
When I tried complied it... the error is as follows..
error C2039: 'conjg' : is not a member of 'complex<double>'
What's wrong here? It's seems that conjg is not visible in the class?
|
|
|
|
|
From MSDN
#include <complex>
#include <iostream>
int main( )
{
using namespace std;
complex <double> c1 ( 4.0 , 3.0 );
cout << "The complex number c1 = " << c1 << endl;
double dr1 = real ( c1 );
cout << "The real part of c1 is real ( c1 ) = "
<< dr1 << "." << endl;
double di1 = imag ( c1 );
cout << "The imaginary part of c1 is imag ( c1 ) = "
<< di1 << "." << endl;
complex <double> c2 = conj ( c1 );
cout << "The complex conjugate of c1 is c2 = conj ( c1 )= "
<< c2 << endl;
double dr2 = real ( c2 );
cout << "The real part of c2 is real ( c2 ) = "
<< dr2 << "." << endl;
double di2 = imag ( c2 );
cout << "The imaginary part of c2 is imag ( c2 ) = "
<< di2 << "." << endl;
complex <double> c3 = c1 * c2;
cout << "The norm of (c1 * conj (c1) ) is c1 * c2 = "
<< real( c3 ) << endl;
}
Output
The complex number c1 = (4,3)
The real part of c1 is real ( c1 ) = 4.
The imaginary part of c1 is imag ( c1 ) = 3.
The complex conjugate of c1 is c2 = conj ( c1 )= (4,-3)
The real part of c2 is real ( c2 ) = 4.
The imaginary part of c2 is imag ( c2 ) = -3.
The norm of (c1 * conj (c1) ) is c1 * c2 = 25
May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
Is there an API which will tell me when a machine enters/leaves the network (at startup/shutdown)?
If not, can anybody point me in the right direction on how to detect these events?
|
|
|
|
|
give more information. which computer (remote or used)? when will u meen detect this events etc.
look "Service Functions" maybe get some idea
|
|
|
|
|
By "detect these events" I mean detect when a machine enters/leaves the network. If a machine is equiped with a network adapter, a startup of the meachine will normally mean that the machine tries to connect. I want to capture this. If a mahine is shut down or powered off it will leave the network. I want to capture that. I hope this clarifies my question.
So, to repeat, what API should I use to capture these events (real-time)?
Thank U in advance!
|
|
|
|
|
If you think of "connected to the network" as beeing physically connected to the network, ther are no APIs that could give you this information. This is heavily protocol and client configuration dependend.
However, if you mean that the machine establishes a session e.g. to the domain controller, you should take a look at the NetXXX Apis, especially NetSessionEnum() could be of help. However, you have to poll it, there is no ready-to-use notification mechanism available.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Thanks!
I hoped there was a way to avoid this polling thing, but it looks like there is no way around it. Makes my real-time requirement a little bit difficult, though ....
|
|
|
|
|
Can it help you ?
CAsyncSocket::IsAborted
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
I don't know. I just searched through my MSDN Library and could not find any documentation. Where did you find it?
I assume this call is supposed to handle a machine being shut down (leaving the network).
What about a new machine connecting to the network?
Thank U in advance!
|
|
|
|
|
I am trying to control how the scientific notation
in VC++ display when I call it. It seems that iostream
have a default behaviour how it should look like. I can't
seems to be able to control it. For example,
the scientific notation of the exponent have to be
3 digits long. There could only be 1.23E+003, where
I wanted it to display 12.3E+002 , I can't seems to
do that. Is there a library available that allows
this to be implemented easily, or I have to
write my own stream?I hope that is a easy way
to do it. Any suggest from anyone?
Just Danny
|
|
|
|
|
Have you tried using the iostream format flags?
Don't remember excatly but you could use the flags to format the output.
Eg. cout<<scientific<<25; etc.
where="" scientific="" is="" a="" format="" flag.
look="" up="" the="" iostream="" flags="" and="" stream="" manipulators="" in="" msdn="" i="" am="" sure="" there="" method="" to="" set="" precision="" as="" well.
=""
<i="">May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
Thanks for the reply. I can set it using setprecision() and setw(), but I can't change it's behaviour. I mean I like my scientific notation to have 2 digits before the decimal points not the default( ie. 1.23E+010) , I was hoping to get 12.34E+009 . Hope u can understand what I mean.I am converting a code from FORTRAN which allows this to happen.
|
|
|
|
|
Do you have to use cout?? You could do what you want with printf()
May the Source be with you
Sonork ID 100.9997 sijinjoseph
|
|
|
|
|
can anyone help me getting the .fon file format
This is a Bitmap Font file
If anyone can tell me the format or links to it, i'll b thankful
surbinsho
|
|
|
|
|
The best place to look for file formats is
http://www.wotsit.org/[^]
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Just call Invalidate() when the mouse either leaves or enters your window.
_____________________
"They'd dearly make us pay
For laughing in their faces
And making it our way"
-Love My Way, Psychedelic Furs
|
|
|
|
|
Daniel Ferguson wrote:
when the mouse either leaves or enters your window
What do you mean by this statement? Where do you suggest I call
Invalidate()? I'm drawing those lines in the CView and if the user stay in the view, I think their mouse never leaves. I'm kind a new to this.
Newbies
|
|
|
|
|
keep the changed, message paint redraw old color.
|
|
|
|
|
You can save your line coordinate to a var. Then, handle your WM_MOUSEMOVE. If point in that rect, redraw with another color, Invalidate.
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
I have data thats got nulls and even though I replaced them with spaces Access still doesnt like it when I go to add these calues into the table.Says its a required property. How do we set this property in code?
Thanks,
ns
|
|
|
|
|
Use 'null' or 'NULL' instead of ' '
Todd Smith
|
|
|
|
|
Thing is - I created an access database with ADOX. By default it set all the fields as required. SOme of the values I want to insert are NULLS and it complains about that.
also, if the db is totallly blank why doesnt addnew work? It says its either eOF or BOF (its both) so it doesnt add any record. That seems like a limitation.
Thanks,
ns
'
Rs1.AddNew
For j = 0 To UBound(u)
For k = 0 To UBound(v)
' If Not Rs1.EOF Then
Rs1.Fields.Item(j + 2).Value = v(k)
Rs1.MoveNext
If Rs1.EOF Then
Exit For
'Rs1.MovePrevious
End If
' End If
Next
Next
Rs1.UpdateBatch
|
|
|
|