摘要: os.getcwd()获取系统路径sys.path [0]获取当前路径 阅读全文
posted @ 2013-11-16 23:38 fff8965 阅读(151) 评论(0) 推荐(0) 编辑
摘要: import osprint(os.getcwd()) 阅读全文
posted @ 2013-11-16 22:42 fff8965 阅读(202) 评论(0) 推荐(0) 编辑
摘要: rectWindow = D2D.GetWindowRect(self.hwnd)#窗口大小 rectClient = D2D.GetWindowRect(self.hwnd,True)#客户区大小 titleBarHeight = D2D.DGetSystemMetrics(4)#窗口标题栏高度 borderWidth = (rectWindow.width - rectClient.width)/2#边框宽度 borderHeight = (rectWindow.height - rectClient.height -... 阅读全文
posted @ 2013-11-16 07:02 fff8965 阅读(457) 评论(0) 推荐(0) 编辑
摘要: from pprint import pprintpprint (vars(your_object))另外查看所有属性名用.__dict__ 阅读全文
posted @ 2013-11-16 05:42 fff8965 阅读(10651) 评论(0) 推荐(0) 编辑
摘要: #include #include void main(){ initgraph(640, 480); // 初始化绘图窗口 HWND hwnd = GetHWnd(); // 获取绘图窗口句柄 POINT point; TCHAR s[10]; while(true) { GetCursorPos(&point); // 获取鼠标指针位置(屏幕坐标) ScreenToClient(hwnd, &point); // 将鼠标指针位置转换为窗口坐标 // 获取鼠标... 阅读全文
posted @ 2013-11-16 04:51 fff8965 阅读(18306) 评论(0) 推荐(0) 编辑
摘要: LRESULT CALLBACK TestProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ switch (msg) { case WM_LBUTTONDOWN: //左键按下 { SetCapture(hwnd); } break; case WM_MOUSEMOVE: //鼠标按下移动 { if(GetCapture() == hwnd) { ... 阅读全文
posted @ 2013-11-16 04:49 fff8965 阅读(2911) 评论(0) 推荐(0) 编辑