English
Opportunities and suggestions

wish: Support of CUSTOMDRAW-Controls

 

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:
CompileMarkSeparation
window 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


CompileMarkSeparation
window 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
 
12/15/10  
 



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.
 
12/15/10  
 




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
Hi people!

@ Roland:


circa on the Version X2 something To turn, is it definitiv To late, because otherwise becomes tappt im dunkeln never ready.


already clear! Hauptsache, You schaust then To gegebener Time again here past

@iF:
Why must You my Proposals always so verdrehen?
I would already with a advanced RePaint pleased.
Or of/ one Possibility - How already multiple suggested - The SubClassProc with want as reguläre WindowProc einzusetzten, The independent of Wartebefehlen operates. and wenn's on Own menace is

where I Yes anyhow the opinion be, a "fest verdrahtete" Proc would not the yellow of egg

SeeYou
Pascal
 
12/16/10  
 



Sorry, wished nothing verdrehen - was me the Verdrehens not deliberate. ^^
 
12/16/10  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.055 Views

Untitledvor 0 min.
Rolf-Günther Kuhn12/19/21
Sven Bader07/11/21
Ernst04/30/16
GDL09/02/15
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie