English
Forum

ReBar ask/Problems

 

Georg
Hovenbitzer
Hello together,

the weather becomes outside badly and already sits one More on the computer and attempts time again what To program.
but as so is dive directly The Problems and ask on what about me hope your can me help.

The Anhängende code prepares one Rebar with of/ one list on the left Page and one further ReBar on the rechten.
in the second is supra a List and under one Static Field on what two lists staid are.

following ask have I now:
How ermittle I, if right under in a the both lists one entry select becomes if these Window on the Static created get?
If I these both Window on the ReBar2 create come I of course on whom selected entry, but with the Repaint the Window works not More, How I get if this there?
with the first ReBar with the senkrechten Trennung becomes the Cursor to a arrow with two pointed if one over it standing, with the wagenrechten Trennung happens this not, can this Change?
gives it a others, Perhaps better Solution so a Unterteilung darzustellen?

greetings
Georg
 $H windows.ph
 $H messages.ph
 $H commctrl.ph
Cls
Window Title "RedBar"
Window 0,0-1024,768
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#
Var ReBar1& = @Control("ReBarWindow32","",(~WS_CHILD | ~WS_VISIBLE | ~CCS_NORESIZE | ~WS_BORDER | ~WS_CLIPCHILDREN | ~WS_CLIPSIBLINGS | ~RBS_VARHEIGHT | ~RBS_AUTOSIZE),2,2,800,700,%hWnd,200,%hInstance,0)
Var lb1&    = @Create("ListBox",ReBar1&,0,0,0,0,0)
Var ReBar2& = @Control("ReBarWindow32","",(~WS_CHILD | ~WS_VISIBLE | ~CCS_NORESIZE | ~CCS_VERT | ~WS_BORDER | ~WS_CLIPCHILDREN | ~WS_CLIPSIBLINGS | ~RBS_VARHEIGHT | ~RBS_AUTOSIZE),0,0,400,350,%hwnd,200,%hInstance,0)
Var lb2& = Create("ListBox",ReBar2&,0,0,0,0,0)
'Window lying on the Static Field
'Var lb3& = Create("Text",ReBar2&,"",0,0,0,0)
'Var lb4& = Create("ListBox",lb3&,0,10,10,100,50)
'Var lb5& = Create("ListBox",lb3&,0,50,150,70,100)
'Window lying on the ReBar&
Var lb3& = Create("Text",ReBar2&,"",0,0,0,0)
Var lb4& = Create("ListBox",ReBar2&,0,10,520,100,50)
Var lb5& = Create("ListBox",ReBar2&,0,150,550,70,100)

With ReBar#

    .Size& =		@SizeOf(ReBar#)
    .Mask& =	(~RBBIM_CHILD | ~RBBIM_CHILDSIZE | ~RBBIM_SIZE | ~RBBIM_STYLE | ~RBBIM_IDEALSIZE | ~RBBIM_ID | ~RBBIM_TEXT)
    .Style& =		~RBBS_NOGRIPPER
    .clrFore& =	0
    .clrBack& =	0
    .lpText& =	0
    .cch& =		0
    .iImage& =	0
    .hwndChild& =	lb2&
    .cxMinChild& =	100
    .cyMinChild& =	700
    .cx& =			500
    .hbmBack& =		0
    .wID& =			0
    .cyChild& =		0
    .cyMaxChild& =	800
    .cyIntegral& =	        0
    .cxIdeal& =		0
    .lParam& =		0
    .cxHeader&	=	0
    @SendMessage(ReBar2&,~RB_INSERTBAND,0,ReBar#)
    .Style& =			~RBBS_GRIPPERALWAYS
    .clrFore& =		0
    .clrBack& =		0
    .lpText& =		0
    .cch& =			0
    .iImage& =		0
    .hwndChild& =	lb3&
    .cxMinChild& =	 100
    .cyMinChild& =	700
    .cx& =			200
    .hbmBack& =		0
    .wID& =			0
    .cyChild& =		@Width(ReBar2&)
    .cyMaxChild& =	800
    .cyIntegral& =	0
    .cxIdeal& =		0
    .lParam& =		0
    .cxHeader&	=	0
    @SendMessage(ReBar2&,~RB_INSERTBAND,1,ReBar#)

EndWith

Clear ReBar#

With ReBar#

    .Size& =		@SizeOf(ReBar#)
    .Mask& =	(~RBBIM_CHILD | ~RBBIM_CHILDSIZE | ~RBBIM_SIZE | ~RBBIM_STYLE | ~RBBIM_IDEALSIZE | ~RBBIM_ID | ~RBBIM_TEXT)
    .Style& =		~RBBS_NOGRIPPER
    .clrFore& =		0
    .clrBack& =		0
    .lpText& =		0
    .cch& =			0
    .iImage& =		0
    .hwndChild& =	lb1&
    .cxMinChild& =	80
    .cyMinChild& =	0
    .cx& =			800
    .hbmBack& =		0
    .wID& =			0
    .cyChild& =		@Height(ReBar1&)
    .cyMaxChild& =	@Height(ReBar1&)
    .cyIntegral& =	0
    .cxIdeal& =		0
    .lParam& =		0
    .cxHeader&	=	0
    @SendMessage(ReBar1&,~RB_INSERTBAND,0,ReBar#)
    .Style& =			~RBBS_GRIPPERALWAYS
    .clrFore& =		0
    .clrBack& =		0
    .lpText& =		0
    .cch& =			0
    .iImage& =		0
    .hwndChild& =	ReBar2&
    .cxMinChild& =	100
    .cyMinChild& =	@Height(ReBar1&) - 6
    .cx& =			800
    .hbmBack& =		0
    .wID& =			0
    .cyChild& =		@Height(ReBar1&)
    .cyMaxChild& =	@Height(ReBar1&)
    .cyIntegral& =	0
    .cxIdeal& =		0
    .lParam& =		0
    .cxHeader&	=	0
    @SendMessage(ReBar1&,~RB_INSERTBAND,1,ReBar#)

EndWith

ClearList
AddFonts
MoveListToHandle(lb1&)
MoveListToHandle(lb2&)
MoveListToHandle(lb4&)
MoveListToHandle(lb5&)

whilenot IsKey(27)

    waitinput

    If @Clicked(lb1&)

        Locate 2,105
        Print @GetString$(lb1&,@GetCurSel(lb1&))

    ElseIf @Clicked(lb2&)

        Locate 4,105
        Print @GetString$(lb2&,@GetCurSel(lb2&))

    ElseIf @Clicked(lb4&)

        Locate 6,105
        Print @GetString$(lb4&,@GetCurSel(lb4&))

    ElseIf @Clicked(lb5&)

        Locate 8,105
        Print @GetString$(lb5&,@GetCurSel(lb5&))

    EndIf

EndWhile

@DestroyWindow(ReBar1&)
@DestroyWindow(ReBar2&)
Dispose ReBar#
End
 
Viele Grüsse, Georg Hovenbitzer(Windows XP Pro, XProfan 11.2, Profan2Cpp 1.6a)
12/05/11  
 




Uwe
''Pascal''
Niemeier
Hi Georg!


How ermittle I, if right under in a the both lists one entry select becomes if these Window on the Static created get?


I use in so one drop (several items in a volume) a rahmenlosen dialog, whom I the volume zuteile:
var dlg&=control("Dialog","dlg",$50000000,0,0,100,100,%hwnd,1,0)
Also can/should any items, The the Rebar directly  unterstellt are, as Parent the Mainwindow having.


If I these both Window on the ReBar2 create come I of course on whom selected entry, but with the Repaint the Window works not More, How I get if this there?


with ReBars under Profan there vastly Problems with the Repaint, too to Messageboxen, Menüs u.Ä. (probably, because the ReBar The Order the items, durcheinanderbringt and the then not any more with the Profan-internen übereinstimmt). me helps there with want one ~RedrawWindow(%hwnd,0,0,$485)

with the first ReBar with the senkrechten Trennung becomes the Cursor to a arrow with two pointed if one over it standing, with the wagenrechten Trennung happens this not, can this Change?


have the time by SubClassing resolved, though manually (over ProcAddr/SetWindowLong), weil's in Profan yet no SubClassProc given. thereby watts a Notify-Message the ReBars abgefangen and the Cursor aimed staid. ought to I with want time raussuchen and nacharbeiten.

HTH
Pascal
 
12/09/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.101 Views

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