Unpickable Window

Anything QL Software or Programming Related.
User avatar
ROM Dongle
Posts: 37
Joined: Thu Jan 19, 2017 8:56 am

Unpickable Window

Postby dden » Sat Mar 24, 2018 11:04 am

Anyone know how to make an unpickable window for display of a logo?

A bit like wallpaper or a BGIMAGE in SMSQ/E, but part screen only (i.e. a window).


User avatar
Super Gold Card
Posts: 676
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway

Re: Unpickable Window

Postby pjw » Sat Mar 24, 2018 5:44 pm

I dont. But you could try a work-around, such as 1) using a graphics program to add the logo to the background image, or 2) Make a job display your logo and execute it with EXEP <path><job>, u. The latter method would require the job to do some nifty footwork to avoid disappearing or messing up your display. Finally, 3) you could find a way (I dont offhand know how) to find the location of the BGIMAGE and POKE your logo image data there..

Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
User avatar
Posts: 1629
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales

Re: Unpickable Window

Postby dilwyn » Sat Mar 31, 2018 4:45 pm

A couple of ideas for you to experiment with, dden. I emphasise these are only ideas and I've not tried these and no guarantee whatsoever if any would just be a complete waste of your time:

1. Create a job which has only a SCR channel open, loads an image into that SCR window then sets its own priority to 0 to avoid taking up too much processor time. Since this doesn't have a CON channel, it's possible pointer interface might not save the window content and no keyboard input would be possible for e.g. ESC to quit, so job removal would have to be via RJOB or similar (although the job could probably loop around at a low priority of say 1 instead checking KEYROW or sv_arbuf for a given keypress).

2. Create a job which has a con_0x0 (possible only in some versions of the operating systems) and a larger SCR channel. Never tried this to know how that would work from the point of view of save/restore window content and keyboard.

3. Locate the sources for BGIMAGE command in SMSQ/E sources (probably best to ask someone already familiar with them as it can be a tortuous process if you've never delved in them before) to see how unpickable background displays work.

Exactly what are you trying to achieve with this? Am I correct you are thinking in terms of some part-screen wallpaper or the like?

All things QL: see www.dilwyn.me.uk
Trump Card
Posts: 183
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: Unpickable Window

Postby EmmBee » Sat Mar 31, 2018 9:22 pm

It sounds as though you're going to be needing BGIMAGE. I take it this is the top left corner of the screen, Screen_base - the start address of display memory.
This can be found with PEEK_L(CHBASE(#1)+50). CHBASE can be obtained from DIY VolQ_QBASE, see: http://www.dilwyn.me.uk/tk/diytk2.zip
You'll also be needing to know the number of bytes in each row of pixels. This can be found with PEEK_W(CHBASE(#1)+100).
Adding on the number bytes will give the successive addresses down the left edge.
With this information, you can then POKE$ each row of your logo down the left-hand side of the screen.
Now, experiment using pan and scroll to get your logo to the required position.
Use LBYTES to save to a file, and then you're ready to use BGIMAGE to load in your wallpaper with the partial background image.
This is only an idea - I've never tried this. You'll probably have to experiment.


Who is online

Users browsing this forum: No registered users and 9 guests