|
Hey LaHaHa! Hopefully you'll see this here. I think we broke the message board on that
long ongoing joystick thread I can't respond to you there without error anymore.
I'll continue here and hopefully you'll see this.
LaHaHa wrote: I think my problem is the initialization.
My program need to periodically do the initialization of joystick.
What makes you think this? I believe what you need to do is periodically check the status
of the joystick buttons, right? Initialization only needs to happen once.
|
|
|
|
|
Mark Salsbery wrote: What makes you think this?
fish filet?
led mike
|
|
|
|
|
Yes!!!
Apparently 512 nested message levels is all this forum software could take
*edit* spelling
|
|
|
|
|
Thank you for your help!
I think my problem is the initialization.
My program need to periodically do the initialization of joystick. Could you give me more suggestions?
Please help!
|
|
|
|
|
I'm still not sure why you think you need to initialize repeatedly.
You should (after initialization) be either periodically polling for joystick actions or
waiting for an event from the joystick.
|
|
|
|
|
If I plug the joystick after the initialization, the program cannot detect the joystick. So how can I initial the joystick without periodically do it?
Please help!
|
|
|
|
|
You'll need to make sure your initializations fail if no joystick is attached.
If it fails then maybe prompt the user to attach the device.
Is that why you had it on the timer? The timer method should work - you could set a timer to
attempt to acquire the joystick every few seconds.
I'll put together a code sample today.
Mark
|
|
|
|
|
Thank you for your help!
I am looking for your code sample.
|
|
|
|
|
I have an MFC ActiveX control project that has been continually growing over the past three years. Within the last year or so, I noticed that the linker would just hang every so often, perhaps no more than once or twice a week. Lately, it's been hanging almost every other build (debug build). I've searched the internet with no success yet.
My hope is that someone has experienced this and perhaps discovered the cause. Any troubleshooting tips or ideas on the matter are greatly appreciated. Although, upgrading to Visual Studio .NET 200x is not currently an option.
Kevin Fournier
SRP Computer Solutions, Inc.
|
|
|
|
|
In case anyone is interested, I think I may have found the problem to this. I have an Office 2007 release candidate installed, which included the Windows Search service (searchindexer.exe). This process is always running and is usually 60-100 Megs in size. Well, I don't need to search my drive or emails that often, so I killed it. The linker hasn't hung on me since.
Kevin Fournier
SRP Computer Solutions, Inc.
|
|
|
|
|
Hi,
I have created a function and a class in a DLL.
I want to write a .DEF file instead using __declspec(dllexport) and __declspec(dllimport).
I wrote the .DEF file like this..
LIBRARY "Sample.dll" //dll name is Sample.dll
EXPORTS
Multiply @1 //it is the function name
CRectArea @2 //it is the class name and this class contains a
//method called subtract
Please say how to export that function.
and I wrote a client program which uses that dll dynamically.
//written globally in the implementation file of client
typedef int (CALLBACK* LPFNMLTPLY)(int,int);
//** I don't know how to declare that function from the class CRectArea
HINSTANCE hClcltr=LoadLibrary("DefExported.dll");
LPFNMLTPLY lpfnMuliply;
lpfnMuliply = (LPFNMLTPLY)GetProcAddress(hClcltr,"Multiply");
m_Rslt=lpfnMuliply(m_PartOne,m_PartTwo); //m_Rslt will be displayed
//in the message box.
FreeLibrary( hClcltr );
//now I want to use the function from class
Please can anybody help me.
Thanks inadvance.
|
|
|
|
|
The only way to import a class from a dll is by implicit linking (so, without using LoadLibrary and GetProcAddress but using the lib file supplied with the DLL).
|
|
|
|
|
To export/import a class I believe you have to use __declspec(dllexport) and __declspec(dllimport).
Mark
|
|
|
|
|
VC wizard can help you to create a dll class in a second - that is a perfect sample.
|
|
|
|
|
Did you see examples of dll on codeproject for export class
|
|
|
|
|
Yes Mr.whitesky I practiced the samples and while practicing I got the about.
Anyhow thank you very much all of YOU.
|
|
|
|
|
I glad you find it
|
|
|
|
|
Hi,
I am trying to close a dialog box that I created using CreateDialog(). The dialog appears and all the buttons work well, however, if I attempt to close the dialog using the "x" box on the system menu, nothing happens. I understand that usually the "x" box sends either the IDCANCEL or the WM_CLOSE message when depressed, but that doesnt' seem to be happening. Any ideas?
Thank you,
Joe
|
|
|
|
|
in WM_NCLBUTTONDOW, if hit-test is HTCLOSE, close the dialog by OnCancel() etc.
|
|
|
|
|
Hi,
Does anybody can share file "iphlpapi.lib" with me if you have.
B Regards
Ajith
Ajith
|
|
|
|
|
That file is part of the Platform SDK.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Did you search with google?
|
|
|
|
|
HI
MY problem is in creating a C++ program to build a 3ary heap using linked list structure rather than array
the 1st problem is that i am very weak in the area of linked list structure...so any help on how to start and what is important to know would be very helpful
thanks
|
|
|
|
|
Use the standard template library, for example the std::list. It is very powerfull.
|
|
|
|
|
Ba6o6 wrote: 3ary heap
are you talking about a memory pool ? not really a beginner topic, and if you don't know much about linked lists. ( my bad, I miss understood what you were talking about ( see David Crow's post )
anyway, there are tons of examples, tutorials on linked lists on the web, google a little bit.
one of the first hit : http://richardbowles.tripod.com/cpp/linklist/linklist.htm[^]
-- modified at 9:24 Tuesday 5th December, 2006
|
|
|
|