|
Hi to all! My team used WinDriver software to diagnose the gamepad of Logitech. This diagnosis software creates multiple C++ source code which gives us the character string of each button found on the gamepad. We would like to use these codes to be linked with the GUI application and then to the ADAM system. My team has been trying hard to link the C++ source code files created by WinDriver to the GUI application. The GUI application is also written in C++ source code. The ultimate objective is to use the gamepad to control the robots movement. If these C++ source code files cannot be linked to the GUI application, is there any other ways to do it?
|
|
|
|
|
And the specific Visual C++ programming problem is? Have you tried using DirectInput? Can your gamepad produce WM_CHAR, WM_KEYDOWN, WM_KEYUP messages?
|
|
|
|
|
please explain . What are the different types of polymorphism?
|
|
|
|
|
How much marks does this question carry ?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
1.Run time polymorphism
-Virtual functions
2.Compile time polymorphism
-Function and operator overloading
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
|
NiLeSh KoRpE wrote: What are the different types of polymorphism?
i believe two, Function Overloading and Operator Overloading[ I was Wrong]. anyways Mr Nilesh answer to these question can be find easily by reading book, why are you posting here for same!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
-- modified at 5:22 Thursday 18th May, 2006
|
|
|
|
|
i used random shuffle function in MFC application it doesnt working i dont know why...anyone knows the reason...
<code>void CConeverterDlg::OnEnter()
{
// TODO: Add your control notification handler code here
CString str;
// char str[13];
//cEdit.GetWindowText (str);
//AfxMessageBox(myStr);
//tmStart = time(0);
CTime time=CTime::GetCurrentTime ();
CString strttime= time.Format ("%Y%m%D%H%M%S");
// cEdit2.SetWindowText (strttime+"\n");//;(str)
//cEdit2.SetWindowText (strttime+"\n");
string line(str);
//line.c_str (),100);
//fin.open("data.txt");
// cout << str<<endl;
for (int i=0; i<500; ++i)
{
random_shuffle(line.begin(), line.end());
// File << "Randomised: " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
// File << " "<< endl;
CString cStr(line.c_str ());
cEdit2.SetWindowText ( cStr + "\n");
cEdit2.SetWindowText ("Randomised: "+ cStr + "\n");
//tmEnd = time(0);
}
CTime time1=CTime::GetCurrentTime ();
CString strtti= time1.Format ("%Y%m%D%H%M%S");
cEdit1.SetWindowText (str);
cEdit1.SetWindowText (strtti+"\n");
//cout << tmEnd-tmStart << " seconds " << endl;
}
</code>
|
|
|
|
|
makaveli_07 wrote: it doesnt working i dont know why
Which kind of failure it falls into?
1) The code compiles with no error and you get the EXE,
2) There is / are some compilation error(s).
Maxwell Chen
|
|
|
|
|
no compilation error the exe can run...but the random shuufle result cannot be shown in the programe.
|
|
|
|
|
Are you sure the function OnEnter( ) is invoked?
Maxwell Chen
|
|
|
|
|
yes..its working..but i think sumthing wrong with calling the string..but i cant solve it..or maybe sumthing else wrong on it...but i alrady incoke the function OnEnter()..
|
|
|
|
|
Oh I got your problem! You are doing random_shuffle on an empty string. See below quotes ...
makaveli_07 wrote: //cEdit.GetWindowText (str);
makaveli_07 wrote: string line(str);
makaveli_07 wrote: random_shuffle(line.begin(), line.end());
Maxwell Chen
|
|
|
|
|
|
but 500 results must be listed down...but i only getting one randomised shuffle result...
|
|
|
|
|
makaveli_07 wrote: but 500 results must be listed down...but i only getting one randomised shuffle result...
You need to use a ListBox or a ListCtrl ...
Maxwell Chen
|
|
|
|
|
see the following code, it works fine
string Numbers("Laxman");
cout << "Before calling random_shuffle\n" << Numbers.c_str()<<endl ;
for(int i=0;i<6;i++){
random_shuffle(Numbers.begin(),Numbers.end()) ;
cout << "After calling random_shuffle\n" << Numbers.c_str()<<endl ;
}
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
thanks...
|
|
|
|
|
I don't want to be rude, but have you tried the debugger?
If a program doesn't work, a debugging session is the best way to find out why.
Just single-step the code and see what happens. (That's especially easy when it's a small program like this).
You have been struggling with this problem for about a week, if you had done a couple of debugging sessions, the the problem should have been solved several days ago.
It's well worth the time it takes to learn how to use the debugger.
|
|
|
|
|
if i found the error i wont post it here..if u felt that its easy error for you just keep it to your self please dont insult others...forum is place where we learn to correct mistakes...
|
|
|
|
|
That's not an insult!
It's a suggestion from someone who have been coding C professionally since around 1982!
And know how useful the debugger is.
|
|
|
|
|
okies...next time i will do that sorry..
|
|
|
|
|
Yeah, try it. It's the easy way.
And it will save you heaps time of trying to figure out why it doesn't work.
Knowing is always better than guessing.
|
|
|
|
|
Hi all,
I have a child control in my dialog app. I changed it to popup by using ModifyStyle. The style is changed, but its behaviour is still as child. I mean, it is not getting top of the other controls, like popup dialogs do.
Is it wrong to change from child to popup?
Thank you.
- NS -
|
|
|
|
|
What type of control? and is it a bitmap on top of the dialog.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|