| |
|
|
Uwe ''Pascal'' Niemeier | Hi people, Hello Roland!
here another thing, The me from aktuellem occasion on the hearts lying: It's all right therefore, that Profans SubClassing only terminable to usage of CUSTOMDRAW-Controls taugt. (Roland having Yes self already hereon hingewiesen). here again the comparison ProcAddr/SubClass: CompileMarkSeparationwindow 500,500
$H Messages.ph
$H Windows.ph
$H commctrl.ph
declare LvDraw#
struct LvDraw= HwndFrom&,idFrom&,Code&,DrawStage&,Hdc&,Rect#(16),ItemSpec&,ItemState&,ItemLparam&,Text&,Textbk&,SubItem&
dim LvDraw#,LvDraw
proc ColorProc'--------------------------------------------------------
parameters wnd&,msg&,wparam&,lparam&
if msg&=~WM_NOTIFY
LvDraw#=lparam&
if (LvDraw#.Hwndfrom&=Lv&)*(LvDraw#.Code&=~NM_CUSTOMDRAW)
case LvDraw#.DrawStage&=~CDDS_PREPAINT: return ~CDRF_NOTIFYITEMDRAW
case LvDraw#.DrawStage&=~CDDS_ITEMPREPAINT:return ~CDRF_NOTIFYSUBITEMDRAW
if LvDraw#.DrawStage&=~CDDS_SUBITEM | ~CDDS_ITEMPREPAINT
case LvDraw#.SubItem&=0:LvDraw#.Textbk&=rgb(255,200,200)
case LvDraw#.SubItem&=1:LvDraw#.Textbk&=rgb(200,255,200)
case LvDraw#.SubItem&=2:LvDraw#.Textbk&=rgb(200,200,255)
endif
endif
endif
return ~CallWindowProc(&WinProc,wnd&,msg&,wparam&,lparam&)
endproc'-------------------------------------------------------------
var Lv&=create("gridbox",%hwnd,"Spalte 0;0;100;Spalte 1;0;100;Spalte 2;0;100",0,20,20,400,300)
whileloop 0,50
addstring(Lv&,"Test|Test|Test")
endwhile
set("FastMode",1)
~SetWindowLong(%hwnd,~GWL_WNDPROC,procaddr(ColorProc,4))
repaint
while 1
waitinput
endwhile
CompileMarkSeparationwindow 500,500
$H Messages.ph
$H windows.ph
$H commctrl.ph
declare LvDraw#
struct LvDraw= HwndFrom&,idFrom&,Code&,DrawStage&,Hdc&,Rect#(16),ItemSpec&,ItemState&,ItemLparam&,Text&,Textbk&,SubItem&
dim LvDraw#,LvDraw
subclassproc'--------------------------------------------------------
if subclassmessage(%hwnd,~WM_NOTIFY)
LvDraw#=&slparam
if (LvDraw#.Hwndfrom&=Lv&)*(LvDraw#.Code&=~NM_CUSTOMDRAW)
set("winproc",0)
case LvDraw#.DrawStage&=~CDDS_PREPAINT: return ~CDRF_NOTIFYITEMDRAW
case LvDraw#.DrawStage&=~CDDS_ITEMPREPAINT:return ~CDRF_NOTIFYSUBITEMDRAW
if LvDraw#.DrawStage&=~CDDS_SUBITEM | ~CDDS_ITEMPREPAINT
case LvDraw#.SubItem&=0:LvDraw#.Textbk&=rgb(255,200,200)
case LvDraw#.SubItem&=1:LvDraw#.Textbk&=rgb(200,255,200)
case LvDraw#.SubItem&=2:LvDraw#.Textbk&=rgb(200,200,255)
endif
endif
endif
endproc'-------------------------------------------------------------
var Lv&=create("gridbox",%hwnd,"Spalte 0;0;100;Spalte 1;0;100;Spalte 2;0;100",0,20,20,400,300)
whileloop 0,50
addstring(Lv&,"Test|Test|Test")
endwhile
subclass %hwnd,1
while 1
waitinput
endwhile
gaudy is thereby, that with Version 2 the ListView coloured becomes, if the Mainwindow of outside to that Repaint forced becomes. eachone attempt, this effect in the program self To produce, throbbing fehl. now question I, whether the commands RePaint Perhaps so modify could, that therefore The SubClassProc called becomes? Möglicherweise a new mode-Parameter?
BTW: I have too attempts, The SubClassProc to Initialisierung the Controls as "normale" Windowprozedur einzusetzen (by &ScProc) , but since there next to the specific ENDPROC/Return-behaviour well yet others differences.
or gibt's yet others Möglchkeiten?
SeeYou Pascal |
|
|
| |
|
|
|
| Hello Uwe,
since the XProfan-engineering terminable is I had for such things The nProcs made up - so functions something like everything fehlerfrei. Wers means "braucht" has a profane Possibility and must not z.B. on Fremdsprachen zurückgreifen. so functions too The canvas-Include ( [...] ) .
what Roland make could would a sicheres ProcAddr for WNDPRocs - this should it whom term the XProfan-Program in a of UI-Thread independent own Thread umlegen and the Own Thread could then of UI-Thread "bemeldet" go.
i know already like the functions would and How to the program should - becomes but one small nude and Roland has vlt. no Time. |
|
|
| |
|
|
|
RGH | Hi, circa on the Version X2 something To turn, is it definitiv To late, because otherwise becomes tappt im dunkeln never ready.
but on another place have I already in prospect set, that it in absehbarer Time a Verson .1 give could (naturally then to free Dowenload for all X2-owner). there could I then too this Topic suppose.
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 12/16/10 ▲ |
|
|
|
|
Uwe ''Pascal'' Niemeier | |
|
| |
|
|
|
| Sorry, wished nothing verdrehen - was me the Verdrehens not deliberate. ^^ |
|
|
| |
|
|