I have a custom control from which I want to spawn a new window. Then I want to pass a substantial graphic to the new window to use as a cursor.
I'm hoping to spawn the new window from within the control's OnLButtonDown message handler.
After having done a fair amount of research into how I might do this I think this article 'Set cursor for a child window' purports to solve most nearly the problem I have than anything else I have found...
http://www.cplusplus.com/forum/windows/61689/[
^]
I have replicated the call back function and put it in place.
In my OnLButtonDown function I have
HWND hDialog = CreateWindow(WC_DIALOG, _T("Win32 testing"), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
200, 200, 500, 400, NULL, NULL, hInst, NULL);
SetWindowLongPtrW(hDialog, DWLP_DLGPROC, &CScrollBarEx::DialogProc);
::SendMessage(hDialog, WM_INIT, 0, (LPARAM)hInst);
but am having trouble getting the SetWindowLongPtrW call to get past the compiler. I have tried a number of casts etc on the last parameter but can't eliminate the following error...
cannot convert parameter 3 from 'INT_PTR (__stdcall CScrollBarEx::* )(HWND,UINT,WPARAM,LPARAM)' to 'LONG'
I am prepared to accept the probable fact that I am completely out of my depth here. If this is the case then please let me know - preferably with a kindly direction towards shallower water...