English
Forum

Done: ReBar / RBN_HEIGHTCHANGE question

 
- Page 1 -



Georg
Hovenbitzer
Hello together,

i sit time again to one trouble and come not further.
background is, I Search a Possibility the Umklappen the Grippers without the leave of Waitinput to get and again produce.
my attempt was is over The Notifikafion RBN_HEIGHTCHANGE this To experienced, but unfortunately comes in of my SubClassProd nothing gescheites on.

Since I there 'm not as practiced, I'm going of it from, I a Error intercepting the Message make.
I hope very it can me of/ one on The Sprünge help.
CompileMarkSeparation
 $H D:Eigene DateienProgrammeXProfan11INCLUDEMessages.ph
 $H D:Eigene DateienProgrammeXProfan11INCLUDEWindows.ph
 $H D:Eigene DateienProgrammeXProfan11INCLUDEcommctrl.ph
Declare Edit1&, Edit2&
Struct ReBar = 	Size&,
Mask&,
Style&,
clrFore&,
clrBack&,
lpText&,
cch&,
iImage&,
hwndChild&,
cxMinChild&,
cyMinChild&,
cx&,
hbmBack&,
wID&,
cyChild&,
cyMaxChild&,
cyIntegral&,
cxIdeal&,
lParam&,
cxHeader&
Declare ReBar#
Dim ReBar#,ReBar
Clear ReBar#
Declare a#
Dim a#,16
Struct TNMHdr = hwndFrom&,
idFrom%,
code%
Declare lpnmhdr#
Dim lpnmhdr#,TNMHdr
WindowStyle 2 + 8 + 16 + 128 + 256 + 512
WindowTitle "ReBar - Test"
Window 0,0-1024,768
Cls ~GetSysColor(~COLOR_BTNFACE)
Edit1& = @Create("Edit",%hWnd,"TreeView",0,0,0,0)
Edit2& = @Create("Edit",%hWnd,"ListView",0,0,0,0)
Clear a#
Long a#,0 = 8
Long a#,4 = $FFFF
@External("comctl32.dll","InitCommonControlsEx",a#)
Declare ReBar&
ReBar& = @Control("ReBarWindow32","",($50000000 | ~CCS_NORESIZE | ~RBS_FIXEDORDER),5,5,1008,250,%hWnd,%hInstance,0)

With ReBar#

    .Size& = @SizeOf(ReBar#)
    .Mask& = (~RBBIM_CHILD | ~RBBIM_CHILDSIZE | ~RBBIM_SIZE | ~RBBIM_STYLE | ~RBBIM_IDEALSIZE)
    .Style& = ~RBBS_NOGRIPPER
    .clrFore& = 0
    .clrBack& = 0
    .lpText& = 0
    .cch& =	0
    .iImage& = 0
    .hwndChild& = Edit1&
    .cxMinChild& = 0
    .cyMinChild& = @Height(ReBar&)
    .cx& = 300
    .hbmBack& = 0
    .wID& = 0
    .cyChild& = @Height(ReBar&)
    .cyMaxChild& = @Height(ReBar&)
    .cyIntegral& = 0
    .cxIdeal& = 300
    .lParam& = 0
    .cxHeader& = 0
    @SendMessage(ReBar&,~RB_INSERTBAND,0,ReBar#)
    .Style& = ~RBBS_GRIPPERALWAYS
    .clrFore& = 0
    .clrBack& = 0
    .lpText& = 0
    .cch& =	0
    .iImage& = 0
    .hwndChild& = Edit2&
    .cxMinChild& = 0
    .cyMinChild& = @Height(ReBar&)
    .cx& = 690
    .hbmBack& = 0
    .wID& =	0
    .cyChild& = @Height(ReBar&)
    .cyMaxChild& = @Height(ReBar&)
    .cyIntegral& = 0
    .cxIdeal& = 690
    .lParam& = 0
    .cxHeader& = 0
    @SendMessage(ReBar&,~RB_INSERTBAND,1,ReBar#)

EndWith

SubClassProc

    If %sMessage = ~WM_NOTIFY

        lpnmhdr# = &sLParam

        If lpnmhdr#.hwndFrom& = ReBar&

            Locate 40,30
            Print lpnmhdr#.idFrom%
            Print lpnmhdr#.code%

            If lpnmhdr#.code% = ~RBN_HEIGHTCHANGE

                Locate 40,30
                Print "Treffer"

            EndIf

        EndIf

    EndIf

    @Set("WinProc",1)

EndProc

SubClass %hWnd,1

WhileNot %Key = 2

    WaitInput

EndWhile

Dispose a#
Dispose ReBar#
Dispose lpnmhdr#
SubClass ReBar&,0
~D
Window(ReBar&) End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/09/10  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer
Habs too time repariert and the Veränderung eingefügt...
 $H Messages.ph
 $H windows.ph
 $H commctrl.ph
Declare Edit1&, Edit2&
Struct ReBar = 	Size&,\
Mask&,\
Style&,\
clrFore&,\
clrBack&,\
lpText&,\
cch&,\
iImage&,\
hwndChild&,\
cxMinChild&,\
cyMinChild&,\
cx&,\
hbmBack&,\
wID&,\
cyChild&,\
cyMaxChild&,\
cyIntegral&,\
cxIdeal&,\
lParam&,\
cxHeader&
Declare ReBar#
Dim ReBar#,ReBar
Clear ReBar#
Declare a#
Dim a#,16
Struct TNMHdr = hwndFrom&,\
idFrom&,\
code%
Declare lpnmhdr#
Dim lpnmhdr#,TNMHdr
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window Title "ReBar - Test"
Window 0,0-1024,768
Cls ~GetSysColor(~COLOR_BTNFACE)
Edit1& = @Create("Edit",%hWnd,"TreeView",0,0,0,0)
Edit2& = @Create("Edit",%hWnd,"ListView",0,0,0,0)
Clear a#
Long a#,0 = 8
Long a#,4 = $FFFF
@External("comctl32.dll","InitCommonControlsEx",a#)
Declare ReBar&
ReBar& = @Control("ReBarWindow32","",($50000000 | ~CCS_NORESIZE | ~RBS_FIXEDORDER),5,5,1008,250,%hWnd,%hInstance,0)

With ReBar#

    .Size& = @SizeOf(ReBar#)
    .Mask& = (~RBBIM_CHILD | ~RBBIM_CHILDSIZE | ~RBBIM_SIZE | ~RBBIM_STYLE | ~RBBIM_IDEALSIZE)
    .Style& = ~RBBS_NOGRIPPER
    .clrFore& = 0
    .clrBack& = 0
    .lpText& = 0
    .cch& =	0
    .iImage& = 0
    .hwndChild& = Edit1&
    .cxMinChild& = 0
    .cyMinChild& = @Height(ReBar&)
    .cx& = 300
    .hbmBack& = 0
    .wID& = 0
    .cyChild& = @Height(ReBar&)
    .cyMaxChild& = @Height(ReBar&)
    .cyIntegral& = 0
    .cxIdeal& = 300
    .lParam& = 0
    .cxHeader& = 0
    @SendMessage(ReBar&,~RB_INSERTBAND,0,ReBar#)
    .Style& = ~RBBS_GRIPPERALWAYS
    .clrFore& = 0
    .clrBack& = 0
    .lpText& = 0
    .cch& =	0
    .iImage& = 0
    .hwndChild& = Edit2&
    .cxMinChild& = 0
    .cyMinChild& = @Height(ReBar&)
    .cx& = 690
    .hbmBack& = 0
    .wID& =	0
    .cyChild& = @Height(ReBar&)
    .cyMaxChild& = @Height(ReBar&)
    .cyIntegral& = 0
    .cxIdeal& = 690
    .lParam& = 0
    .cxHeader& = 0
    @SendMessage(ReBar&,~RB_INSERTBAND,1,ReBar#)

EndWith

SubClassProc

    If %sMessage = ~WM_NOTIFY

        lpnmhdr# = &sLParam

        If lpnmhdr#.hwndFrom& = ReBar&

            If Long(&slparam,8) = ~RBN_HEIGHTCHANGE

                Clear a#
                @SendMessage(ReBar&,~RB_SIZETORECT,0,a#)
                @Set("WinProc",0)

            EndIf

        EndIf

    EndIf

ENDPROC

SubClass %hWnd,1

WhileNot %Key = 2

    WaitInput

EndWhile

Dispose a#
Dispose ReBar#
Dispose lpnmhdr#
SubClass ReBar&,0
~DestroyWindow(ReBar&)
End
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/19/18  
 




Frank
Abbing
Have not integrally your trouble understood. What is Umklappen the Gripper?
but eventuel is it rather, directly the ReBar-Control To subclassen...
 
02/09/10  
 




Georg
Hovenbitzer
is correct, if one The Fehlerbeschreibung ließt is tappt im dunkeln difficult to unterstand, another attempt.

Zieht one whom Gripper down from the ReBar Control out, disappears it completely and is only with a resetting visible again.
The can make if the Waitinput interrupted becomes, because one the level determined.
i want this but before, means to the interrupting the ReBar come along.

If I subclass the ReBar is no WM_NOTIFY on.

i hope so is now something understand written.
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/09/10  
 



Do you have it once with of/ one nproc probiert? have of Rebars no idea, but real and disruptive sounds subclassing this still integrally helpful.
 
02/09/10  
 




Georg
Hovenbitzer
yet not yet (will be But time try), where I do not faith, that it was bring.
Since no Notifikation through comes, always only 64 ?!
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/09/10  
 



know Yes not, whether a durchkommt, if Waitinput leave and is so Yes no more messages are ready for the SubclassProc. go in example 20 Messages abgesandt and the first Message resolve already one leave of Waitinput from, then become You The restlichen 19 Messages presumably not at all More by SubClassProc erfassen can, because You Perhaps not at all again in the Waitinput are. very this drop can I me hierbei quite well present, thatswhy again my hint it Real To subclassen.
 
02/09/10  
 




Frank
Abbing
Ts, WM_NOTIFY operates too with XProfans Subclassing perfect together...

your manner, How You The Notify-structure ansprichst, is wrong, there must you start. the here functions z.B. without Problems:
CompileMarkSeparation
If %sMessage = ~WM_NOTIFY

    lpnmhdr# = &sLParam

    If lpnmhdr#.hwndFrom& = ReBar&

        Locate 40,30
        Print lpnmhdr#.idFrom%
        Print Long(&slparam,8)

        If Long(&slparam,8) = ~RBN_HEIGHTCHANGE

            Locate 40,30
            Print "Treffer"
            Set("WinProc",0)

        EndIf

    EndIf

EndIf


The structure is well defective, z.B. must lpnmhdr#.idFrom% one Long-Int his, in the form go but only 2 byte reserved and addressed...
 
02/09/10  
 




Georg
Hovenbitzer
Hello Frank,

Volltreffer
on it lying it, I have from the windows.ph the structure TNMHdr taken (there it no NMHdr given) and this was the Error.
super, everything work out right and you can now the vanish the Grippers directly prevent.
CompileMarkSeparation
SubClassProc

    If %sMessage = ~WM_NOTIFY

        lpnmhdr# = &sLParam

        If lpnmhdr#.hwndFrom& = ReBar&

            If lpnmhdr#.code& = ~RBN_HEIGHTCHANGE

                Clear a#
                @SendMessage(ReBar&,~RB_SIZETORECT,0,a#)
                @Set("WinProc",0)

            EndIf

        EndIf

    EndIf

ENDPROC

 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
02/10/10  
 




Jörg
Sellmeyer
Habs too time repariert and the Veränderung eingefügt...
 $H Messages.ph
 $H windows.ph
 $H commctrl.ph
Declare Edit1&, Edit2&
Struct ReBar = 	Size&,\
Mask&,\
Style&,\
clrFore&,\
clrBack&,\
lpText&,\
cch&,\
iImage&,\
hwndChild&,\
cxMinChild&,\
cyMinChild&,\
cx&,\
hbmBack&,\
wID&,\
cyChild&,\
cyMaxChild&,\
cyIntegral&,\
cxIdeal&,\
lParam&,\
cxHeader&
Declare ReBar#
Dim ReBar#,ReBar
Clear ReBar#
Declare a#
Dim a#,16
Struct TNMHdr = hwndFrom&,\
idFrom&,\
code%
Declare lpnmhdr#
Dim lpnmhdr#,TNMHdr
Window Style 2 + 8 + 16 + 128 + 256 + 512
Window Title "ReBar - Test"
Window 0,0-1024,768
Cls ~GetSysColor(~COLOR_BTNFACE)
Edit1& = @Create("Edit",%hWnd,"TreeView",0,0,0,0)
Edit2& = @Create("Edit",%hWnd,"ListView",0,0,0,0)
Clear a#
Long a#,0 = 8
Long a#,4 = $FFFF
@External("comctl32.dll","InitCommonControlsEx",a#)
Declare ReBar&
ReBar& = @Control("ReBarWindow32","",($50000000 | ~CCS_NORESIZE | ~RBS_FIXEDORDER),5,5,1008,250,%hWnd,%hInstance,0)

With ReBar#

    .Size& = @SizeOf(ReBar#)
    .Mask& = (~RBBIM_CHILD | ~RBBIM_CHILDSIZE | ~RBBIM_SIZE | ~RBBIM_STYLE | ~RBBIM_IDEALSIZE)
    .Style& = ~RBBS_NOGRIPPER
    .clrFore& = 0
    .clrBack& = 0
    .lpText& = 0
    .cch& =	0
    .iImage& = 0
    .hwndChild& = Edit1&
    .cxMinChild& = 0
    .cyMinChild& = @Height(ReBar&)
    .cx& = 300
    .hbmBack& = 0
    .wID& = 0
    .cyChild& = @Height(ReBar&)
    .cyMaxChild& = @Height(ReBar&)
    .cyIntegral& = 0
    .cxIdeal& = 300
    .lParam& = 0
    .cxHeader& = 0
    @SendMessage(ReBar&,~RB_INSERTBAND,0,ReBar#)
    .Style& = ~RBBS_GRIPPERALWAYS
    .clrFore& = 0
    .clrBack& = 0
    .lpText& = 0
    .cch& =	0
    .iImage& = 0
    .hwndChild& = Edit2&
    .cxMinChild& = 0
    .cyMinChild& = @Height(ReBar&)
    .cx& = 690
    .hbmBack& = 0
    .wID& =	0
    .cyChild& = @Height(ReBar&)
    .cyMaxChild& = @Height(ReBar&)
    .cyIntegral& = 0
    .cxIdeal& = 690
    .lParam& = 0
    .cxHeader& = 0
    @SendMessage(ReBar&,~RB_INSERTBAND,1,ReBar#)

EndWith

SubClassProc

    If %sMessage = ~WM_NOTIFY

        lpnmhdr# = &sLParam

        If lpnmhdr#.hwndFrom& = ReBar&

            If Long(&slparam,8) = ~RBN_HEIGHTCHANGE

                Clear a#
                @SendMessage(ReBar&,~RB_SIZETORECT,0,a#)
                @Set("WinProc",0)

            EndIf

        EndIf

    EndIf

ENDPROC

SubClass %hWnd,1

WhileNot %Key = 2

    WaitInput

EndWhile

Dispose a#
Dispose ReBar#
Dispose lpnmhdr#
SubClass ReBar&,0
~DestroyWindow(ReBar&)
End
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/19/18  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.176 Views

Untitledvor 0 min.
Stringray01/05/22
Rolf Koch09/06/20
Jörg Sellmeyer06/16/20
Klaus Müller09/06/19
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