uis2sdk problem
Hi, I'm having problems getting a uis2 plugin to work here. But first need to complain that in addition to being way outdated, this SDK is virtually impossible to locate; without help from archive.org I would never have found it.
Then the problem at hand: When reducing the example to a minimal skeleton (sourcefiles posted below) and setting a uis2-button action to "Dll button using image":
- the button shows only in WindowBlinds/SkinStudio own windows borders, not on other windows borders.
- when pressing the button on WindowsBlinds window I get the beep on release, but after the beep I get a busy-pointer for about two seconds and then the window closes.
Edit: I'm using Visual Studio 2015 (v140) and Windows 10 FastRing Build 18305.rs_prerelease.181213-2133
wbplug.c:
/* WindowBlinds UIS2 Dll Plugin DEMO v1.1 © 1999 Stardock Systems, Inc All this code is copyright and should not be used for ANY other purpose other than making a UIS2 plugin for use with WindowBlinds. This plugin is a clock which can be embedded into the titlebar It has been designed to only show when the item is active. */ #include <windows.h> #include <wingdi.h> #include <stdio.h> #include <time.h> BOOL APIENTRY DllMain(PVOID hModule, ULONG ulReason, PCONTEXT pctx) { if (ulReason == DLL_PROCESS_ATTACH) { return TRUE; } } BOOL WBDrawMulti(HWND hWnd, HDC DC, RECT* r, int state, BOOL active, int button) { /* hWnd = Handle to window DC = Handle to Device Context r = Dimensions of item state = > 0 then its pressed, else not pressed active = This is TRUE when the window is active and FALSE when inactive */ return TRUE; } BOOL WBPress (HWND hWnd, int x, int y, int state) { // x & y are the position of the pointer // best to ignore them - For future use // The user has clicked on the button. It has not yet been released return TRUE; } BOOL WBRelease (HWND hWnd, int x, int y, int state) { // x & y are the position of the pointer // best to ignore them - For future use // The user has clicked on the button. Button released while the pointer is over item // So item has been clicked // We shall beep just to indicate something Beep(1000,500); return TRUE; } BOOL WBQuery (HWND hWnd) { // This function is for future use // For when we support timers etc return FALSE; }plugin.def:
LIBRARY plugin DESCRIPTION 'WindowBlinds Titlebar Plugin Dll' EXETYPE WINDOWS EXPORTS WBDrawMulti @1 WBPress @2 WBRelease @3 WBQuery @4