Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OleDropSource Support #5

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions src/wfdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,24 @@ DirWndProc(
DirReadDestroyWindow(hwnd);
break;

case WM_MDISETMENU:
OutputDebugString(L"WM_MDISETMENU\n");
break;

case WM_ENTERSIZEMOVE:
OutputDebugString(L"WM_ENTERSIZEMOVE\n");
break;

case WM_EXITSIZEMOVE:
OutputDebugString(L"WM_EXITSIZEMOVE\n");
break;

case WM_BEGINDRAG:
OutputDebugString(L"WM_BEGINDRAG\n");
break;

case WM_DRAGLOOP:
// OutputDebugString(L"WM_DRAGLOOP\n");

// WM_DRAGLOOP is sent to the source window as the object is moved.
//
Expand All @@ -693,10 +710,10 @@ DirWndProc(
break;

case WM_DRAGSELECT:

{
// WM_DRAGSELECT is sent to a sink whenever an new object is dragged
// inside of it.
//
//y
// wParam: TRUE if the sink is being entered, FALSE if it's being
// exited.
// lParam: LPDROPSTRUCT
Expand All @@ -705,6 +722,18 @@ DirWndProc(
// DRAGSELECT is used to turn our selection rectangle on or off.
// Turn on/off status bar

if (!wParam)
{
OleInitialize(0);
WF_IDropSource *pDropSource;
HRESULT hr = RegisterDropSource(&pDropSource);

WCHAR str[MAX_PATH];
wsprintf(str, L"WM_DRAGSELECT RegisterDropSource wparam %d, lparam %d, %08x\n", wParam, lParam, hr);
OutputDebugString(str);

}

SendMessage(hwndStatus,
SB_SETTEXT,
SBT_NOBORDERS|255,
Expand All @@ -717,13 +746,13 @@ DirWndProc(

UpdateWindow(hwndStatus);

#define lpds ((LPDROPSTRUCT)lParam)
// #define lpds ((LPDROPSTRUCT)lParam)
LPDROPSTRUCT lpds = (LPDROPSTRUCT)lParam;

iSelHighlight = lpds->dwControlData;
DSRectItem(hwndLB, iSelHighlight, (BOOL)wParam, FALSE);
break;

#undef lpds
}

case WM_DRAGMOVE:

Expand Down Expand Up @@ -837,6 +866,9 @@ DirWndProc(
if (hwndLB != GetFocus())
SetFocus(hwndLB);

WF_IDropSource *pDropSource;
// RegisterDropSource(&pDropSource);

break;

case WM_COMMAND:
Expand Down
Loading