参考网上资料,通过QT 实现
#ifndef WIDGET_H
#define WIDGET_H
#include
#include
#include
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = 0);
~Widget();
protected:
bool winEvent(MSG *msg, long *result);
private:
//UsbConfig usbConfig;
char FirstDriveFromMask (ULONG unitmask);
};
#endif // WIDGET_H
#include "qt_Watch/qwidget.h"
#include
#include
#include
Widget::Widget(QWidget *parent)
: QWidget(parent)
{
setWindowFlags(Qt::Window); //窗口以Window为父窗口
}
Widget::~Widget()
{
}
bool Widget::winEvent(MSG *msg,long *result)
{
int msgType = msg->message;
if(msgType == WM_DEVICEC