COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 08-11-2020, 02:49 AM   #1
TonyGlover
Human being with feelings
 
TonyGlover's Avatar
 
Join Date: Mar 2016
Posts: 67
Default SetCursor in XCode it gives me errors

How can I change the cursor for OSX ?

NSCursor *arr_lr= [NSCursor resizeLeftRight];
SetCursor((HCURSOR)arr_lr);

Give me this error: "SWELL_SetCursor(HCURSOR__*)", referenced from...

Also

SetCursor(LoadCursor(NULL, resizeLeftRight));

Give me the same error
TonyGlover is offline   Reply With Quote
Old 08-11-2020, 07:55 AM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

This seems to work here:

Code:
#include "WDL/swell/swell.h"

...

SetCursor(LoadCursor(NULL, IDC_SIZEWE));
Note that if this is for IPlug, then you will need to add swell-kb.mm and swell-dlggen.h tom your project.
Tale is offline   Reply With Quote
Old 08-12-2020, 07:11 AM   #3
TonyGlover
Human being with feelings
 
TonyGlover's Avatar
 
Join Date: Mar 2016
Posts: 67
Default

Thanks, now compiling successfully. But the mouse icon does not change, nothing happens trying this code in my custom control:
Code:
	
	void OnMouseDown(int x, int y, IMouseMod* pMod) {
		if (pMod->R) {
			mValue = 1;			
			return ValToMouse(x, y, false, true);
		}
		SetCursor(LoadCursor(NULL, IDC_SIZEWE));

		return ValToMouse(x, y, true);
	}
The mouse is still the default arrow
TonyGlover is offline   Reply With Quote
Old 08-13-2020, 02:01 AM   #4
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

Well, it seems to work fine here, both with VST2 and AU, as tested in REAPER. Do note that I'm using my own IPlug version, not WDL-OL or IPlug2.
Tale 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 11:04 PM.


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