SCROLL BARs in Child Window

28 views
Skip to first unread message

soldatino

unread,
Feb 22, 2012, 10:00:50 PM2/22/12
to xblite
I used part of the winscroll.x source and it works fine, but I need a
child window where to place my picture, so I got the scrollbars in the
child box instead of the main window, because in the child I load the
pictures. My source works fine, I use BitBlt, but the WndProc of the
mainwindow does not get the CASE $$WM_HSCROLL or CASE $$WM_VSCROLL. I
dont know if the main handle of the WndProc cannot read the
scrollbar's messages from the child or I omit something in the code
(another WndProc?). If I use the scrollbars in a main window I havent
problems ...
Thanks in advance and I apologize for my bad english
B.R.
Giovanni aka soldatino

D.

unread,
Mar 5, 2012, 3:14:12 AM3/5/12
to xblite
Without seeing your code, it is not really possible to know
how to solve your problem. If you have created a top level
window to display your images, then it needs to have its
own window procedure, another WndProc.

If you like, you can attach your *.x file to a post so we can
see what you are trying to accomplish.

D.

jo s.

unread,
Mar 7, 2012, 9:45:15 AM3/7/12
to xbl...@googlegroups.com
Thanks David,
this is the working code, that I got from examples, but if I attempt
to have child with scrollbars instead of the scrollbars in the main
window, changing the code, i am unable to get messages in the loop.
I wrote a lot of code that switch the source to the child .... but
nothing of usefull

http://www.imitidicthulhu.it/Bridge/one_win.zip

Excuse my bery bad English!
Thanks in advance!
Giovanni aka soldatino


2012/3/5 D. <david.sz...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "xblite" group.
> To post to this group, send email to xbl...@googlegroups.com.
> To unsubscribe from this group, send email to xblite+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xblite?hl=en.
>

David Szafranski

unread,
Mar 18, 2012, 4:18:34 AM3/18/12
to xbl...@googlegroups.com
I believe you would need to create a new child window using

RegisterClassA (would need to register window procedure ChildProc() )
CreateWindowExA (created with border styles and WS_HSCROLL and WS_VSCROLL)

All of your code to handle the scroll bars would be included in your new ChildProc().

Let me know if this helps.

D.

jo s.

unread,
Mar 19, 2012, 2:39:16 PM3/19/12
to xbl...@googlegroups.com
Yes, now I am sure, I feared to have a new procedure, but I hoped it
was redundant, because a listbox (for example) does not need it, I
will attempt to add the ChildProc()
Thanks!

2012/3/18 David Szafranski <david.sz...@gmail.com>:

David Szafranski

unread,
Mar 19, 2012, 7:19:20 PM3/19/12
to xbl...@googlegroups.com
Well, a listbox control already has the scroll bars built into the control. You are
basically creating a custom control.

If you want, you could also just use one of the custom controls included with xblite.
Take a look at the canvas control. You can find examples of using this control
in the \xblite\demo\custctls\canvas folder.

The canvas control can be used to display images or for drawing purposes. It
has the scrollbars built-in.

D.
Reply all
Reply to author
Forward
0 new messages