Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 09-22-2018, 08:35 AM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default Using CoolScrollBar from C++ extension: undocumented functions?

I am trying to use the CoolScrollBar library's CoolSB_GetScrollInfo function in an extension, but I can't get the extension to build when I link to that library.

One of the errors is that "CoolSB_GetSysColor" is an unresolved symbol.

In CoolScroll.h, I see this:
Code:
// TO BE IMPLEMENTED BY APP:
void *GetIconThemePointer(const char *name); // implemented by calling app, can return a LICE_IBitmap **img for "scrollbar"
int CoolSB_GetSysColor(HWND hwnd, int val); // can be a passthrough to GetSysColor()
How is this implemented by the app? Should I define something similar to SWELL_PROVIDED_BY_APP?


Even stranger, SWS does not seem to link to CoolScroll, but instead does the following, in sws_rpf_wrapper.h:
Code:
// reaper_plugin_functions.h (rpf) needs a little help, so instead of modifying
// the file directly, and needing to remodify with each rebuild of the file,
// fix some things here.
#ifdef REAPERAPI_IMPLEMENT
#define REAPER_EXTRA_API_DECL
#else
#define REAPER_EXTRA_API_DECL extern
#endif

// Not included in reaper_plugin_functions.h, so include here:
REAPER_EXTRA_API_DECL void (*AttachWindowTopmostButton)(HWND hwnd);
REAPER_EXTRA_API_DECL void (*AttachWindowResizeGrip)(HWND hwnd);
REAPER_EXTRA_API_DECL BOOL (*RemoveXPStyle)(HWND hwnd, int rm);
REAPER_EXTRA_API_DECL BOOL (WINAPI *CoolSB_GetScrollInfo)(HWND hwnd, int nBar, LPSCROLLINFO lpsi);
REAPER_EXTRA_API_DECL int (WINAPI *CoolSB_SetScrollInfo)(HWND hwnd, int nBar, LPSCROLLINFO lpsi, BOOL fRedraw);
(WINAPI is simply defined as "__stdcall".)

and then loads CoolSB_GetScrollInfo like any other REAPER API function:
Code:
IMPAPI(CoolSB_GetScrollInfo);
IMPAPI(CoolSB_SetScrollInfo);
Does this mean the CoolSB_GetScrollInfo, AttachWindowTopmostButton and the other functions are undocumented API functions?!?
juliansader is offline   Reply With Quote
Old 09-22-2018, 01:11 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by juliansader View Post
Does this mean the CoolSB_GetScrollInfo, AttachWindowTopmostButton and the other functions are undocumented API functions?!?
Yes. It's the same for the localization API...

Last edited by cfillion; 09-22-2018 at 03:34 PM.
cfillion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.