|
|
Implement MouseMove in your view class
You might also need to implement WM_LBUTTONDOWN/UP etc.
Then you can call, your camera's methods from there.
There should be an example on the Internet for displaying MD3 files. Search in the gamedev articles. It shows how to set up a MFC project and create four different views(quite a useful article to look at in the beginning)
I found the link.
http://www.gamedev.net/reference/articles/article1358.asp
Bekir.
|
|
|
|
|
|
I have not looked at the sights you provided, but that is not an error. A warning might not be a bad idea for that, but come on (it's legal code).
INTP
Every thing is relative...
|
|
|
|
|
Is is actually disallowed in C as it can lead to undefined behaviour, see the two links I gave.
GCC takes a command line option to detect this as a warning.
thanks!
|
|
|
|
|
I assume you intended saying "It is actually disallowed...", but the rest of your statement does not support that nor does the standard.
The term "undefined behaviour" does not disallow a programmer from doing it. It just says its behaviour is undefined in the standard and is therefore compiler dependent. Meaning that you can not determine the result when using a different compiler, provided it worked on your current compiler.
A fully compliant compiler could compile that statement without giving any warning at all. But is should at the least give a warning and at the most consider it an error (becuase it is undefined behaviour).
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: A fully compliant compiler could compile that statement without giving any warning at all. But is should at the least give a warning and at the most consider it an error (becuase it is undefined behaviour).
So it may be the case that the C compilers shipped with VS6, VS2003, VS2005 all aren't fully compliant with the standard. What is puzzling is, they dont qualify your "at the least" part, forget about "at the most" part.
thanks!
-- modified at 0:55 Sunday 19th March, 2006
|
|
|
|
|
I would need to look it up, because I never understood why it would be classified as undefined behaviour.
My answer was very weak and I should not have attempted it [without research], becuase it actually applies to the "old argument" below, following my explination of what I ment.
I said "at the least" because if it is undefined behaviour then it would be compiler dependent (non-portable) and a warning should be generated to inform the programmer of this.
I said "at the most" because if it is undefined behaviour then it would be compiler dependent and an error would force the programmer not to write non-poratable code.
I believed it was consider undefined behaviour in the passed, which means the compiler vender could decide what behaviour to apply, and still be fully compliant. This may no longer be the case, as the behaviour may now be deifined.
Here is the old argument:
int i = 0;<br />
i = i++;
Should i now be equal to 0 or 1?
My answer and the answer Microsoft chose is 1, which I think is the only logical answer. But there where those who disagreed and said the answer should be 0, because they believed that was the intent of the progammer.
So if you throw out logic and just consider the intent, then the language would not be able to define the behaviour. I think the real problem was that different venders had already implimented different solutions, before the standared was complete.
When I originaly gave my answer of 1 to that question (years ago), I was informed that my answer was wrong, becuase it was undefined and therefore could be either 0 or 1.
VS6 may be fully compliant for C (?), but it is not fully compliant with the C++ standard.
VS2003, according to Microsoft, is a full ASCII/ISO C++ Standards compliant compiler.
INTP
Every thing is relative...
|
|
|
|
|
John R. Shaw wrote: I have not looked at the sights you provided, but that is not an error. A warning might not be a bad idea for that, but come on (it's legal code).
Actually, it does violate the standard:
"Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored."
The second sentence is the killer here. I think it's a silly statement, but perhaps that's just me. To me, it would be more intuitive to state that an object's value is not changed until the compiler reaches a sequence point - nice and clean and predictable, without preventing totally unambiguous code such as this example.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote: Actually, it does violate the standard
Actually, undefined behaviour is not a violation of the standard. It is what it says "undefined", that means it is up to the compiler [vender] to determine what its behaviour is.
Personaly, I think it should translate into:
data[i] = i;
++i; OR
data[i] = (temp = i + 1);
i = temp; but that is just my opinion.
INTP
Every thing is relative...
|
|
|
|
|
|
Trollslayer wrote: Did you change the warning level to 4? (Project->Settings->C/C++)
I just checked with both VS6 and VS 2003, both of them dont detect and warn for a[i] = i++. Do you have VS 2005 to check this out? GCC 3.4.3 does, if you want to check this out with GCC.
thanks!
|
|
|
|
|
|
Hello,
I'd like to release an application in several languages(english, french and spanish).
I know I can do it by traducing only my resource file. In fact, I've included all strings I use as resources.
But I don't want to duplicate my application directory for each language. I'd like to manage all languages only from one workspace under Visual C++ 6.
Can you please tell me how to do or point me to a document discussing it?
Thanks
Best regards,
Allad
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
I have written programs that allow multiple languages, but I have not written one that supported multiple languages for the interface.
Given that, there is a book from Microsoft press that explains the subject. I forget its name but it was included in the VC6 MSDN library and the 2nd edition came out last year.
There is also an article some where on CP on the subject.
Essentially it breaks down to providing a DLL for each language that contains the strings for the required languages. In order to change the language all you have to do is change the DLL. In other words, your string resources are stored in a DLL. You still have to make sure that you give enough room in the text fields (at least in dialogs) for longer text strings or shorter text strings.
The biggest problem is working with Asian text, because you have to give extra room for the height. Outside of Asian characters I have not [yet] ran across double byte characters.
I do need to warn you, in the middle-east we may have a totally different problem, but I am not going to discuss that now.
INTP
Every thing is relative...
|
|
|
|
|
Thank you for replying.
However, I do not want to write an application that supports multiple language for the interface.
I'd just like to build one different version of my app for each language. Maybe it's a bit easier?
Best regards,
Allad
----
Navigator - Your best alternative to Windows Explorer
|
|
|
|
|
Sorry, I have been on a break.
The simplist approach would be to write your code using the functions prefixed with "_t" (Microsoft specific) to support single-byte, multibyte, and UNICODE character sets, depending on how it is compiled. Then require that their machine requires an OS (NT, Win2000, WinXP+) that supports UNICODE and only compile your code for UNICODE. Then you should be able to create one application that supports all UNICODE supported languages with one program (not including the interface).
If you need to support Win3.1, Win95, Win98, or Millinium Edition then it is to complicated to explain.
Good luck!
INTP
Every thing is relative...
|
|
|
|
|
I need to delete application files producing when user use my App in the uninstalling process.How can i know all users' account in order to delete files in Document Setting(Win2k).
Thanks
|
|
|
|
|
NetUserEnum
The NetUserEnum function provides information about all user accounts on a server.
|
|
|
|
|
|
PUSER_INFO_3 users;
LPWSTR lp1;
DWORD d1,d2;
DWORD SizeName=sizeof(Name);
GetComputerName(Name,&SizeName);
lp1=A2W (Name);
NetApiBufferAllocate(1024,(LPVOID*)&users);
NetUserEnum(lp1,3,FILTER_NORMAL_ACCOUNT,(LPBYTE*)&users,MAX_PREFERRED_LENGTH, &d1,&d1,NULL );
and also use USES_CONVERSION; in the first code
I hope helpful for you
|
|
|
|
|
You need to reword this. I am amazed I understood what I did.
INTP
Every thing is relative...
|
|
|
|
|
i want to hook the dll funtion, my mothod is modification the exe Import Table.
have other method of hook dll and not need modification the Import Table and Export Table.
thanks.
|
|
|
|
|
HOW WHAT wrote: have other method of hook dll and not need modification the Import Table and Export Table.
you can change first bytes of function to far jmp that points on your code.
|
|
|
|
|