|
Ok, thanks... I have a book and ill start studying. If i have any other questions on this little subject, i have 3 other forums to post it
Thanks Again!
~SilverShalkin
|
|
|
|
|
SilverShalkin wrote:
Will i or will i not use DirectX to build my Engine? If not, then what should i use. "Engine, not game"
Will your 'Engine' need to display graphics, show animations or play sounds of any kind?
If the answer is yes, then you will need to use DirectX.
If your 'Engine' just needs to input data into a dialog box, then MFC will do the job fine.
And just to confuse the issue a little more, it is possible to write a DirectX application using MFC. There are plenty of books out there that teach you how to do it. It's not easy and doesn't produce fast games but if you are just doing a map editor then it might be a way forward. Do a search on Amazon for books on writing games, they contain all the information you need. A google search might also help.
Michael
|
|
|
|
|
Anyone knows how get the percent of System Resource, User Resource and GDI Resource ? Some class e functions ?
These information is the same showed by the Resource Meter Aplication of Windows 9x.
Thanks,
Cris ...
|
|
|
|
|
I don't think thats available to you under windows 9x.
GlobalMemoryStatus will return something of similar interest, but not exactly what you want.
As far as GDI USER and Process useage...theres not much you can do.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I am driven to the wall. Can anyone help me?
I have a server and a client both use TCP/IP socket. The server runs Vxworks while the client runs Windows 2000. the requrirement is that the server can have one client only at a time, so when I initialize the server socket, I say:
nRet = listen(ListenSocket, 1);
But still, when I run two clients to test it, both can connect()!!!
And when I check the messages received by the server,
if ( FD_ISSET(ListenSocket, &ReadSet) && ClientSocket == 0)
HandleNewConnection();
else
logMsg("don't accept\n", 1, 2, 3, 4, 5, 6);
I will see that: after the first client successfully connected to the server (ClientSocket != 0 then), I let the second client try to connect to the server. The client will tell me its connect() okay, while the server will say "don't accept\n" all the time until the second client close the connection.
What's the use of the MAX_CONNECTION = 1 in my listen() then??
Or if I over look something?
any help is highly appreciated!
|
|
|
|
|
Well, according to Beej in his "Beej's Guide to Network Programming", the MAX_CONNECTION in listen() is the number of connections allowed on the incoming queue. Incomding connections are going to wait in this queue until you accept() them and this is the limit on how many can queue up.
So, if I set it to 1, then the second client which tries to connect should get a failure. Why this doesn't happen in my program? any suggestion?
|
|
|
|
|
Hi there,
How can i register the MFC70.DLL and ATL70.DLL and ... in other computer ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
First:If you dynamicly link them to your project,you don't need to register them.
Second:regsvr32 do it.Type it in run command with file path.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Ehm, if I don't remember wrong you just move/copy them to the Windows directory of that computer you want the files in.
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
You can also use installshield.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
I'm allowing a user to enter data in a wizard, and I want to confirm their intention if they are to click on Cancel. One would think overriding OnCancel, popping up a message box, and then NOT calling the base class method if the user did not intend to quit would be sufficient to keep the property sheet from closing... but this is not the case. Simply return'ing instead of calling the base class method closes the dialog anyway.
Is there a way to return to the property sheet? I know something similar can be done with CDialog, which is why the property sheet is confusing.
Here is the code:
void CPageFieldSelection::OnCancel()
{
int result = MessageBox("Are you sure you want to exit?"...);
if (result != IDYES)
return;
CPropertyPage::OnCancel();
}
The return closes the dialog, as does the CPropertyPage::OnCancel().
Any help would be appreciated.
- Rob
|
|
|
|
|
Override CPropertyPage::OnQueryCancel() - that's where you can cancel the cancel operation.
--Mike--
"Jobs that don't allow you to visit the Lounge 25 times a day at the minimum are not worth having anyway."
-- Nish, 3/28/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
Hello all,
I am working on line tracker class that works for multiple lines like just as CMultiRectTracker works for rectangles.
When I am finished I will release it for all to learn from, and it is working except for this.
Anyway, my trig is rusty (very), and I need to know how I can determine if a point clicked is within x pixels of a give line. This is to select the line to work with.
Given two line endpoints (P1x, P1y), (P2x, P2y), and mouse position (X, Y) how can I do this?
Thanks a lot!
Xenos
|
|
|
|
|
Shirish Shanbhag provides a drop-in routine here.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello,
I was wondering if there was a way to pass a "HANDLE" from a client's window to a dll in ATL?
I have tried adding "HANDLE" as a parameter,but it didn't work. Is there a different way to approach this problem?
Thanks in advance.
|
|
|
|
|
you could try a Long, since in Win32 a HANDLE is a void*, and a void* is a pointer. and pointers are 32 bits long, just like a long.
-c
"Do you mind if I smoke?"
"Madam, I don't care if you burn."
-Oscar Wilde
Smaller Animals Software, Inc.
|
|
|
|
|
Thanks for the idea!
It worked!
|
|
|
|
|
Hello
I want to create a function that compares two words (char*) and returns a percentile representing how much the two string are identical.
I have some problems making the function perfect and I was wonderig if someone can tell me if there's an algorithm that do that or have some code already written.
Thank you very much.
Eric
|
|
|
|
|
Eric Moisan wrote:
how much the two string are identical
Can you define what this means? Is it as simple as how much of the strings (starting from the first char) are identical?
If so, just loop from the beginning of each string until you find 2 chars that aren't the same. The progress divided by the length (of one of the strings) should give you your answer.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Maybe i'm not perfectly clear.
My function does exactly what you told me. I loop from the begining of each strings until I find 2 chars that aren't the same. But if I have the words "Hello" and "ello", I don't want to have a value of 0% since the two words are pretty identicals.
Thanks for the answer.
P.S. I like your sentence..."There is always one more bug..."
Eric
|
|
|
|
|
if u want this,just consider the tokens..on Substring....
and if the substring found substringlength/main strin length *100 give the percentage
strstr()
strtok()
and many other bulilt in routines here for it..
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
char str1[MAX_PATH],str2[MAX_PATH];
strcpy(str1,"HELLO");
strcpy(str2,"HALLO");
int nLen=strlen(str1);//or which string u want to compare
int nTotalMatchedChars=0;
for(int i=0;i
|
|
|
|
|
Not quite. This will return a match value of zero for these 2 very similar strings: "abcd" and "bcd".
The algorithm should return the length of the longest same substring present on both strings. The "similarity" factor would be the length of the substring divided by the length of the longer string.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
The algorithm should return the length of the longest same substring present on both strings. The "similarity" factor would be the length of the substring divided by the length of the longer string.
So "abcd" and "lbcd" would be more similar than "abcd" and "acbd"?
That sounds wrong...
(the first pair has a three character substring in common, but the second pair has only one character substrings in common. I personally would not consider the first pair to be three times as similar as the second pair.)
|
|
|
|
|
How could I get information about system performance (System Meter utility of Windows 9x), like free resource, free RAM, used RAM, processor use ...
Anyone knows some class or function in VC6 ?
Thanks,
Cris ...
|
|
|
|