Hi Laurent,
I got the compile working with the new SDK variables set up. (Lots of
other stuff going on, so slow progress. Nice to have CVS set up so I
can easily pick up and compile the latest changes now).
So my first step was to test the new GUI, with a functioning OEM script.
It failed.
Upon investigation, it seems that one used to be able to make a new window
$mw = Win32::GUI::Window->new( -name => 'Main', ... );
and then add a button
$but = $mw->AddButton( -name => 'b_nl', ..., -width => 24, ... );
And then do things like
print "but-width: $but->{'-width'}\n";
and get back the 24.
Now this always seemed very mysterious to me, because there was no data
member of the hash referenced by $but named '-width'. However, when I
had found the %TwoWayMethodMap in gui.pm which contained "-width" as one
of the entries, I convinced myself that this "fashionable" but not
understood technique was how the sort of print statement above could work.
Unfortunately, the above code sequence doesn't work on the latest CVS
version. The print statement just prints "but-width:" without the 24 :(
So we need to decide if this is something we want to have keep working,
so that we can stay "fashionable".
Clearly, I could call Width() directly, but the borrowed code would need
significant modification, because is uses many of the fashionable
techniques!
The item below is clearly an internal, but I am less sure whether the
above behavior should be considered internal or external.
So I also noticed that the object types got renumbered to remove the gap
after WIN32__GUI__DIALOG ... some code I'd borrowed had also depended on
that, but since it was just discriminating between WINDOW & DIALOG and
"all the rest", I could simply change the "> 10" test to "> 1", and that
works for all versions of Win32::GUI.
On approximately 4/12/2004 10:32 AM, came the following characters from
the keyboard of Laurent ROCHER:
Hi,
You can add #define WINVER 0x0501 in you gui.h for this problem but you need
to download and install last microsoft SDK for other problem.
see: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm
You need Core SDK Build environment (31 mb).
It's a huge download.
If you want i can make a zip with only include and lib directory (7mo).
Laurent
On approximately 4/8/2004 2:36 PM, came the following characters from
the keyboard of Laurent ROCHER:
New changes on CVS :
Hi Laurent, You've been putting some many nice new features out lately,
I thought I should bite the bullet, and try again to move my code to the
NEM. "The bullet" seemed to need to include getting the code from CVS,
to get all the new goodies, and I've been wanting to get my CVS set up
for quite a while anyway, but just was trying not to spend that time....
Well, Tortoise CVS didn't seem to be a big problem, it seems to have
done a checkout.
But when I go to build things, then it won't compile. So with the same
basic environment (compiler setup, VC++ 6.0, but different directory to
build in), I can compile the last release of GUI. I don't know if I've
missed something in CVS setup, or missed something somewhere else, or if
it is code changes, but I get the following errors. As far as I can
tell, the obvious things are OK: GUI.cpp #include GUI.h, and GUI.h
#include winuser.h, and winuser.h is where WINDOWINFO is declared. But,
the error makes it seem like it isn't declared.
Any clues?
cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG
-O1 -DVERSION=\"0.0.671\" -DXS_VERSION=\"0.0.671\"
"-IC:\Perl\lib\CORE" GUI.cpp
GUI.cpp
*** Using Preserved Perl context.
GUI.xs(1886) : warning C4101: 'targ' : unreferenced local variable
GUI.xs(2179) : error C2065: 'WINDOWINFO' : undeclared identifier
GUI.xs(2179) : error C2146: syntax error : missing ';' before identifier
'pwi'
GUI.xs(2179) : error C2065: 'pwi' : undeclared identifier
GUI.xs(2181) : error C2228: left of '.cbSize' must have
class/struct/union type
GUI.xs(2182) : error C2065: 'GetWindowInfo' : undeclared identifier
GUI.xs(2184) : error C2228: left of '.rcClient' must have
class/struct/union type
GUI.xs(2184) : error C2228: left of '.left' must have class/struct/union
type
GUI.xs(2185) : error C2228: left of '.rcClient' must have
class/struct/union type
GUI.xs(2185) : error C2228: left of '.top' must have class/struct/union
type
GUI.xs(2186) : error C2228: left of '.rcClient' must have
class/struct/union type
GUI.xs(2186) : error C2228: left of '.right' must have
class/struct/union type
GUI.xs(2187) : error C2228: left of '.rcClient' must have
class/struct/union type
GUI.xs(2187) : error C2228: left of '.bottom' must have
class/struct/union type
*** PACKAGE Win32::GUI::Menu...
*** PACKAGE Win32::GUI::MenuButton...
*** PACKAGE Win32::GUI::MenuItem...
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Perl-Win32-GUI-Hackers mailing list
Perl-Win32-GUI-Hackers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers
--
Glenn -- http://nevcal.com/
===========================
The best part about procrastination is that you are never bored,
because you have all kinds of things that you should be doing.