|
Have you searched CP, or Googled, for USB-related articles?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
If you want to read/write from/to a USB HID device a suggest to take a look on Jan Axelson's The HID Page[^]
BTW, a mouse is a HID device (I'm using his code in a big commercial project and it's working very good)
|
|
|
|
|
hi, which example do you use?
Visual C++ 6
Usbhidio_vc6 ???
at
------ Build started: Project: usbhidioc, Configuration: Debug Win32 ------
Compiling...
usbhidioc.cpp
c:\download\usbhidio_vc6\usbhidioc.cpp(12) : fatal error C1083: Cannot open include file: 'hidsdi.h': No such file or directory
usbhidiocDlg.cpp
c:\download\usbhidio_vc6\usbhidiocdlg.cpp(57) : fatal error C1083: Cannot open include file: 'hidsdi.h': No such file or directory
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version ..................
BSCMAKE: error BK1506 : cannot open file '.\Debug\usbhidioc.sbr': No such file or directory
where can i download the Windows Driver Development Kit for win xp??? hm at the microsoft page i only found ... to order...
cu
-- modified at 7:17 Tuesday 4th April, 2006
|
|
|
|
|
Hi,
what is the reason for the Cxyz& return value with *this parameter of = operators?
Dr-Kuulun
|
|
|
|
|
Not sure exactly what you are asking, but this is a pointer while *this is the actual object being pointed to. Since the operator= method is returning a reference to the actual object, that's why *this would need to be returned.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
if u define return type as Cxyz&, u should return *this, otherwise what you can return?
u can define return type other way, such as void or BOOL.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
The reason is simpler than you may think. Its is so that you can make multiple assignment work efficiently.
You expect this to work:
int a, b, c;
a = b = c = 1;
So you also accept this to work:
CFwibble a, b, c;
c.DoSomethingtoInitialisethestruct;
a = b = c;
But the last line is equivalent to:
a = (b = c);
which means b = c has to be something you can assign to another struct / class / object of the same kind.
You could make the return value xyz , but that would mean creating a temporary copy on the stack, which is inefficient. The xyz & means a reference to b is passed, so no temporary copy is made.
For proper purity, you should also make the reference const, to prevent b from being messed about with...
class xyz
{
...
const xyz &operator=(const xyz &rhs)
{
...
return *this;
}
};
I hope that made sense for you!
Iain.
-- modified at 19:54 Monday 3rd April, 2006
|
|
|
|
|
Iain Clarke wrote: CFwibble a, b, c;
5 just for the class name!
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"
|
|
|
|
|
That's it! Thanx!
Dr-Kuulun
|
|
|
|
|
hi
I have developed an ActiveX control using MFC and i am using it in IE. The control has a boolean property ShowThumbNail which i am able to set through scripting, but when i set this property using < PARAM > tag it seems that the property is not set and nothing happens.
please tell me how to set exposed properties of an ActiveX using < Param > tag. The control is developed using MFC
thanks
Azam
|
|
|
|
|
override DoPropExchange and call PX_ functions.
Regards
Microsoft MVP in Visual C++
http://blog.joycode.com/jiangsheng
|
|
|
|
|
thanks Sheng
it worked
Azam
|
|
|
|
|
I am using CListCtrl.
I would like to handle single click event and double click event on list controls.
Is that possiable.
List control's property is set to report style.
How to handle single click and double click on list view?
In single click I want to display the values of that colomn in the same dialog.
In double click I want to open another dialog and show related details.
Is this possiable.
What are the events I need to handle.
At Present I am using only one event
"ON_NOTIFY(LVN_ITEMACTIVATE, IDC_LIST_GROUPS, OnLvnItemActivateListGroups)"
to display colomn values in same dialog.
Please let me know any one.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
G Haranadh wrote: t Present I am using only one event
Handle NM_DBLCLK message
|
|
|
|
|
Hi All,
I want to develop an application in which my GUI supports multiple views(CRichEditView,CListView,CTreeView..).All the views are independent of each other. when any modification is done in any of the views,that view sends a notification to observer class and this class in turn would notify other views about the updation.Can some one tell how to design this in MFC.I want to make the design robust so that more views can be added with ease.
Thanks in advance
Raghu
|
|
|
|
|
See CDocument::UpdateAllViews()
onwards and upwards...
|
|
|
|
|
Hi,
I'm creating a checkbox button at runtime. How can I determine the size of the drawn checkbox in front of the text. Is there a method in CButton to do this or can I retrieve this with a function like ::GetSystemMetrics() ?
Additionally it would be fine if I also could get the space between the checkbox and the text.
Thanks
|
|
|
|
|
madmax0001 wrote: I'm creating a checkbox button at runtime.
Any particular reason why you aren't doing this at design time?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
yes. I'm writing a GroupCheckbox control (similar to http://www.codeproject.com/miscctrl/GenCGroupCheckBx.asp). So the CButton control must be placed at runtime on the groupbox control. But I want to make this work under Win2000 and XP with or without BS_FLAT style set. And I determined that with the BS_FLAT style set, the checkbox is a little bit bigger than without.
|
|
|
|
|
madmax0001 wrote: So the CButton control must be placed at runtime on the groupbox control.
Right, but it doesn't have to be created at runtime. Create the checkbox at design time and simply move it into the correct location using MoveWindow() or SetWindowPos() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Only suggestion:
resize your check-box by MoveWindow(), if u can see the check-box but can't see its text, the size should be right.
i think all OS use same size for the square image of check-box, so once u know the size, u can use it anywhere for forever.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
I am using the JNI and can call methods in my C++ code. Now I need help going in the other direction. My c++ code need to send an update back to Java. I am using JDK1.5.0 so StubsPreamble no longer exists.
Pat
|
|
|
|
|
one idea is to establish pipes between C++ and java apps, so you can get/send signals from/to C++ and java apps - communications between them.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
i have a function that i want a worker thread to execute it, my function is of the type
bool wmi(IP)
Can i use AfxBeginThread() with this or can only void functions be called? how can i pass a variable back or do i have to use a pointer?
thanks
|
|
|
|