|
See for instance http://www.pages.drexel.edu/~nk752/cannyTut2.html#Step%201[^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I have a question about the sample "chap_09\ZFXInput" of the book "3D Game Engine Programming".
I used the VC++2005 to compile the sample "chap_09\ZFXInput".
But it appeared one error as below:
Error 1 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\data1\akira recent study\3d game engine programming\chapter data\chap_09\zfxinput\zfxdi\zfxjoystick.cpp 12
How do I solve this problem?
// File: ZFXJoystick.cpp
#include <windows.h> // type definitions
#include "ZFXDI.h" // class definition
extern bool g_bLF;
// Yeah, evil callback stuff. Let's rock C++, let's rock!
ZFXJoystick *g_pThis=NULL;
CALLBACK gEnumJoyCallback(const DIDEVICEINSTANCE* pInst, void* pUserData);<======problem
|
|
|
|
|
The problem is that your gEnumJoyCallback declarations has no return value.
vc++ requires you to explicitly set one. you can fix this by using the return type void, what does in fact mean "no return value":
void CALLBACK gEnumJoyCallback(const DIDEVICEINSTANCE* pInst, void* pUserData);
Don't try it, just do it!
modified on Thursday, February 28, 2008 10:31 AM
|
|
|
|
|
Haven't googled yet? See [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
yes, Alexander already given the solution.
Apart from this, you can disable the warning with compiler option /wd4430. if you don't want to change the code.
|
|
|
|
|
Hi,
Currently I am working in project for Unicode support. I mean this is a project which is already developed in C++ (Using MS VC++ 6.0), which is not suppoting unicode currenty. Now I am working on this project and do the necessary changes to support for Unicode. I have gone though the web and found some tools to do this. The tools are 1) To Unicode and 1) Globalyzer.
It will be a great help if some can help to find if there is any other tools avilable for unicode conversion. Also let me know the Links/URL’s which talking about this converion and give me some reffernce (people who are) of UNICODE experts.
Thanks,
Nandu
|
|
|
|
|
Nandu_77b wrote: let me know the Links/URL’s which talking about this converion and give me some reffernce
Did you read the previous replies given to you? ^
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Ya I gone through my previous post, but still like to know whether any more tool is aviable. And also i like to know people who are experts n Unicode.
Thanks
Nandu
|
|
|
|
|
Have you completely read Michael Kaplan's 9 step tutorial? I was expecting you to come back with specific questions. But you're asking the same thing after a while. Had you been reading through the links provided to you previously, you would have come back with specific questions.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Nandu_77b wrote: I have gone though the web and found some tools to do this. The tools are 1) To Unicode and 1) Globalyzer.
It will be a great help if some can help to find if there is any other tools avilable for unicode conversion.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
As i have told you, I have gone through the site you provided. My specific question is, is there any other similar tools avilable or not?. Which I may not aware of and which may also missed (or not mentioned) in the site.
|
|
|
|
|
Do you noticed that the mouse pointer will hide when you are editing in a richedit control? Move your mouse pointer inside the rectangle of a rich edit control, input some characters, then the mouse pointer disappear!
Why?
|
|
|
|
|
Hi flyingxu,
It is rather an intuitive and standard behavior. My guess is that it's been deliberately designed that way, so the mouse pointer doesn't stand on your way and so you could see what you are typing. But what makes you think that it's only the rich edit control? Have you tried checking the same with a normal CEdit control? Explorer/IE address bar? Run dialog, etc.,?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
You are correct, I noticed the habaviors now.
thank you, I should investigate more before I ask.
|
|
|
|
|
Hi,
I am working for a project which need to migrate from MS VC++ 6.0 to MS VC++ 2005. This was develped and compiled using MS VC++ 6.0. Now we need to compile the same preject in MS VC++ 2005. When I tried to open it is asking whether we need to change to MS VC++ 2005 and it is also creating a new file called solution. But I am not sure how to move further and even after answering the comiler quries.
I searched in MSDN and got one docuemt, but that document talks about migrating from MS VC++ 6.0 to MS VC++2003. Will this is the same for MS VC++ 2005? and it will be great help some can help me out for this issue.
It will be a great help if some can provide me some Links/URL which can address the above issue.
Thanks,
Nandu
|
|
|
|
|
Nandu_77b wrote: But I am not sure how to move further
Just compile your project and see if you have any errors. If yes, try to solve them. There's no universal solution.
Do you experience any errors when compiling your project ?
|
|
|
|
|
Thank You Cedric Moonen, I thought there may be some documents which talks about migration. Any I will just complie and check the same.
Thanks,
Nandu
|
|
|
|
|
Hi Experts,
How can I regitser a dll file through programming?
|
|
|
|
|
dynamically link to the DLLRegisterServer() function exported by the COM Dll and call it.
|
|
|
|
|
Can I use CreateProcess()?
|
|
|
|
|
pther wrote: CreateProcess()?
No, DLL is not a executable!, but you could pass regsvr32.exe \s COMDLL NAME in createprocess, '\s' switch will register it silently!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
CreateProcess(NULL,_T("D:\\MYDLL\\regsvr32 mydll.dll"), NULL,NULL,FALSE,0,NULL,
NULL,&StartupInfo,&ProcessInfo);
This is giving exception.
|
|
|
|
|
pther wrote: CreateProcess(NULL,_T("D:\\MYDLL\\regsvr32 mydll.dll"), NULL,NULL,FALSE,0,NULL,
NULL,&StartupInfo,&ProcessInfo);
This is giving exception.
what exception?
what about,
"regsvr32.exe \\s \"D:\\MYDLL\\mydll.dll\""
|
|
|
|
|
I used like this
CreateProcess(NULL,_T("regsvr32.exe \"D:\\MY DLL\\mydll.dll\""), NULL,NULL,FALSE,0,NULL,
NULL,&StartupInfo,&ProcessInfo);
using GetLastError(), it is returning 0;
|
|
|
|
|
"The Unicode version of this function, CreateProcessW, will fail if this parameter is a const string." from msdn;
try this,
TCHAR szCmd[] = _T("regsvr32.exe \"D:\\MY DLL\\mydll.dll\"");
CreateProcess(NULL, szCmd, NULL,NULL,FALSE,0,NULL,
NULL,&StartupInfo,&ProcessInfo);
|
|
|
|