Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Window transparent MASK ~SKINS [Re: EvilSOB] #272101
06/16/09 13:38
06/16/09 13:38
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
setatributte layers dont work on child ( i read that os MSND) but the hwnd is not a child.. so i guess thats not an issue..
Ok i have vista.. and i can see the video alpha thing.. actually the setatributte does exaclty the same thing as video alpha.. i think video alpha function is using the Api indirectly

Re: Window transparent MASK ~SKINS [Re: MMike] #272109
06/16/09 14:02
06/16/09 14:02
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I think so too. I just think there may be an issue with the alpha being
reliable on XP machines. Even JCL seems a little muddled on it ATM.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Window transparent MASK ~SKINS [Re: EvilSOB] #272915
06/20/09 13:48
06/20/09 13:48
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
No go, Alpha cant be trusted with XP, at least not till A7 moves on to
a newer DirectX SDK in its source, if ever. I would guess that will be called A8.
Its just an XP thing. SP3 was supposed to fix it, but not in all cases unfortunately,
That includes my 3 PC's.....

So Im afraid I cant help, for now anyway. Im re-building one of my home machines,
so it may end up dual-booting between XP and Vista.
If so I'll try looking into the problew again on that machine.
That could take a week or so, due to me being on night shift ATM...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Window transparent MASK ~SKINS [Re: EvilSOB] #291105
09/23/09 13:05
09/23/09 13:05
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
LOl i dont know how, but i Solved.

I have MASKing Skins now working.

Re: Window transparent MASK ~SKINS [Re: MMike] #291130
09/23/09 14:50
09/23/09 14:50
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline
Junior Member
GorNaKosh  Offline
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
can you give us a working example of the code, please? seems to be interessting for some design ideas laugh

Re: Window transparent MASK ~SKINS [Re: GorNaKosh] #291132
09/23/09 14:54
09/23/09 14:54
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
ok all you need to do is:

//declare stuff: MAYBE SOME ARE NOT NECESSARY BUT SINCE IM TESTING SOME OTHE THINGS...
Code:
#include <acknex.h>
#include <default.c>
//#include <extra.c>
#include <windows.h>
#include <stdio.h>		//Stanard C
#include <windows.h>		//Windows API
#include <d3d9.h>			//direct X 9

#define WS_EX_LAYERED 0x00080000
//#define _WIN32_WINNT    0x0500
#define LWA_ALPHA 0x00000002 
#define LWA_COLORKEY 0x00000001 
//#define ULW_ALPHA  0x00000002
//declare the API not included in window...
API(SetLayeredWindowAttributes,user32)
API(UpdateLayeredWindow,user32)
// declare the function API


BOOL __stdcall SetLayeredWindowAttributes(HWND hWnd, DWORD crKey, BYTE bAlpha, DWORD uFlags);

//PANEL WITH THE IMAGE.. TRY A KEY COLOR BACKGRUD
PANEL* my_panel =
{
	pos_x =0 ;
	pos_y = 0;
    bmap="alpha.png";
	//digits(20,20, "SKINS", "Arial#40bi", 1, "Hello"); 
 
	flags = SHOW | FILTER ;
}

function main(){

video_window(NULL,NULL,256,NULL);
video_set(my_panel.size_x,my_panel.size_y,0,0);
video_window(NULL,NULL,1,NULL);
SetWindowLong(hWnd,GWL_EXSTYLE ,GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
SetLayeredWindowAttributes (hWnd,RGB(255,0,192),255,LWA_COLORKEY );  

//CHANGE THE RGB UP HERE; TO SET THE KEY COLOr!!
wait(-5);
sys_exit(NULL);


}



Re: Window transparent MASK ~SKINS [Re: MMike] #291139
09/23/09 14:59
09/23/09 14:59
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
Now this workd very good, but im reading information to see if i can put it to alpha blend PNG files, with the alpha channel, so you see the smooth transparency and not one level transparency only..



I have this link,Some expert maybe could help me:


Link 1
blending alpha - Per pixel alpha
VISTA COMPLETE EFFECT BLUR/KEYBLENDING and OTHERS , Cimage Class RECOMENDED!

Last edited by MMike; 09/23/09 15:04.
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1