IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: ExMember001 on February 11, 2007, 08:36:03 PM

Title: wparam
Post by: ExMember001 on February 11, 2007, 08:36:03 PM
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 ?
Title: Re: wparam
Post by: sapero on February 12, 2007, 04:20:39 AM
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
}
Title: Re: wparam
Post by: ExMember001 on February 12, 2007, 06:00:32 PM
Great, thank you Sapero  ;D