flat assembler
Message board for the users of flat assembler.

Index > Windows > Window with scrollable client area.

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 03 Oct 2004, 15:21
In the attachement is simple example how to create window that have virtual client are bigger than actual client size of the window. You can create child windows no coordinates outside client area and reach them using scrollbars.

All related procedures are separated to the file 'scrollbars.asm'. You can implement this behaviour to any window - just call needed procedure from window procedure of the window.

This is the first version and definately have bugs and can be improved. Any sugestions and bug reports are welcome.

Regards


Last edited by JohnFound on 05 Oct 2004, 06:32; edited 1 time in total
Post 03 Oct 2004, 15:21
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
iklin



Joined: 20 Mar 2004
Posts: 120
Location: Russia, Siberia
iklin 04 Oct 2004, 15:20
Well, it doesn't scroll! On my w2k.
Post 04 Oct 2004, 15:20
View user's profile Send private message ICQ Number Reply with quote
Frank



Joined: 17 Jun 2003
Posts: 100
Frank 04 Oct 2004, 16:36
It doesn't scroll on Win2000 or WinXP.

From a quick glance at both the source code and win32.hlp, I guess that one line is missing in "_DoCorrectChildren": "mov [.defer], eax" seems to be required not only after the initial call to BeginDeferWindowPos, but also after each (successful) call to DeferWindowPos.

I can't recompile and try it out, sorry (no FRESH installed).
Post 04 Oct 2004, 16:36
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 05 Oct 2004, 06:09
Yea, it was buggy. The problem is not exactly in the "mov [.defer], eax" although it have to stay there. The problem was in DeferWindowPos invoke - it needed SWP_NOSENDCHANGING not to be included in the flags...

Here is fixed version. It works at least for me in Win2k. I can't make test under WinXP.

Frank, you can compile it with FASM too. Only put somewere include directory of Fresh and set environment variable "%finc%" to this path. You have to compile the file "Main.asm" and you will get executable "Main.exe" but it is the same.

Regards


Description:
Download
Filename: ScrollBox.zip
Filesize: 6.77 KB
Downloaded: 391 Time(s)

Post 05 Oct 2004, 06:09
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Frank



Joined: 17 Jun 2003
Posts: 100
Frank 05 Oct 2004, 17:16
The new program scrolls nicely on both Win2k SP4 and WinXP SP2 Smile

Compiling doesn't work for me, however. A couple of include-files seem to be missing (installation: fresh1_1_7.cab, as downloaded yesterday). See the screenshot for details.


Description: Screen shot
Filesize: 14.06 KB
Viewed: 4013 Time(s)

fresh-1.1.7.png


Post 05 Oct 2004, 17:16
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 06 Oct 2004, 05:36
Hi, Frank.
Actually you don't need these files ('lists.asm' and 'lists.inc') to compile Scrollbox example. Simply delete include statements. They remain there from my another experiments, sorry. Anyway you can find this library in "sources" directory. Since 1.1.7 I decided that it is finished enough to stay in %finc%\libs\ Smile

Regards
Post 06 Oct 2004, 05:36
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Frank



Joined: 17 Jun 2003
Posts: 100
Frank 06 Oct 2004, 09:48
Okay, thank you.
Post 06 Oct 2004, 09:48
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.