forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Clip Desktop Space
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Sun Sep 21, 2003 6:09 pm    Post subject: Clip Desktop Space Reply with quote

Is there a way with API to clip out a space on the desktop, the way the taskbar does when always ontop? I looked in the Win32 help file, but, could not find anything.

Thanks

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Sep 21, 2003 6:25 pm    Post subject: Reply with quote

Quote:
to clip out a space on the desktop

I doubt if the task bar does that. You can make your app bar(i suppose) on top with the desktop window which you can obtain through API. But on NT based systems I think you need to deal with some privileges etc if you are drawing on to desktop window etc. May be some one has better Ideas ?
EDIT:
I am now getting some idea as to what - You do like that for a window by using SetWindowRgn I don't know if it works with desktop window.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Sep 21, 2003 7:25 pm    Post subject: Reply with quote

It is possible of course, but not sure in VDS. I saw an example in another
language once, and I tried my hind end off to find a way in VDS at the time
to do this also.

If anyone can figure it out, it'll be codescript or dragonsphere.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Sep 21, 2003 7:40 pm    Post subject: Reply with quote

The Microsoft Office Shortcut Bar does this with great ease, it doesn't
take long or anything, and clips the desktop space fast. I'll see if I can
find any examples in another programming language for this. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1753
Location: Space and Time

PostPosted: Sun Sep 21, 2003 8:27 pm    Post subject: Reply with quote

FreezingFire wrote:
The Microsoft Office Shortcut Bar does this with great ease, it doesn't
take long or anything, and clips the desktop space fast. I'll see if I can
find any examples in another programming language for this. Smile


That would be great FF, thanks!

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Mon Sep 22, 2003 3:38 am    Post subject: Reply with quote

I think definately you would have to create an appbar similar to the windows taskbar but define the size as you see fit. Also the appbar must be anchored to an edge of the screen. I don't know if this is possible in VDS to build or not alone, however it's likely gadget can do this since it's api abilities are more robust.

The Windows Api suggest sending a ABM_NEW message to register a new appbar. This message requires a APPBARDATA structure which consists of the size of the appbardata, handle of appbar, callback message identifier, edge flags, rect structure
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Sep 22, 2003 3:41 am    Post subject: Reply with quote

I'm sure it'd be fun in VDS, but to start with you need a toolwindow(same as SMALLCAP in VDS?) and to use SHAppBarMessage to register it as an AppBar. You can find some info at:
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shappbarmessage.asp

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Mon Sep 22, 2003 11:03 am    Post subject: Reply with quote

I have written a crude code.
I am unsure how to manage the the CallbackMessage member as there is nothing equivalent in VDS.
In VB one can use AddressOf function. I have set it to zero.
Obvoiusly then it won't work althogh return codes are OK.
Some one have a idea for workaround.
Code:
  DIALOG CREATE,App Bar window,-1,0,252,172,class appwin
  DIALOG ADD,BUTTON,BUTTON1,140,91,64,24,BUTTON1
  LOADLIB USER32
  LOADLIB SHELL32
  REM SMALL CAP STYLE MAY NOT WORK WITH SOME API FUNCTIONS SO
  REM CHANGE THE WONDOW STYLE TO A TOOL WINDOW USING API Smile
  %H = @STRDEL(@WINEXISTS(#appwin),1,1)
  %A = @LIB(USER32,GetWindowLongA,INT:,INT:%H,INT:-20)
  %B = @LIB(USER32,SetWindowLongA,INT:,INT:%H,INT:-20,@SUM(%A,$80))
  DIALOG SHOW

 
:EVLOOP
WAIT EVENT
GOTO @EVENT()

:BUTTON1BUTTON
REM Define the APPBARDATA structure
%R = @BINARY(DWORD,0)@BINARY(DWORD,0)@BINARY(DWORD,300)@BINARY(DWORD,50)
%Z = @BINARY(DWORD,24)@BINARY(DWORD,%H)@BINARY(DWORD,0)@BINARY(DWORD,2)@ADDR("%R")@BINARY(DWORD,0)
%S = @BINARY(DWORD,@SUM(@LEN(%Z),1))@BINARY(DWORD,%H)@BINARY(DWORD,0)@BINARY(DWORD,2)@ADDR("%R")@BINARY(DWORD,0)
REM Register the taskbar
%A = @LIB(SHELL32,SHAppBarMessage,BOOL:,INT:$0,@ADDR("%S"))
REM Position the Taskbar
%B = @LIB(SHELL32,SHAppBarMessage,BOOL:,INT:$3,@ADDR("%S"))
INFO %A|%B are return codes if 1|1 success but did anything happen ?
GOTO EVLOOP


:CLOSE
FREELIB USER32
FREELIB SHELL32
EXIT

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Mon Sep 22, 2003 5:37 pm    Post subject: Reply with quote

The callback just wants a message number to send to your appbar. You should be able to use OPTION MSGEVENT.
_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue Sep 23, 2003 6:17 am    Post subject: Reply with quote

Somehow I don't seem to get it work even using WM_USER+num message number as callback. Most likely problem with structure. I will give a try in VB. If it works that can be used I think ?
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Sep 25, 2003 2:42 pm    Post subject: Reply with quote

CodeScript wrote:
Somehow I don't seem to get it work even using WM_USER+num message number as callback. Most likely problem with structure. I will give a try in VB. If it works that can be used I think ?


CodeScript you have to register the message Name first with the RegisterWindowMessage API.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Sep 26, 2003 6:17 pm    Post subject: Reply with quote

No it didn't work Sad

I haven't found a way in VDS as of now though i have
been able to do it in VB.
I will shortly post a VB activex dll for those who like VB Wink .

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Sep 27, 2003 2:34 pm    Post subject: Reply with quote

OK here is the dll for those who don't have any problems having VB 6 runtime on their system.
It comes along with XP operating system.
I do understand some may not like having the VB runtime on
their system.
http://codescript.vdsworld.com/VDS5src/appbar.zip

A DSU wraps all the functions including registering the dll into easy VDS commands.
Most of you might be using many freewres wriiten in VB.
So u might be already having VB6 runtime.
If you don't then you can download it here.
http://codescript.vdsworld.com/VDS5src/msvbvm60.zip
If someone succeeds in pure VDS let me know.

Enjoy.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sat Sep 27, 2003 8:01 pm    Post subject: Reply with quote

Codescript, thanks for looking into this for everyone and also for providing
a work around via the vb dll. Smile I know I appreciate it. I've been
waiting for a solution to this for a few years now for two apps that I've been
holding here all this time.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Sep 28, 2003 2:00 am    Post subject: Reply with quote

Thanks Garett for the compliments. Smile
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group