|
Thanks, that should do the trick.
|
|
|
|
|
Unfortunatelyfor this subproject have to use VB. Besides a 2d array what options do I have to store data (VB STL?).
Another thing is it seems you have to declare the sizes so they arent dynamic. I tried
dim arr(100, 5) as string
and later tried
redim preserve arr(100, KnownCount).
The compiler wasnt happpy
|
|
|
|
|
I believe VB has a Collection object. Check out the reference on MSDN.
You might want to ask this question in the VB forum as you are more likely to get somebody who knows/gives a damn about VB
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
i want to make my own simple browser but i dun know where to start. if anybody implemented a simple web browser plz do share code or atleast provide hints for that. or is there any sample here on code project.
|
|
|
|
|
Make an MFC Appwizard SDI application, in the final stage, derive ur view from CHTMLView, and that's it!
In order to develop further ur application just read about CHTMLView in the MSDN!
Good luck
Bébé Harhour
|
|
|
|
|
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
|
|
|
|