摘要: LOGFONT lf; lf.lfHeight = 50 ; lf.lfWidth = 0 ; lf.lfEscapement = 0 ; lf.lfOrientation = 0 ; lf.lfWeight = 700 ; lf.lfItalic = 1 ; lf.lfUnderline = 1 ; lf.lfStrikeOut = 1 ; lf.lfCharSet = DEFAULT_CHARSET ... 阅读全文
posted @ 2013-01-05 00:18 fff8965 阅读(601) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2013-01-01 00:13 fff8965 阅读(1) 评论(0) 推荐(0)
摘要: GetSysColor 得到系统字体,例:GetSysColor (COLOR_WINDOWTEXT),GetSysColor (COLOR_WINDOWTEXT)InvalidateRect (hwnd, NULL, TRUE) 重绘,发送重绘消息ChooseFont() 弹出选择字体对话框GetClientRect (hwnd, &rect) ; 得到客户区区域 阅读全文
posted @ 2012-12-31 15:04 fff8965 阅读(241) 评论(0) 推荐(0)
摘要: GDI:TextOut() 最低级的文本输出函数,速度最快,没有裁剪,不能带tab(tab键被忽略)TabbedTextOut() 上面函数的带tab版本ExtTextOut() TextOut升级版,可以调整字符间距和裁剪矩形DrawText() TextOut升级版,可以是多行文本,指定一个Rect,会自动换行,可以设置对齐方向DrawTextEx() drawText升级版,可以指定tab的显示方式GetTextExtentPoint32() 测量某文本的显示区域GetTabbedTextExtent() 测量带tab键的字符串的显示区域GetTextExtentExPoint() 根据 阅读全文
posted @ 2012-12-30 15:27 fff8965 阅读(3826) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2012-12-30 01:55 fff8965 阅读(10) 评论(0) 推荐(0)
摘要: Methods of File ObjectsThe rest of the examples in this section will assume that a file object calledfhas already been created.To read a file’s contents, callf.read(size), which reads some quantity of data and returns it as a string or bytes object.sizeis an optional numeric argument. Whensizeis omi 阅读全文
posted @ 2012-12-28 01:47 fff8965 阅读(208) 评论(0) 推荐(0)
摘要: string的ljust()、rjust()、center()用来对齐>>> for x in range(1, 11):... print(repr(x).rjust(2), repr(x*x).rjust(3), end=' ')... # Note use of 'end' on previous line... print(repr(x*x*x).rjust(4))... 1 1 1 2 4 8 3 9 27 4 16 64 5 25 125 6 36 216 7 49 343 8 64 512 9 81 7... 阅读全文
posted @ 2012-12-28 01:43 fff8965 阅读(205) 评论(0) 推荐(0)
摘要: dir函数用来查看上下文dir()会列出当前上下文的所有变量、模块、函数等等,把得到的值再传给dir可以像下查看>>> import fibo, sys>>> dir(fibo)['__name__', 'fib', 'fib2']>>> dir(sys) ['__displayhook__', '__doc__', '__egginsert', '__excepthook__', '__loader__', &# 阅读全文
posted @ 2012-12-28 01:33 fff8965 阅读(211) 评论(0) 推荐(0)
摘要: >>> tel = {'jack': 4098, 'sape': 4139}>>> tel['guido'] = 4127>>> tel{'sape': 4139, 'guido': 4127, 'jack': 4098}>>> tel['jack']4098>>> del tel['sape']>>> tel['irv'] = 4127> 阅读全文
posted @ 2012-12-28 00:56 fff8965 阅读(329) 评论(0) 推荐(0)
摘要: Set包含不重复元素,用{}或者set()创建,有于或非等运算符>>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}>>> print(basket) # show that duplicates have been removed{'orange', 'banana', 'pear', 'apple'}>&g 阅读全文
posted @ 2012-12-28 00:51 fff8965 阅读(170) 评论(0) 推荐(0)