Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Transparent shell..
Transparent shell.. [message #448150] Tue, 04 January 2005 05:17
hiko is currently offline hikoFriend
Messages: 5
Registered: July 2009
Junior Member
I found a message in this newsgroup before and I couldnt get the DLL working
I always got UnSatisifedLinkError and I'm not good at C++ so here is my C++
source code for DLL, could anyone tell me whats wrong and which steps should
I take after compile the DLL file properly? should I register it? by the way
I put the dll file under system32, thanks..

#include <stdafx.h>
#include <jni.h>
#include "resource.h"

static PSLWA pSetLayeredWindowAttributes = NULL;
static BOOL initialized = FALSE;
#define WS_EX_LAYERED 0x00080000
HINSTANCE g_hInstance = NULL;
#define LWA_COLORKEY 0x00000001
#define LWA_ALPHA 0x00000002

JNIEXPORT jboolean JNICALL Java_OSEx_SetLayeredWindowAttributes(JNIEnv *env,
jclass theClass, jint windowHandle, jobject crKey, jint alpha,jint flags) {
printf( "%d\n", GetLastError() ); // error catching
if (!initialized)
HMODULE hDLL = LoadLibrary ("user32");

printf( "%d\n", GetLastError() ); // error catching
pSetLayeredWindowAttributes =
(PSLWA) GetProcAddress(hDLL, "SetLayeredWindowAttributes");

initialized = TRUE;
pSetLayeredWindowAttributes((HWND)windowHandle, (COLORREF)RGB(255,255,255),
(BYTE)alpha, (DWORD)flags );
return( 0 );
Previous Topic:Why are SWT.SHIFT and SWT.RIGHT detected as duplicated in switch-case loop.
Next Topic:Menus on MAC problem. URGENT!
Goto Forum:

Current Time: Wed May 19 03:42:52 GMT 2021

Powered by FUDForum. Page generated in 0.01260 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top