Hi All
This is my attempt to convert Iczelion tutorials to HLA.
This is my attempt to convert Iczelion tutorials to HLA.
[*]All code was compiled with HLA v 1.47
[*]All code was written with RadASM v 2.0.1.8 So RadASM project files(.rap; .mnu ; .dlg) included.
[*]While working at convertions I found several errors in hhf files included with HLA package. That's why I post updated includes also.
Edit:
04-Apr-2003 Tutorial #22 added. Includes not changed.
Hi All
This is my attempt to convert Iczelion tutorials to HLA.
[*]All code was compiled with HLA v 1.47
[*]All code was written with RadASM v 2.0.1.8 So RadASM project files(.rap; .mnu ; .dlg) included.
[*]While working at convertions I found several errors in hhf files included with HLA package. That's why I post updated includes also.
Edit:
04-Apr-2003 Tutorial #22 added. Includes not changed.
Great!
Thanks a lot.
I'll add these to the next release.
(I was trying to get v1.48 out the door tonight, but with these
changes I'll probably have to do it tomorrow night).
Cheers,
Randy Hyde
Hi All
New convertion:
Itczelion Tutorial #23: Tray Icon + shell32.hhf
New convertion:
Itczelion Tutorial #23: Tray Icon + shell32.hhf
many thanks ! GREAT WORK!
Hi All
New convertion:
Itczelion Tutorial #24: "Windows Hooks"
IMHO so far this tute is the most intresting of all Iczelion tutes I converted.
It cost me much sweat:) There is a couple of points related to this tute I'd like to tell about.
1.
mhook.dll module from this tutorial uses WindowFromPoint API function, that resides in user32.dll. The point is that WindowFromPoint actually recieves two parameters not one as MSDN reference tells us.
WindowFromPoint as defined in MSDN
("http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/windowfrompoint.asp")
Syntax
HWND WindowFromPoint( POINT Point );
Parameters
Point
Specifies a POINT structure that defines the point to be checked.
This parameter is a pointer to POINT structure that contains x and y coords of mouse.
While actually it recieves two coords separatly (_Point.x, _Point.y). user32.hhf defines WindowFromPoint also with one parameter.
2.
First call of SetDlgItemText works fine. It changes text on the button. Three following calls supposed to wipe out content of 3 edit boxes. But it is not the case neither in original Itczelion app nor in my convertion:(
Somebody knows what's wrong with this code?
Best Regards
GJ
New convertion:
Itczelion Tutorial #24: "Windows Hooks"
IMHO so far this tute is the most intresting of all Iczelion tutes I converted.
It cost me much sweat:) There is a couple of points related to this tute I'd like to tell about.
1.
mhook.dll module from this tutorial uses WindowFromPoint API function, that resides in user32.dll. The point is that WindowFromPoint actually recieves two parameters not one as MSDN reference tells us.
WindowFromPoint as defined in MSDN
("http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/windowfrompoint.asp")
Syntax
HWND WindowFromPoint( POINT Point );
Parameters
Point
Specifies a POINT structure that defines the point to be checked.
This parameter is a pointer to POINT structure that contains x and y coords of mouse.
While actually it recieves two coords separatly (_Point.x, _Point.y). user32.hhf defines WindowFromPoint also with one parameter.
2.
UninstallHook();
mov(false,HookFlag);
w.SetDlgItemText(hDlg,IDC_HOOK,HookText);
w.SetDlgItemText(hDlg,IDC_CLASSNAME,NULL);
w.SetDlgItemText(hDlg,IDC_HANDLE,NULL);
w.SetDlgItemText(hDlg,IDC_WNDPROC,NULL);
First call of SetDlgItemText works fine. It changes text on the button. Three following calls supposed to wipe out content of 3 edit boxes. But it is not the case neither in original Itczelion app nor in my convertion:(
Somebody knows what's wrong with this code?
Best Regards
GJ
1.
mhook.dll module from this tutorial uses WindowFromPoint API function, that resides in user32.dll. The point is that WindowFromPoint actually recieves two parameters not one as MSDN reference tells us.
The MSDN reference is correct, it *is* one parameter, it's just not a dword. Don't forget that number of parameters does not necessarily have to equal total_parameters_byte_size / 4 (although it does in 99% of the cases).
This parameter is a pointer to POINT structure that contains x and y coords of mouse.
No it isn't, that would have been "POINT *Point" (or most likely POINT * lpPoint). POINT Point (without the asterix) is passing by value.
Thomas
Hi Thomas
Thank you for comment. Just never before encountered with such cases.
Intresting how it is implemented inside a function?
So definition of WindowFromPoint in user32.hhf is also correct.
It works...
It works also ...
:confused:
This tutorial is driving me mad.:)
Regards
GJ
Thank you for comment. Just never before encountered with such cases.
Intresting how it is implemented inside a function?
So definition of WindowFromPoint in user32.hhf is also correct.
It works...
WindowFromPoint: procedure
(
_Point : POINT
);
@stdcall;
@returns( "eax" );
@external( "__imp__WindowFromPoint@8" );
.....
w.CallNextHookEx(hHook,nCode,wParam,lParam);
mov(lParam,edx);
w.WindowFromPoint((type w.MOUSEHOOKSTRUCT [edx]).pt);
It works also ...
WindowFromPoint: procedure
(
[B](p0:dword; p1:dword);[/B]
);
@stdcall;
@returns( "eax" );
@external( "__imp__WindowFromPoint@8" );
.....
w.CallNextHookEx(hHook,nCode,wParam,lParam);
mov(lParam,edx);
w.WindowFromPoint([B](type w.MOUSEHOOKSTRUCT [edx]).pt.x, (type w.MOUSEHOOKSTRUCT [edx]).pt.y);[/B]
:confused:
This tutorial is driving me mad.:)
Regards
GJ
Hi All
New convertion is ready
Tute #25 "Simple Bitmap"
New convertion is ready
Tute #25 "Simple Bitmap"
It works...
code:-- ------------------------------------------------------------------------------
WindowFromPoint: procedure
(
_Point : POINT
);
@stdcall;
@returns( "eax" );
@external( "__imp__WindowFromPoint@8" );
.....
w.CallNextHookEx(hHook,nCode,wParam,lParam);
mov(lParam,edx);
w.WindowFromPoint((type w.MOUSEHOOKSTRUCT ).pt);
--------------------------------------------------------------------------------
It works also ...
code:--------------------------------------------------------------------------------
WindowFromPoint: procedure
(
(p0:dword; p1:dword);
);
@stdcall;
@returns( "eax" );
@external( "__imp__WindowFromPoint@8" );
.....
w.CallNextHookEx(hHook,nCode,wParam,lParam);
mov(lParam,edx);
w.WindowFromPoint((type w.MOUSEHOOKSTRUCT ).pt.x, (type w.MOUSEHOOKSTRUCT ).pt.y);
--------------------------------------------------------------------------------
This is because type POINT has the following definition in HLA:
When you pass a record by value as a procedure's parameter, HLA copies
all the bytes of the record onto the stack (C, btw, has the same behavior).
In both cases, the code passes two doublewords on the stack. The difference
between the two prototypes is that in one case you're passing a whole record
by value, in the other case you're passing an x-coordinate and a y-coordinate
by value. When you put the two parameters together, they have the same
memory layout as the POINT data type, hence they both look the same to the
Windows WindowFromPoint function.
Cheers,
Randy Hyde
code:-- ------------------------------------------------------------------------------
WindowFromPoint: procedure
(
_Point : POINT
);
@stdcall;
@returns( "eax" );
@external( "__imp__WindowFromPoint@8" );
.....
w.CallNextHookEx(hHook,nCode,wParam,lParam);
mov(lParam,edx);
w.WindowFromPoint((type w.MOUSEHOOKSTRUCT ).pt);
--------------------------------------------------------------------------------
It works also ...
code:--------------------------------------------------------------------------------
WindowFromPoint: procedure
(
(p0:dword; p1:dword);
);
@stdcall;
@returns( "eax" );
@external( "__imp__WindowFromPoint@8" );
.....
w.CallNextHookEx(hHook,nCode,wParam,lParam);
mov(lParam,edx);
w.WindowFromPoint((type w.MOUSEHOOKSTRUCT ).pt.x, (type w.MOUSEHOOKSTRUCT ).pt.y);
--------------------------------------------------------------------------------
This is because type POINT has the following definition in HLA:
type POINT: record
x: dword;
y: dword;
align(4);
endrecord;
When you pass a record by value as a procedure's parameter, HLA copies
all the bytes of the record onto the stack (C, btw, has the same behavior).
In both cases, the code passes two doublewords on the stack. The difference
between the two prototypes is that in one case you're passing a whole record
by value, in the other case you're passing an x-coordinate and a y-coordinate
by value. When you put the two parameters together, they have the same
memory layout as the POINT data type, hence they both look the same to the
Windows WindowFromPoint function.
Cheers,
Randy Hyde
Hi All
One more tutorial converted.
Iczelion tutorial #26 : "Splash Screen"
One more tutorial converted.
Iczelion tutorial #26 : "Splash Screen"
Hi All
Tutorial #27: "Tooltip Controll"
Regards
GJ
Tutorial #27: "Tooltip Controll"
Regards
GJ
Hi All,
New tutorials converted:
New tutorials converted:
[*]#28 Win32 Debug API Part 1
[*]#29 Win32 Debug API Part 2 (Second eg only)
[*]#30 Win32 Debug API Part 3
Note: Be patient with tute#30. This app counts the number of executed instuctions of debuggee (program being debugged). It takes about 40 sec on my Pentium IV 2.4Gh machine to trace tiny app (actually Hello World! app from tutorial #2).
Hi All,
New convertion:
Tutorial #31 Listview Control + user32.hhf(updated)
Note: Macro wsprintf added to user32.hhf. Tute #31 needs it and won't work without it.
Regards,GJ
New convertion:
Tutorial #31 Listview Control + user32.hhf(updated)
Note: Macro wsprintf added to user32.hhf. Tute #31 needs it and won't work without it.
Regards,GJ
Hi All,
New convertion:
Tutorial #32: Multiple Document Interface (MDI)
It is probably the last my convertion. Last 3 Iczelion Win32 tutes too complex for beginner to convert.
I have to read much to continue. Maybe sometime in the future...
New convertion:
Tutorial #32: Multiple Document Interface (MDI)
It is probably the last my convertion. Last 3 Iczelion Win32 tutes too complex for beginner to convert.
I have to read much to continue. Maybe sometime in the future...
Hi All,
Old convertion, New download:
Tutorial#24: Windows Hooks (updated)
One bug fixed (When edit boxes couldn't be cleared)
For more detailes see:http://www.asmcommunity.net/board/index.php?topic=13265
Regards, GJ
Old convertion, New download:
Tutorial#24: Windows Hooks (updated)
One bug fixed (When edit boxes couldn't be cleared)
For more detailes see:http://www.asmcommunity.net/board/index.php?topic=13265
Regards, GJ