Patch Update - WM_DROPFILES Bug fix
FIX : Le Bug du message WM_DROPFILES lors d'un message WM_SIZE
This commit is contained in:
parent
df9d7c97c0
commit
aba9b9b6f3
@ -206,23 +206,36 @@ LRESULT CALLBACK SystemClass::MessageHandler(HWND hwnd, UINT umsg, WPARAM wparam
|
||||
m_initialWindowHeight = newHeight;
|
||||
}
|
||||
}
|
||||
case WM_ENTERSIZEMOVE:
|
||||
{
|
||||
m_isResizing = true;
|
||||
break;
|
||||
}
|
||||
case WM_EXITSIZEMOVE:
|
||||
{
|
||||
m_isResizing = false;
|
||||
break;
|
||||
}
|
||||
case WM_DROPFILES:
|
||||
{
|
||||
HDROP hDrop = reinterpret_cast<HDROP>(wparam);
|
||||
UINT numFiles = DragQueryFile(hDrop, 0xFFFFFFFF, nullptr, 0);
|
||||
if (!m_isResizing)
|
||||
{
|
||||
HDROP hDrop = reinterpret_cast<HDROP>(wparam);
|
||||
UINT numFiles = DragQueryFile(hDrop, 0xFFFFFFFF, nullptr, 0);
|
||||
|
||||
if (numFiles > 0) {
|
||||
// Handle dropped files here
|
||||
for (UINT i = 0; i < numFiles; ++i) {
|
||||
// Get the file name
|
||||
WCHAR filePath[MAX_PATH];
|
||||
DragQueryFile(hDrop, i, filePath, MAX_PATH);
|
||||
std::wcout << L"File dropped: " << filePath << std::endl;
|
||||
m_Application->AddKobject(filePath);
|
||||
}
|
||||
}
|
||||
if (numFiles > 0 && m_Application != nullptr) {
|
||||
// Handle dropped files here
|
||||
for (UINT i = 0; i < numFiles; ++i) {
|
||||
// Get the file name
|
||||
WCHAR filePath[MAX_PATH];
|
||||
DragQueryFile(hDrop, i, filePath, MAX_PATH);
|
||||
std::wcout << L"File dropped: " << filePath << std::endl;
|
||||
m_Application->AddKobject(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
DragFinish(hDrop);
|
||||
DragFinish(hDrop);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// Any other messages send to the default message handler as our application won't make use of them.
|
||||
|
@ -156,6 +156,7 @@ private :
|
||||
FpsClass* m_Fps;
|
||||
TextClass* m_FpsString;
|
||||
int m_previousFps;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -37,6 +37,7 @@ private:
|
||||
int m_initialWindowWidth;
|
||||
int m_initialWindowHeight;
|
||||
bool m_isDirect3DInitialized;
|
||||
bool m_isResizing = false;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user