mIRC Home    About    Download    Register    News    Help

Print Thread
Custom Window on Desktop With Transparent Bkg #237292 24/04/12 06:30 AM
Joined: Aug 2008
Posts: 16
T
thenapalmtheory Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Aug 2008
Posts: 16
So I basically want to have a @window with rounded corners and this is what I have so far:

Code:
alias dtv.drbkg {
  var %win = @dtv.bkg | if ($window(%win)) close -@ %win
  window -Bphf +d %win 1 1 150 300
  drawrect %win 1 2 0 0 150 300
  drawrect -fd %win 14 1 0 0 150 300 10 10
  drawrect -fd %win 15 1 1 1 148 298 10 10
  drawrect -fd %win 0 1 2 2 146 296 10 10
  drawsave %win $scriptdirdtv_bkg.bmp
  close -@ %win  
}


I can't seem to get rid of the tiny corners on the rounded edge. Is there a way to do this without a .dll?

Re: Custom Window on Desktop With Transparent Bkg [Re: thenapalmtheory] #237293 24/04/12 06:55 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
you can /setlayer 128 @window to make it 50% transparent (the range is 0-255, 255 being fully opaque). It's not a supported/documented feature, and only works on desktop windows, though.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Custom Window on Desktop With Transparent Bkg [Re: argv0] #237305 24/04/12 11:58 PM
Joined: Aug 2008
Posts: 16
T
thenapalmtheory Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Aug 2008
Posts: 16
Quote:
/setlayer 128 @window


That makes the entire window (and everything drawn to it) transparent. This is not what I'm looking for.

The alias I posted before, coupled with this alias:

Code:
alias dtv.win {
  var %win @dtv , %bkg $scriptdirdtv_bkg.bmp
  if (!$exists(%bkg)) dtv.drbkg
  if ($window(%win)) close -@ %win
  window -Bdpf +nd %win 1 1 150 300
  drawpic -t %win 0 0 0 %bkg
}


It draws the pic and makes the 'black' corners disappear but only to show the window color beneath. How would I get the window color not visible, but what is drawn to it visible and NOT transparent? I don't want to see the background color of the @Window.

Re: Custom Window on Desktop With Transparent Bkg [Re: thenapalmtheory] #237307 25/04/12 02:48 AM
Joined: Aug 2008
Posts: 16
T
thenapalmtheory Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Aug 2008
Posts: 16
Just to be clear, I'm wanting a @Window with an INVISIBLE background so I can create custom rounded window borders.

Re: Custom Window on Desktop With Transparent Bkg [Re: thenapalmtheory] #237313 25/04/12 11:19 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
This can't be done with anything in mIRC right now.

My guess is, for your functionality to be added, mIRC would have to change the way it draws picture windows in order to allow a transparent background but still draw opaque data on top. mIRC would have to explicitly support this mode. I'm not sure it's worthwhile, given that it's not that commonly needed. You're better off with a dll in the meantime.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Custom Window on Desktop With Transparent Bkg [Re: argv0] #237324 25/04/12 11:40 PM
Joined: Aug 2008
Posts: 16
T
thenapalmtheory Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Aug 2008
Posts: 16
Booooo. I guess I'll go with a square window as I don't want to include any dlls. Thanks for the info.