~aishimoto/+junk/pymfc

« back to all changes in this revision

Viewing changes to test_pymfc/ctlcolor.py

  • Committer: Atsuo Ishimoto
  • Date: 2010-10-15 13:04:09 UTC
  • Revision ID: ishimoto@gembook.org-20101015130409-7wf8bjvs1mnqd1cx
Move to bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2001- Atsuo Ishimoto
 
2
# See LICENSE for details.
 
3
 
 
4
import gc, sys
 
5
from pymfc import wnd, gdi
 
6
 
 
7
brush=gdi.Brush(color=0xff0000)
 
8
def ctlcolor(msg):
 
9
    dc = gdi.DC(hdc=msg.hdc)
 
10
    dc.setBkColor(0xff0000)
 
11
    return brush.getHandle().handle
 
12
 
 
13
def pppp(msg):
 
14
    print "lksmflksmflkm"
 
15
    import _pymfclib
 
16
    print _pymfclib.xxxx()
 
17
 
 
18
def test():
 
19
    dlg = wnd.Dialog(u"abcdefg", (200, 400), pos=(100,100))
 
20
    e = wnd.Edit(u"def", size=(100, 125), pos=(10, 10), parent=dlg)
 
21
#    e2 = wnd.Edit(u"def", size=(100, 125), pos=(10, 10), parent=dlg)
 
22
#    e3 = wnd.Edit(u"def", size=(100, 125), pos=(10, 10), parent=dlg)
 
23
    e.msgproc.CTLCOLOREDIT = ctlcolor
 
24
#
 
25
    dlg.msgproc.PARENTNOTIFY = pppp
 
26
    dlg.doModal()
 
27
 
 
28
 
 
29
for i in  xrange(10):
 
30
    test()
 
31
    
 
32
gc.collect()
 
33
 
 
34
import _pymfclib
 
35
print _pymfclib.xxxx()