摘要: CSplitterWnd是一个特殊的框架窗口,它分割的每个窗口都被相同的或者不同的视图所填充。当窗口被切分后用户可以使用鼠标移动切分条来调整窗口的相对尺寸。其定义如下://///////////////////////////////////////////////////////////////////////////// Splitter Window#define SPLS_DYNAMIC_SPLIT 0x0001#define SPLS_INVERT_TRACKER 0x0002 // obsolete (now ignored)class CSplitterWnd : public 阅读全文
posted @ 2014-03-31 11:15 thetung 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: void CMyListView::InitializeListView(){ /* CListCtrl& m_list = GetListCtrl();//得到内置 listctrl 引用 LONG lStyle; lStyle = GetWindowLong(m_list.m_hWnd, GWL_STYLE);//获得当前窗口风格 lStyle &= ~LVS_TYPEMASK; //清除显示方式 lStyle |= LVS_REPORT; //设置窗口风格 SetWindowLong(m_list.m_hWnd, GWL_STYLE, lStyle); //设置窗口风格 阅读全文
posted @ 2014-03-31 04:02 thetung 阅读(869) 评论(0) 推荐(0) 编辑
摘要: BOOL TheThreePointsAreCollinear(CPoint PrePoint, CPoint CurrentPoint, CPoint NextPoint){BOOL flag=false;if(PrePoint.y==CurrentPoint.y && CurrentPoint.y==NextPoint.y)//如果3个点的Y坐标都相等,则它们是共线的flag = true;else{if(PrePoint.x==CurrentPoint.x){if(CurrentPoint.x==NextPoint.x)//如果3个点的X坐标都相等,则它们是共线的flag 阅读全文
posted @ 2014-01-04 13:18 thetung 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 平面在三维空间平面方程(一般方程):Ax + By + Cz + D = 0;平面通过点M(x1, y1, z1),及法向量 n = (A,B,C)的方程 :A(x-x1) + B(y-y1) + C(z-z1) =0;通过三个点P(a,0,0), Q(0,b,0), R(0,0,c)的方程:x/a + y/b + z/c = 1;// (a,b,c != 0)直线在三维空间直线的一般方程:F(x,y,z) = 0;// Ax + Bx + Cz + D = 0;G(x,y,z) = 0;// ax + by + cz + d = 0;直线过点M(x1,y1,z1)和方向向量m(m,n,p). 阅读全文
posted @ 2013-12-26 11:46 thetung 阅读(7028) 评论(0) 推荐(0) 编辑
摘要: 在Python中optparse模块是专门用来在命令行添加选项的一个模块导入方法:fromoptparseimportOptionParser首先来看一段示例代码fromoptparseimportOptionParserMSG_USAGE="myprog[-f][-s]arg1[,arg2..]"optParser=OptionParser(MSG_USAGE)optParser.add_option("-f","--file",action="store",type="string",des 阅读全文
posted @ 2013-10-29 19:43 thetung 阅读(611) 评论(0) 推荐(0) 编辑
摘要: # Import PySide classesimport sysfrom PySide.QtCore import *from PySide.QtGui import * class Form(QDialog): def __init__(self, parent=None): super(Form, self).__init__(parent) self.setWindowTitle("cnblogs's Blog") # Create widgets self.edit = QLineEdit("Write yo... 阅读全文
posted @ 2013-10-27 14:41 thetung 阅读(983) 评论(0) 推荐(0) 编辑