May 01, 2024, 11:44:46 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


wparam

Started by ExMember001, February 11, 2007, 08:36:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

Hi,
i have a problem with the api :
IMPORT Unsigned INT DragQueryFile ALIAS DragQueryFileA(INT hdrop, INT iFile, STRING lpszFile, INT cch);

where do i get the hdrop?
in Emergence i use @WPARAM...
in c they use (HANDLE)wParam...
how can i do that with Aurora ?

sapero

You have the wparam in method parameters :)
CWnd::WndProc(unsigned int message, unsigned int wparam /*here*/, unsigned int lparam),int
{
if (message == WM_DROPFILES)
{
dstring path[MAX_PATH];
int index = 0;
// get number of files
UINT count   = DragQueryFile(wparam, -1, NULL, 0);
// get required buffer lenght for first file
UINT pathlen = DragQueryFile(wparam, 0, NULL, 0) + 1;
// get the second file
UINT cch     = DragQueryFile(wparam, 1, &path, MAX_PATH-1);
if (cch)
{
//OpenFile(path
}

ExMember001

Great, thank you Sapero  ;D