mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Add support for file drag drop
This commit is contained in:
parent
73376d2f75
commit
6d2803dbb1
7 changed files with 94 additions and 18 deletions
|
@ -162,7 +162,10 @@ WinBFWindow::WinBFWindow(BFWindow* parent, const StringImpl& title, int x, int y
|
|||
if (windowFlags & BFWINDOW_MAXIMIZE)
|
||||
aWindowFlags |= WS_MAXIMIZEBOX;
|
||||
if ((windowFlags & BFWINDOW_TOPMOST) && (parent == NULL))
|
||||
windowFlagsEx |= WS_EX_TOPMOST;
|
||||
windowFlagsEx |= WS_EX_TOPMOST;
|
||||
if ((windowFlags & BFWINDOW_ACCEPTFILES))
|
||||
windowFlagsEx |= WS_EX_ACCEPTFILES;
|
||||
|
||||
if (windowFlags & BFWINDOW_CLIENT_SIZED)
|
||||
{
|
||||
RECT rect = {0, 0, width, height};
|
||||
|
@ -1123,6 +1126,18 @@ LRESULT WinBFWindow::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
|
|||
case WM_INPUTLANGCHANGE:
|
||||
mKeyLayoutHasAltGr = (KeyboardLayoutHasAltGr((HKL)lParam) == TRUE);
|
||||
break;
|
||||
|
||||
case WM_DROPFILES:
|
||||
{
|
||||
HDROP hDropInfo = (HDROP)wParam;
|
||||
char sItem[MAX_PATH];
|
||||
|
||||
for(int i = 0; DragQueryFileA(hDropInfo, i, (LPSTR)sItem, sizeof(sItem)); i++)
|
||||
mDragDropFileFunc(this, sItem);
|
||||
|
||||
DragFinish(hDropInfo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
app->mInMsgProc = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue