Hi Laurent,
Due to my hard drive being in the process of failing, I thought I'd
better get this patch isolated and delivered to you, so that it won't
get lost. Plus maybe Glenn Munroe might be able to use it, and others.
Here is a description of all the changes I've made, which you can use as
needed as comments in the change log(s). The patch.txt was generated by
diff -r -c against the released version of 0.0.665 sources, not
including any patches you've already applied to the CVS bugfix branch.
I hope that works for you... if it is hard, let me know what I should
provide instead.
I included a patch the change the version from 0.0.665 to 0.0.680 ... I
really don't care what the final number is, but probably it shouldn't be
0.0.665 ... we should use a different number, changing it for each patch
applied, perhaps. And maybe Aldo could bump the first or second number
in the main branch, for anything he does there?
There is a fix for an uninitialized variable reference, maybe you've
already picked that up, this is in the tooltip handling code.
There is a fix to add additional Windows constants for use with
TrackPopupMenu, these are TPM_* constants.
There is a fix to add many additional possible accelerator keys. I
tried to include all the ones that sounded like they were not guaranteed
to vary on other keyboards, and tried to consolidate documentation for
all keys I could find documentation for into the code, even if some of
them are commented out, so if someone needs one I commented out, it
should be easy to add it in.
There is a fix to NotifyIcon destruction, to avoid warnings when the
destruction by shutting down the process might conflict with destruction
by hand. Not clear which one happens first, all the time.
There are fixes to the bugs that prevented accelerator keys from working.
I left in some commented out code that shows how to trigger the MS
Visual Studio debugger in a somewhat clean way, in case that code might
be useful to someone, either where it is, or to paste it somewhere else.
In GUI_MessageLoops, most of the changes are to move calls to the
DefWindowProc to a common spot, so that when you add debugging code, you
can monitor all the calls to DefWindowProc from one spot in the code,
rather than scattering the debugging code into over a dozen other
places. This also unifies the "STRONGDEBUG" code that already
preceeding most, but not all, of the former calls to DefWindowProc.
This is in the nature of code cleanup, and making things easier to
debug, but don't actually change the functionality of Win32::GUI.
--
Glenn -- http://nevcal.com/
===========================
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick. It's ridiculous.
-- Bill Gates
And here is why it is ridiculous:
The division that includes Windows posted an operating profit of $2.26
billion on revenue of $2.81 billion.
--from Reuters via
http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html
So that's profit of over 400% of investment... with a bit more
investment in Windows technology, particularly in the area of
reliability, the profit percentage might go down, but so might the bugs
and security problems? Seems like it would be a reasonable tradeoff.
WalMart earnings are 3.4% of investment.
diff -r -c \win32-gui-rel-0.0.665/GUI.h ./GUI.h
*** \win32-gui-rel-0.0.665/GUI.h Wed Feb 27 03:05:08 2002
--- ./GUI.h Tue Jun 24 18:19:08 2003
***************
*** 2,7 ****
--- 2,9 ----
// #### for debugging info
// #define PERLWIN32GUI_DEBUG
// #define PERLWIN32GUI_STRONGDEBUG
+ #define PERLWIN32GUI_GLDEBUG
+ // #define PERLWIN32GUI_GLBREAK
#define WIN32_LEAN_AND_MEAN
#define _WIN32_IE 0x0401
diff -r -c \win32-gui-rel-0.0.665/GUI.pm ./GUI.pm
*** \win32-gui-rel-0.0.665/GUI.pm Wed Feb 27 04:06:10 2002
--- ./GUI.pm Fri Nov 28 11:52:49 2003
***************
*** 4,10 ****
#
# 29 Jan 1997 by Aldo Calpini <[EMAIL PROTECTED]>
#
! # Version: 0.0.665 (27 Feb 2002)
#
# Copyright (c) 1997..2002 Aldo Calpini. All rights reserved.
# This program is free software; you can redistribute it and/or
--- 4,10 ----
#
# 29 Jan 1997 by Aldo Calpini <[EMAIL PROTECTED]>
#
! # Version: 0.0.680 (27 Feb 2002)
#
# Copyright (c) 1997..2002 Aldo Calpini. All rights reserved.
# This program is free software; you can redistribute it and/or
***************
*** 22,35 ****
###############################################################################
# STATIC OBJECT PROPERTIES
#
! $VERSION = "0.0.665";
$MenuIdCounter = 1;
$TimerIdCounter = 1;
$NotifyIconIdCounter = 1;
%Menus = ();
%Accelerators = ();
$AcceleratorCounter = 9001;
- %AcceleratorTable = ();
@ISA = qw( Exporter DynaLoader );
@EXPORT = qw(
--- 22,34 ----
###############################################################################
# STATIC OBJECT PROPERTIES
#
! $VERSION = "0.0.680";
$MenuIdCounter = 1;
$TimerIdCounter = 1;
$NotifyIconIdCounter = 1;
%Menus = ();
%Accelerators = ();
$AcceleratorCounter = 9001;
@ISA = qw( Exporter DynaLoader );
@EXPORT = qw(
***************
*** 304,309 ****
--- 303,322 ----
WS_EX_TOPMOST
WS_EX_TRANSPARENT
WS_EX_WINDOWEDGE
+
+ TPM_LEFTBUTTON
+ TPM_RIGHTBUTTON
+ TPM_LEFTALIGN
+ TPM_CENTERALIGN
+ TPM_RIGHTALIGN
+ TPM_TOPALIGN
+ TPM_VCENTERALIGN
+ TPM_BOTTOMALIGN
+ TPM_HORIZONTAL
+ TPM_VERTICAL
+ TPM_NONOTIFY
+ TPM_RETURNCMD
+ TPM_RECURSE
);
###############################################################################
***************
*** 425,431 ****
} else {
$data{-name} = $menudata[$i+1];
}
! $level = 0;
$level++ while($text =~ s/^\s*>\s*//);
# print "PM(MakeMenu) processing '$data{-name}',
level=$level\n";
--- 438,444 ----
} else {
$data{-name} = $menudata[$i+1];
}
! $level=0;
$level++ while($text =~ s/^\s*>\s*//);
# print "PM(MakeMenu) processing '$data{-name}',
level=$level\n";
***************
*** 446,452 ****
-item => 0,
-id => $MenuIdCounter++,
-separator => 1,
! -name => $data{-name},
);
} else {
$M->{$data{-name}} = $M->{$parent}->AddMenuItem(
--- 459,465 ----
-item => 0,
-id => $MenuIdCounter++,
-separator => 1,
! -name => $data{-name},
);
} else {
$M->{$data{-name}} = $M->{$parent}->AddMenuItem(
***************
*** 479,485 ****
-item => 0,
-id => $MenuIdCounter++,
-separator => 1,
! -name => $data{-name},
);
} else {
$M->{$data{-name}} =
--- 492,498 ----
-item => 0,
-id => $MenuIdCounter++,
-separator => 1,
! -name => $data{-name},
);
} else {
$M->{$data{-name}} =
***************
*** 2429,2439 ****
# (@)INTERNAL:DESTROY(OBJECT)
sub DESTROY {
my($self) = @_;
! Win32::GUI::NotifyIcon::Delete(
$self->{-parent},
-id => $self->{-id},
! );
! undef $self->{-parent}->{$self->{-name}};
}
###############################################################################
--- 2442,2456 ----
# (@)INTERNAL:DESTROY(OBJECT)
sub DESTROY {
my($self) = @_;
! if ( defined $self
! && defined $self->{-parent} && defined $self->{-id}
! && defined $self->{-parent}->{$self->{-name}} )
! { Win32::GUI::NotifyIcon::Delete(
$self->{-parent},
-id => $self->{-id},
! );
! undef $self->{-parent}->{$self->{-name}};
! }
}
###############################################################################
***************
*** 2580,2634 ****
my($k, $v);
my $flag = 0;
my $key = 0;
! my %accels = @_;
! while( ($k, $v) = each %accels) {
! $flag = 0;
! if($k =~ s/shift[-\+]//i) { $flag |= 0x0004; }
! if($k =~ s/(ctrl|control)[-\+]//i) { $flag |= 0x0008; }
! if($k =~ s/alt[-\+]//i) { $flag |= 0x0010; }
!
! if($k =~ /^space$/i) { $flag |= 0x0001; $key =
0x20; } # VK_SPACE
! elsif($k =~ /^left$/i) { $flag |= 0x0001; $key =
0x25; } # VK_LEFT
! elsif($k =~ /^right$/i) { $flag |= 0x0001; $key =
0x27; } # VK_RIGHT
! elsif($k =~ /^up$/i) { $flag |= 0x0001; $key =
0x26; } # VK_UP
! elsif($k =~ /^down$/i) { $flag |= 0x0001; $key =
0x28; } # VK_DOWN
! elsif($k =~ /^ins$/i) { $flag |= 0x0001; $key =
0x2D; } # VK_INSERT
! elsif($k =~ /^del$/i) { $flag |= 0x0001; $key =
0x2E; } # VK_DELETE
! elsif($k =~ /^f1$/i) { $flag |= 0x0001; $key =
0x70; } # VK_F1
! elsif($k =~ /^f2$/i) { $flag |= 0x0001; $key =
0x71; } # VK_F2
! elsif($k =~ /^f3$/i) { $flag |= 0x0001; $key =
0x72; } # VK_F3
! elsif($k =~ /^f4$/i) { $flag |= 0x0001; $key =
0x73; } # VK_F4
! elsif($k =~ /^f5$/i) { $flag |= 0x0001; $key =
0x74; } # VK_F5
! elsif($k =~ /^f6$/i) { $flag |= 0x0001; $key =
0x75; } # VK_F6
! elsif($k =~ /^f7$/i) { $flag |= 0x0001; $key =
0x76; } # VK_F7
! elsif($k =~ /^f8$/i) { $flag |= 0x0001; $key =
0x77; } # VK_F8
! elsif($k =~ /^f9$/i) { $flag |= 0x0001; $key =
0x78; } # VK_F9
! elsif($k =~ /^f10$/i) { $flag |= 0x0001; $key =
0x79; } # VK_F10
! elsif($k =~ /^f11$/i) { $flag |= 0x0001; $key =
0x7A; } # VK_F11
! elsif($k =~ /^f12$/i) { $flag |= 0x0001; $key =
0x7B; } # VK_F12
! elsif($k =~ /^esc$/i) { $flag |= 0x0001; $key =
0x1B; } # VK_ESCAPE
! elsif($k =~ /^backspace$/i) { $flag |= 0x0001; $key =
0x08; } # VK_BACK
! elsif($k =~ /^tab$/i) { $flag |= 0x0001; $key =
0x09; } # VK_TAB
! elsif($k =~ /^return$/i) { $flag |= 0x0001; $key =
0x0D; } # VK_RETURN
! elsif($k =~ /^end$/i) { $flag |= 0x0001; $key =
0x23; } # VK_END
! elsif($k =~ /^home$/i) { $flag |= 0x0001; $key =
0x24; } # VK_HOME
! elsif($k =~ /^(pgup|pageup)$/i) { $flag |= 0x0001; $key =
0x21; } # VK_PRIOR
! elsif($k =~ /^(pgdn|pagedn|pagedown)$/i) { $flag |= 0x0001; $key =
0x22; } # VK_NEXT
! elsif($k =~ /^[0-9a-zA-Z]$/) { $flag |= 0x0001; $key =
ord(uc($k)); } # ASCII
!
! push(@acc, $id);
! push(@acc, $key);
! push(@acc, $flag);
!
! $self->{$Win32::GUI::AcceleratorCounter++} = $v;
! }
! if($Win32::GUI::AcceleratorTable) {
! Win32::GUI::DestroyAcceleratorTable($Win32::GUI::AcceleratorTable);
}
my $handle = Win32::GUI::CreateAcceleratorTable( @acc );
if($handle) {
$self->{-handle} = $handle;
! return 1;
} else {
return 0;
}
--- 2597,2746 ----
my($k, $v);
my $flag = 0;
my $key = 0;
! my @acc;
! while( $k = shift, $v = shift, defined $k && defined $v ) {
! $flag = 0x0001;
! if($k =~ s/shift[-+]//i) { $flag |= 0x0004; }
! if($k =~ s/(ctrl|control)[-+]//i) { $flag |= 0x0008; }
! if($k =~ s/alt[-+]//i) { $flag |= 0x0010; }
!
! # { $key = 0x01; } #
VK_LBUTTON
! # { $key = 0x02; } #
VK_RBUTTON
! # { $key = 0x03; } #
VK_CANCEL
! # { $key = 0x04; } #
VK_MBUTTON
! if($k =~ /^backspace$/i) { $key = 0x08; } # VK_BACK
! elsif($k =~ /^tab$/i) { $key = 0x09; } # VK_TAB
! # elsif($k =~ /^clear$/i) { $key = 0x0c; } # VK_CLEAR
! elsif($k =~ /^return$/i) { $key = 0x0d; } #
VK_RETURN
! # { $key = 0x10; } # VK_SHIFT
! # { $key = 0x11; } #
VK_CONTROL
! # { $key = 0x12; } # VK_MENU
/ALT
! elsif($k =~ /^pause$/i) { $key = 0x13; } # VK_PAUSE
! elsif($k =~ /^capslock$/i) { $key = 0x14; } #
VK_CAPITAL
! elsif($k =~ /^(esc|escape)$/i) { $key = 0x1b; } #
VK_ESCAPE
! elsif($k =~ /^space$/i) { $key = 0x20; } # VK_SPACE
! elsif($k =~ /^(pgup|pageup)$/i) { $key = 0x21; } # VK_PRIOR
! elsif($k =~ /^(pgdn|pagedn|pagedown)$/i) { $key = 0x22; } # VK_NEXT
! elsif($k =~ /^end$/i) { $key = 0x23; } # VK_END
! elsif($k =~ /^home$/i) { $key = 0x24; } # VK_HOME
! elsif($k =~ /^left$/i) { $key = 0x25; } # VK_LEFT
! elsif($k =~ /^up$/i) { $key = 0x26; } # VK_UP
! elsif($k =~ /^right$/i) { $key = 0x27; } # VK_RIGHT
! elsif($k =~ /^down$/i) { $key = 0x28; } # VK_DOWN
! # elsif($k =~ /^select$/i) { $key = 0x29; } #
VK_SELECT
! # elsif($k =~ /^print$/i) { $key = 0x2a; } # VK_PRINT
! # elsif($k =~ /^execute$/i) { $key = 0x2b; } #
VK_EXECUTE
! elsif($k =~ /^(prntscrn|printscreen)$/i) { $key = 0x2c; } #
VK_SNAPSHOT
! elsif($k =~ /^ins$/i) { $key = 0x2d; } #
VK_INSERT
! elsif($k =~ /^del$/i) { $key = 0x2e; } #
VK_DELETE
! # elsif($k =~ /^help$/i) { $key = 0x2f; } # VK_HELP
! elsif($k =~ /^[0-9a-z]$/i) { $key = ord(uc($k)); }
! # 0x30-0x39: ASCII 0-9
! # 0x41-0x5a: ASCII A-Z
! elsif($k =~ /^left(win|windows)$/i) { $key = 0x5b; } # VK_LWIN
! elsif($k =~ /^right(win|windows)$/i) { $key = 0x5c; } # VK_RWIN
! elsif($k =~ /^(app|application)$/i) { $key = 0x5d; } # VK_APPS
! # elsif($k =~ /^sleep$/i) { $key = 0x5e; } # VK_SLEEP
! elsif($k =~ /^(num|numeric|keypad)0$/i) { $key = 0x60; } #
VK_NUMPAD0
! elsif($k =~ /^(num|numeric|keypad)1$/i) { $key = 0x61; } #
VK_NUMPAD1
! elsif($k =~ /^(num|numeric|keypad)2$/i) { $key = 0x62; } #
VK_NUMPAD2
! elsif($k =~ /^(num|numeric|keypad)3$/i) { $key = 0x63; } #
VK_NUMPAD3
! elsif($k =~ /^(num|numeric|keypad)4$/i) { $key = 0x64; } #
VK_NUMPAD4
! elsif($k =~ /^(num|numeric|keypad)5$/i) { $key = 0x65; } #
VK_NUMPAD5
! elsif($k =~ /^(num|numeric|keypad)6$/i) { $key = 0x66; } #
VK_NUMPAD6
! elsif($k =~ /^(num|numeric|keypad)7$/i) { $key = 0x67; } #
VK_NUMPAD7
! elsif($k =~ /^(num|numeric|keypad)8$/i) { $key = 0x68; } #
VK_NUMPAD8
! elsif($k =~ /^(num|numeric|keypad)9$/i) { $key = 0x69; } #
VK_NUMPAD9
! elsif($k =~ /^multiply$/i) { $key = 0x6a; } #
VK_MULTIPLY
! elsif($k =~ /^add$/i) { $key = 0x6b; } # VK_ADD
! # elsif($k =~ /^separator$/i) { $key = 0x6c; } #
VK_SEPARATOR
! elsif($k =~ /^subtract$/i) { $key = 0x6d; } #
VK_SUBTRACT
! elsif($k =~ /^decimal$/i) { $key = 0x6e; } #
VK_DECIMAL
! elsif($k =~ /^divide$/i) { $key = 0x6f; } #
VK_DIVIDE
! elsif($k =~ /^f1$/i) { $key = 0x70; } # VK_F1
! elsif($k =~ /^f2$/i) { $key = 0x71; } # VK_F2
! elsif($k =~ /^f3$/i) { $key = 0x72; } # VK_F3
! elsif($k =~ /^f4$/i) { $key = 0x73; } # VK_F4
! elsif($k =~ /^f5$/i) { $key = 0x74; } # VK_F5
! elsif($k =~ /^f6$/i) { $key = 0x75; } # VK_F6
! elsif($k =~ /^f7$/i) { $key = 0x76; } # VK_F7
! elsif($k =~ /^f8$/i) { $key = 0x77; } # VK_F8
! elsif($k =~ /^f9$/i) { $key = 0x78; } # VK_F9
! elsif($k =~ /^f10$/i) { $key = 0x79; } # VK_F10
! elsif($k =~ /^f11$/i) { $key = 0x7a; } # VK_F11
! elsif($k =~ /^f12$/i) { $key = 0x7b; } # VK_F12
! # elsif($k =~ /^f13$/i) { $key = 0x7c; } # VK_F13
! # elsif($k =~ /^f14$/i) { $key = 0x7d; } # VK_F14
! # elsif($k =~ /^f15$/i) { $key = 0x7e; } # VK_F15
! # elsif($k =~ /^f16$/i) { $key = 0x7f; } # VK_F16
! # elsif($k =~ /^f17$/i) { $key = 0x80; } # VK_F17
! # elsif($k =~ /^f18$/i) { $key = 0x81; } # VK_F18
! # elsif($k =~ /^f19$/i) { $key = 0x82; } # VK_F19
! # elsif($k =~ /^f20$/i) { $key = 0x83; } # VK_F20
! # elsif($k =~ /^f21$/i) { $key = 0x84; } # VK_F21
! # elsif($k =~ /^f22$/i) { $key = 0x85; } # VK_F22
! # elsif($k =~ /^f23$/i) { $key = 0x86; } # VK_F23
! # elsif($k =~ /^f24$/i) { $key = 0x87; } # VK_F24
! elsif($k =~ /^numlock$/i) { $key = 0x90; } #
VK_NUMLOCK
! elsif($k =~ /^scrolllock$/i) { $key = 0x91; } #
VK_SCROLL
! # { $key = 0xa0; } #
VK_LSHIFT
! # { $key = 0xa1; } #
VK_RSHIFT
! # { $key = 0xa2; } #
VK_LCONTROL
! # { $key = 0xa3; } #
VK_RCONTROL
! # { $key = 0xa4; } # VK_LMENU
! # { $key = 0xa5; } # VK_RMENU
! # elsif($k =~ /^browserback$/i) { $key = 0xa6; } #
VK_BROWSER_BACK
! # elsif($k =~ /^browserforward$/i) { $key = 0xa7; } #
VK_BROWSER_FORWARD
! # elsif($k =~ /^browserrefresh$/i) { $key = 0xa8; } #
VK_BROWSER_REFRESH
! # elsif($k =~ /^browserstop$/i) { $key = 0xa9; } #
VK_BROWSER_STOP
! # elsif($k =~ /^browsersearch$/i) { $key = 0xaa; } #
VK_BROWSER_SEARCH
! # elsif($k =~ /^browserfavorites$/i) { $key = 0xab; } #
VK_BROWSER_FAVORITES
! # elsif($k =~ /^browserhome$/i) { $key = 0xac; } #
VK_BROWSER_HOME
! # elsif($k =~ /^volumemute$/i) { $key = 0xad; } #
VK_VOLUME_MUTE
! # elsif($k =~ /^volumedown$/i) { $key = 0xae; } #
VK_VOLUME_UP
! # elsif($k =~ /^volumenup$/i) { $key = 0xaf; } #
VK_VOLUME_DOWN
! # elsif($k =~ /^medianexttrack$/i) { $key = 0xb0; } #
VK_MEDIA_NEXT_TRACK
! # elsif($k =~ /^mediaprevtrack$/i) { $key = 0xb1; } #
VK_MEDIA_PREV_TRACK
! # elsif($k =~ /^mediastop$/i) { $key = 0xb2; } #
VK_MEDIA_STOP
! # elsif($k =~ /^mediaplaypause$/i) { $key = 0xb3; } #
VK_MEDIA_PLAY_PAUSE
! # elsif($k =~ /^launchmail$/i) { $key = 0xb4; } #
VK_LAUNCH_MAIL
! # elsif($k =~ /^launchmediaselect$/i) { $key = 0xb5; } #
VK_LAUNCH_MEDIA_SELECT
! # elsif($k =~ /^launchapp1$/i) { $key = 0xb6; } #
VK_LAUNCH_APP1
! # elsif($k =~ /^launchapp2$/i) { $key = 0xb7; } #
VK_LAUNCH_APP2
! elsif($k =~ /^semicolon$/i) { $key = 0xba; } # VK_OEM_1
! elsif($k =~ /^(plus|equal)$/i) { $key = 0xbb; } #
VK_OEM_PLUS
! elsif($k =~ /^(comma|lessthan)$/i) { $key = 0xbc; } #
VK_OEM_COMMA
! elsif($k =~ /^(minus|underscore)$/i) { $key = 0xbd; } #
VK_OEM_MINUS
! elsif($k =~ /^(period|greaterthan)$/i) { $key = 0xbe; } #
VK_OEM_PERIOD
! elsif($k =~ /^(slash|question)$/i) { $key = 0xbf; } # VK_OEM_2
! elsif($k =~ /^(acute|tilde)$/i) { $key = 0xc0; } # VK_OEM_3
! elsif($k =~ /^(left|open)brac(e|ket)$/i) { $key = 0xdb; } # VK_OEM_4
! elsif($k =~ /^(backslash|verticalbar)$/i) { $key = 0xdc; } # VK_OEM_5
! elsif($k =~ /^(right|close)brac(e|ket)$/i) { $key = 0xdd; } # VK_OEM_6
! elsif($k =~ /^(single|double|)quote$/i) { $key = 0xde; } # VK_OEM_7
! # elsif($k =~ /^unknown$/i) { $key = 0xdf; } # VK_OEM_8
! # elsif($k =~ /^process$/i) { $key = 0xe5; } #
VK_PROCESSKEY
! elsif($k =~ /^(attn|attention)$/i) { $key = 0xf6; } # VK_ATTN
! elsif($k =~ /^crsel$/i) { $key = 0xf7; } # VK_CRSEL
! elsif($k =~ /^exsel$/i) { $key = 0xf8; } # VK_EXSEL
! elsif($k =~ /^(ereof|eraseeof)$/i) { $key = 0xf9; } # VK_EREOF
! elsif($k =~ /^play$/i) { $key = 0xfa; } # VK_PLAY
! elsif($k =~ /^zoom$/i) { $key = 0xfb; } # VK_ZOOM
! elsif($k =~ /^noname$/i) { $key = 0xfc; } #
VK_NONAME
! elsif($k =~ /^pa1$/i) { $key = 0xfd; } # VK_PA1
! elsif($k =~ /^oem_clear$/i) { $key = 0xfe; } #
VK_OEM_CLEAR
! else { print "Key name '$k' unknown\n"; }
!
! if ( $key )
! { push @acc, $Win32::GUI::AcceleratorCounter, $key, $flag;
! $Win32::GUI::Accelerators{$Win32::GUI::AcceleratorCounter} = $v;
! $Win32::GUI::AcceleratorCounter++;
! }
}
my $handle = Win32::GUI::CreateAcceleratorTable( @acc );
if($handle) {
$self->{-handle} = $handle;
! return $self;
} else {
return 0;
}
diff -r -c \win32-gui-rel-0.0.665/GUI.xs ./GUI.xs
*** \win32-gui-rel-0.0.665/GUI.xs Wed Feb 27 04:06:52 2002
--- ./GUI.xs Fri Nov 28 11:56:22 2003
***************
*** 294,300 ****
next_i = -1;
}
}
! #ifdef PERLWIN32GUI_DEBUG
printf("XS(CreateWindowEx): Done parsing parameters...\n");
printf("XS(CreateWindowEx): dwExStyle = 0x%x\n", dwExStyle);
printf("XS(CreateWindowEx): szClassname = %s\n", szClassname);
--- 294,300 ----
next_i = -1;
}
}
! #if defined(PERLWIN32GUI_DEBUG) || defined(PERLWIN32GUI_GLDEBUG2)
printf("XS(CreateWindowEx): Done parsing parameters...\n");
printf("XS(CreateWindowEx): dwExStyle = 0x%x\n", dwExStyle);
printf("XS(CreateWindowEx): szClassname = %s\n", szClassname);
***************
*** 360,366 ****
perlcs.iMinHeight = -1;
perlcs.iMaxHeight = -1;
perlcs.iEventModel = PERLWIN32GUI_EM_BYNAME;
!
// #### fill the default parameters for classes
switch(perlcs.iClass) {
case WIN32__GUI__WINDOW:
--- 360,366 ----
perlcs.iMinHeight = -1;
perlcs.iMaxHeight = -1;
perlcs.iEventModel = PERLWIN32GUI_EM_BYNAME;
!
// #### fill the default parameters for classes
switch(perlcs.iClass) {
case WIN32__GUI__WINDOW:
***************
*** 529,535 ****
&& perlcs.iClass != WIN32__GUI__DIALOG) {
SwitchBit(perlcs.cs.style, WS_CHILD, 1);
}
! #ifdef PERLWIN32GUI_STRONGDEBUG
printf("XS(Create): Done parsing parameters...\n");
printf("XS(Create): dwExStyle = 0x%x\n", perlcs.cs.dwExStyle);
printf("XS(Create): szClassname = '%s'\n", perlcs.cs.lpszClass);
--- 529,542 ----
&& perlcs.iClass != WIN32__GUI__DIALOG) {
SwitchBit(perlcs.cs.style, WS_CHILD, 1);
}
! #ifdef PERLWIN32GUI_GLBREAK
! printf("XS(Create): %s\n", perlcs.cs.lpszName );
! if ( perlcs.cs.lpszName
! && strcmp ( perlcs.cs.lpszName, "findlist.pl Main Window" ) == 0 )
! { __asm { int 3 };
! }
! #endif
! #if defined(PERLWIN32GUI_STRONGDEBUG) || defined(PERLWIN32GUI_GLDEBUG2)
printf("XS(Create): Done parsing parameters...\n");
printf("XS(Create): dwExStyle = 0x%x\n", perlcs.cs.dwExStyle);
printf("XS(Create): szClassname = '%s'\n", perlcs.cs.lpszClass);
***************
*** 637,643 ****
if(perlcs.hTooltip == NULL) {
SV** t;
t = hv_fetch_mg(NOTXSCALL
perlcs.hvParent, "-tooltip", 8, 0);
! if(t != NULL) {
perlcs.hTooltip = (HWND)
SvIV(*t);
}
}
--- 644,650 ----
if(perlcs.hTooltip == NULL) {
SV** t;
t = hv_fetch_mg(NOTXSCALL
perlcs.hvParent, "-tooltip", 8, 0);
! if(t != NULL && SvOK( *t )) {
perlcs.hTooltip = (HWND)
SvIV(*t);
}
}
***************
*** 996,1001 ****
--- 1003,1009 ----
perlud = (LPPERLWIN32GUI_USERDATA)
GetWindowLong(phwnd, GWL_USERDATA);
if( ValidUserData(perlud) ) {
fIsDialog = perlud->dwPlStyle & PERLWIN32GUI_DIALOGUI;
+ acc = perlud->hAcc;
}
if(fIsDialog) {
if(acc != NULL) {
***************
*** 2508,2513 ****
--- 2516,2522 ----
perlud = (LPPERLWIN32GUI_USERDATA)
GetWindowLong(phwnd, GWL_USERDATA);
if( ValidUserData(perlud) ) {
fIsDialog = perlud->dwPlStyle & PERLWIN32GUI_DIALOGUI;
+ acc = perlud->hAcc;
}
if(fIsDialog) {
if(acc != NULL) {
***************
*** 3952,3957 ****
--- 3961,3967 ----
int a, c, i;
CODE:
a = items/3;
+ // printf("!XS(CreateAcceleratorTable) items=%d/3=%d\n", items, a);
acc = (LPACCEL) safemalloc(a * sizeof(ACCEL));
c = 0;
for(i=0; i<items; i+=3) {
diff -r -c \win32-gui-rel-0.0.665/GUI_Constants.cpp ./GUI_Constants.cpp
*** \win32-gui-rel-0.0.665/GUI_Constants.cpp Fri Mar 16 04:08:38 2001
--- ./GUI_Constants.cpp Sat Nov 8 21:19:59 2003
***************
*** 1236,1241 ****
--- 1236,1319 ----
#endif
break;
case 'T':
+ if (strEQ(name, "TPM_LEFTBUTTON"))
+ #ifdef TPM_LEFTBUTTON
+ return TPM_LEFTBUTTON;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_RIGHTBUTTON"))
+ #ifdef TPM_RIGHTBUTTON
+ return TPM_RIGHTBUTTON;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_LEFTALIGN"))
+ #ifdef TPM_LEFTALIGN
+ return TPM_LEFTALIGN;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_CENTERALIGN"))
+ #ifdef TPM_CENTERALIGN
+ return TPM_CENTERALIGN;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_RIGHTALIGN"))
+ #ifdef TPM_RIGHTALIGN
+ return TPM_RIGHTALIGN;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_TOPALIGN"))
+ #ifdef TPM_TOPALIGN
+ return TPM_TOPALIGN;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_VCENTERALIGN"))
+ #ifdef TPM_VCENTERALIGN
+ return TPM_VCENTERALIGN;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_BOTTOMALIGN"))
+ #ifdef TPM_BOTTOMALIGN
+ return TPM_BOTTOMALIGN;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_HORIZONTAL"))
+ #ifdef TPM_HORIZONTAL
+ return TPM_HORIZONTAL;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_VERTICAL"))
+ #ifdef TPM_VERTICAL
+ return TPM_VERTICAL;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TMP_NONOTIFY"))
+ #ifdef TMP_NONOTIFY
+ return TMP_NONOTIFY;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_RETURNCMD"))
+ #ifdef TPM_RETURNCMD
+ return TPM_RETURNCMD;
+ #else
+ goto not_there;
+ #endif
+ if (strEQ(name, "TPM_RECURSE"))
+ #ifdef TPM_RECURSE
+ return TPM_RECURSE
+ #else
+ goto not_there;
+ #endif
break;
case 'U':
break;
diff -r -c \win32-gui-rel-0.0.665/GUI_MessageLoops.cpp ./GUI_MessageLoops.cpp
*** \win32-gui-rel-0.0.665/GUI_MessageLoops.cpp Wed Feb 27 03:04:14 2002
--- ./GUI_MessageLoops.cpp Fri Nov 28 12:05:41 2003
***************
*** 6,11 ****
--- 6,34 ----
#include "GUI.h"
+ /*
+ ##############
+ # (@)INTERNAL:CallDefWindowProc
+ # A common location to call DefWindowProc, so that logging and debugging code
+ # can be placed before and after it. Could be replaced by a
+ #
+ # #define CallDefWindowProc(f,h,m,w,l) DefWindowProc(h,m,w,l)
+ #
+ # if performance becomes a concern.
+ ###############
+ */
+ LRESULT CallDefWindowProc(NOTXSPROC char* from, HWND hwnd, UINT uMsg, WPARAM
wParam, LPARAM lParam)
+ {
+ LRESULT retval;
+ #ifdef PERLWIN32GUI_STRONGDEBUG
+ printf("!XS(%s) returning DefWindowProc\n", from);
+ #endif
+ // location for debugging traces before default window proc called
+ retval = DefWindowProc(hwnd, uMsg, wParam, lParam);
+ // location for debugging traces after default window proc called
+ return retval;
+ }
+
/*
###########################################################################
# (@)INTERNAL:CommonMsgLoop(hwnd, uMsg, wParam, lParam)
***************
*** 15,115 ****
LRESULT CommonMsgLoop(NOTXSPROC HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
lParam)
{
#ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(CommonMsgLoop) got (0x%x, 0x%x, 0x%x, 0x%x)\n", hwnd,
uMsg, wParam, lParam);
#endif
! switch(uMsg) {
case WM_CTLCOLOREDIT:
case WM_CTLCOLORSTATIC:
case WM_CTLCOLORBTN:
case WM_CTLCOLORLISTBOX:
! {
! LPPERLWIN32GUI_USERDATA perlud;
! /*
! if(uMsg == WM_CTLCOLORSTATIC
! && GetWindowLong((HWND) lParam, GWL_STYLE) & SS_SIMPLE) {
! FREETMPS;
! LEAVE;
! return FALSE;
! }
! */
! perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND)
lParam, GWL_USERDATA);
! if( ! ValidUserData(perlud) ) {
! HBRUSH defBrush;
! switch(uMsg) {
! case WM_CTLCOLOREDIT:
! case WM_CTLCOLORLISTBOX:
! defBrush =
GetSysColorBrush(COLOR_WINDOW);
! break;
! default:
! defBrush =
GetSysColorBrush(COLOR_BTNFACE);
! break;
! }
! return ((LRESULT) defBrush);
! }
! if(uMsg == WM_CTLCOLORSTATIC) SetBkMode((HDC) wParam,
TRANSPARENT);
! if(perlud->clrForeground != CLR_INVALID) {
! SetTextColor((HDC) wParam,
perlud->clrForeground);
! }
! if(perlud->clrBackground != CLR_INVALID) {
! SetBkColor((HDC) wParam, perlud->clrBackground);
! return ((LRESULT) perlud->hBackgroundBrush);
! } else {
! HBRUSH defBrush;
! switch(uMsg) {
! case WM_CTLCOLOREDIT:
! case WM_CTLCOLORLISTBOX:
! defBrush =
GetSysColorBrush(COLOR_WINDOW);
! break;
! default:
! defBrush =
GetSysColorBrush(COLOR_BTNFACE);
! break;
! }
! return ((LRESULT) defBrush);
! }
! }
! break;
case WM_GETMINMAXINFO:
! {
! LPMINMAXINFO minmax;
! LPPERLWIN32GUI_USERDATA perlud;
! perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA);
! if( ValidUserData(perlud) ) {
! minmax = (LPMINMAXINFO) lParam;
! if(perlud->iMinWidth != -1)
minmax->ptMinTrackSize.x = (LONG) perlud->iMinWidth;
! if(perlud->iMaxWidth != -1)
minmax->ptMaxTrackSize.x = (LONG) perlud->iMaxWidth;
! if(perlud->iMinHeight != -1)
minmax->ptMinTrackSize.y = (LONG) perlud->iMinHeight;
! if(perlud->iMaxHeight != -1)
minmax->ptMaxTrackSize.y = (LONG) perlud->iMaxHeight;
! return 0;
! }
! }
! break;
case WM_SETCURSOR:
! {
! LPPERLWIN32GUI_USERDATA perlud;
! perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND) wParam,
GWL_USERDATA);
! if( ValidUserData(perlud) ) {
! if( perlud->hCursor != NULL) {
! SetCursor( perlud->hCursor );
! return TRUE;
! } else {
! return FALSE;
! }
! }
! return FALSE;
! }
! break;
!
}
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(CommonMsgLoop) returning DefWindowProc\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
--- 38,133 ----
LRESULT CommonMsgLoop(NOTXSPROC HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
lParam)
{
#ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(CommonMsgLoop) got (0x%x, 0x%x, 0x%x, 0x%x)\n", hwnd, uMsg,
wParam, lParam);
#endif
! switch(uMsg) {
case WM_CTLCOLOREDIT:
case WM_CTLCOLORSTATIC:
case WM_CTLCOLORBTN:
case WM_CTLCOLORLISTBOX:
! {
! LPPERLWIN32GUI_USERDATA perlud;
! /*
! if(uMsg == WM_CTLCOLORSTATIC
! && GetWindowLong((HWND) lParam, GWL_STYLE) & SS_SIMPLE) {
! FREETMPS;
! LEAVE;
! return FALSE;
! }
! */
! perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND) lParam,
GWL_USERDATA);
! if( ! ValidUserData(perlud) ) {
! HBRUSH defBrush;
! switch(uMsg) {
! case WM_CTLCOLOREDIT:
! case WM_CTLCOLORLISTBOX:
! defBrush = GetSysColorBrush(COLOR_WINDOW);
! break;
! default:
! defBrush = GetSysColorBrush(COLOR_BTNFACE);
! break;
! }
! return ((LRESULT) defBrush);
! }
! if(uMsg == WM_CTLCOLORSTATIC) SetBkMode((HDC) wParam, TRANSPARENT);
! if(perlud->clrForeground != CLR_INVALID) {
! SetTextColor((HDC) wParam, perlud->clrForeground);
! }
! if(perlud->clrBackground != CLR_INVALID) {
! SetBkColor((HDC) wParam, perlud->clrBackground);
! return ((LRESULT) perlud->hBackgroundBrush);
! } else {
! HBRUSH defBrush;
! switch(uMsg) {
! case WM_CTLCOLOREDIT:
! case WM_CTLCOLORLISTBOX:
! defBrush = GetSysColorBrush(COLOR_WINDOW);
! break;
! default:
! defBrush = GetSysColorBrush(COLOR_BTNFACE);
! break;
! }
! return ((LRESULT) defBrush);
! }
! }
! break;
case WM_GETMINMAXINFO:
! {
! LPMINMAXINFO minmax;
! LPPERLWIN32GUI_USERDATA perlud;
! perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
! if( ValidUserData(perlud) ) {
! minmax = (LPMINMAXINFO) lParam;
! if(perlud->iMinWidth != -1) minmax->ptMinTrackSize.x = (LONG)
perlud->iMinWidth;
! if(perlud->iMaxWidth != -1) minmax->ptMaxTrackSize.x = (LONG)
perlud->iMaxWidth;
! if(perlud->iMinHeight != -1) minmax->ptMinTrackSize.y = (LONG)
perlud->iMinHeight;
! if(perlud->iMaxHeight != -1) minmax->ptMaxTrackSize.y = (LONG)
perlud->iMaxHeight;
! return 0;
! }
! }
! break;
case WM_SETCURSOR:
! {
! WORD nHitTest = LOWORD( lParam );
! // WORD wMouseMsg = HIWORD( lParam );
! if( nHitTest == HTCLIENT ) { // only diddle cursor in client areas
! LPPERLWIN32GUI_USERDATA perlud;
! perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND) wParam,
GWL_USERDATA);
! if( ValidUserData(perlud) && perlud->hCursor != NULL) {
! SetCursor( perlud->hCursor );
! return TRUE;
! }
}
! }
! break;
! }
! return CallDefWindowProc("CommonMsgLoop", hwnd, uMsg, wParam, lParam);
}
***************
*** 134,159 ****
if(perlud!= NULL) {
SetWindowLong(hwnd, GWL_USERDATA, (long) perlud);
}
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_WindowMsgLoop) returning DefWindowProc
(WM_CREATE)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
if(uMsg == WM_DESTROY) {
safefree( (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA));
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_WindowMsgLoop) returning DefWindowProc
(WM_DESTROY)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
PerlResult = 1;
perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
if( ! ValidUserData(perlud) ) {
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_WindowMsgLoop) returning DefWindowProc (perlud not
valid)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
#ifdef PERL_OBJECT
CPerl *pPerl;
--- 152,168 ----
if(perlud!= NULL) {
SetWindowLong(hwnd, GWL_USERDATA, (long) perlud);
}
! return CallDefWindowProc("NEM_WindowMsgLoop", hwnd, uMsg, wParam,
lParam);
}
if(uMsg == WM_DESTROY) {
safefree( (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA));
! return CallDefWindowProc("NEM_WindowMsgLoop", hwnd, uMsg,
wParam, lParam);
}
PerlResult = 1;
perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
if( ! ValidUserData(perlud) ) {
! return CallDefWindowProc("NEM_WindowMsgLoop", hwnd, uMsg,
wParam, lParam);
}
#ifdef PERL_OBJECT
CPerl *pPerl;
***************
*** 519,544 ****
if(perlud!= NULL) {
SetWindowLong(hwnd, GWL_USERDATA, (long) perlud);
}
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_ChildMsgLoop) returning DefWindowProc
(WM_CREATE)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
if(uMsg == WM_DESTROY) {
safefree( (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA));
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_ChildMsgLoop) returning DefWindowProc
(WM_DESTROY)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
PerlResult = 1;
perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
if( ! ValidUserData(perlud) ) {
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_ChildMsgLoop) returning DefWindowProc (perlud not
valid)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
#ifdef PERL_OBJECT
CPerl *pPerl;
--- 528,544 ----
if(perlud!= NULL) {
SetWindowLong(hwnd, GWL_USERDATA, (long) perlud);
}
! return CallDefWindowProc("NEM_ChildMsgLoop", hwnd, uMsg, wParam,
lParam);
}
if(uMsg == WM_DESTROY) {
safefree( (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA));
! return CallDefWindowProc("NEM_ChildMsgLoop", hwnd, uMsg,
wParam, lParam);
}
PerlResult = 1;
perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
if( ! ValidUserData(perlud) ) {
! return CallDefWindowProc("NEM_ChildMsgLoop", hwnd, uMsg,
wParam, lParam);
}
#ifdef PERL_OBJECT
CPerl *pPerl;
***************
*** 584,593 ****
#endif
return CallWindowProc((FARPROC) wndprocOriginal, hwnd,
uMsg, wParam, lParam);
} else {
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_ChildMsgLoop) returning DefWindowProc
(wndprocOriginal not valid)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
}
--- 584,590 ----
#endif
return CallWindowProc((FARPROC) wndprocOriginal, hwnd,
uMsg, wParam, lParam);
} else {
! return CallDefWindowProc("NEM_ChildMsgLoop", hwnd,
uMsg, wParam, lParam);
}
}
}
***************
*** 623,632 ****
#endif
return CallWindowProc((FARPROC) wndprocOriginal, hwnd,
uMsg, wParam, lParam);
} else {
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(ContainerMsgLoop) perlud was not valid,
forwarding to DefWindowProc...\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
}
--- 620,626 ----
#endif
return CallWindowProc((FARPROC) wndprocOriginal, hwnd,
uMsg, wParam, lParam);
} else {
! return CallDefWindowProc("ContainerMsgLoop", hwnd,
uMsg, wParam, lParam);
}
}
}
***************
*** 665,671 ****
CPerl *pPerl;
pPerl = perlud->pPerl;
} else {
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
#endif
--- 659,665 ----
CPerl *pPerl;
pPerl = perlud->pPerl;
} else {
! return CallDefWindowProc("SplitterMsgLoop", hwnd, uMsg, wParam,
lParam);
}
#endif
***************
*** 675,681 ****
if(uMsg == WM_DESTROY) {
if(perludValid) safefree( perlud );
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
PerlResult = 1;
--- 669,675 ----
if(uMsg == WM_DESTROY) {
if(perludValid) safefree( perlud );
! return CallDefWindowProc("SplitterMsgLoop", hwnd, uMsg, wParam,
lParam);
}
PerlResult = 1;
***************
*** 773,779 ****
if(PerlResult == 0) {
return 0;
} else {
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
--- 767,773 ----
if(PerlResult == 0) {
return 0;
} else {
! return CallDefWindowProc("SplitterMsgLoop", hwnd, uMsg, wParam,
lParam);
}
}
***************
*** 1020,1026 ****
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return DefWindowProc(hwnd, uMsg, wParam, lParam);
#endif
int PerlResult;
int count;
--- 1014,1020 ----
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return CallDefWindowProc("GraphicMsgLoop0", hwnd,
uMsg, wParam, lParam);
#endif
int PerlResult;
int count;
***************
*** 1125,1131 ****
}
return PerlResult;
} else {
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
--- 1119,1125 ----
}
return PerlResult;
} else {
! return CallDefWindowProc("GraphicMsgLoop", hwnd, uMsg, wParam,
lParam);
}
}
***************
*** 1141,1147 ****
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return DefWindowProc(hwnd, uMsg, wParam, lParam);
#endif
int PerlResult;
int count;
--- 1135,1141 ----
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return
CallDefWindowProc("InteractiveGraphicMsgLoop0", hwnd, uMsg, wParam, lParam);
#endif
int PerlResult;
int count;
***************
*** 1266,1272 ****
if(PerlResult == 0) {
return 0;
} else {
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
}
--- 1260,1266 ----
if(PerlResult == 0) {
return 0;
} else {
! return CallDefWindowProc("InteractiveGraphicMsgLoop", hwnd, uMsg,
wParam, lParam);
}
}
}
***************
*** 1296,1318 ****
if(perlud!= NULL) {
SetWindowLong(hwnd, GWL_USERDATA, (long) perlud);
}
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(WindowMsgLoop) returning DefWindowProc (WM_CREATE)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
if(uMsg == WM_DESTROY) {
safefree( (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA));
! #ifdef PERLWIN32GUI_STRONGDEBUG
! printf("!XS(NEM_ChildMsgLoop) returning DefWindowProc
(WM_DESTROY)\n");
! #endif
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return DefWindowProc(hwnd, uMsg, wParam, lParam);
#endif
ENTER;
--- 1290,1306 ----
if(perlud!= NULL) {
SetWindowLong(hwnd, GWL_USERDATA, (long) perlud);
}
! return CallDefWindowProc("WindowMsgLoop1", hwnd, uMsg, wParam, lParam);
}
if(uMsg == WM_DESTROY) {
safefree( (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd,
GWL_USERDATA));
! return CallDefWindowProc("WindowMsgLoop2", hwnd, uMsg, wParam,
lParam);
}
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return CallDefWindowProc("WindowMsgLoop3", hwnd,
uMsg, wParam, lParam);
#endif
ENTER;
***************
*** 2324,2330 ****
if(PerlResult == 0) {
return 0;
} else {
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}
}
--- 2312,2318 ----
if(PerlResult == 0) {
return 0;
} else {
! return CallDefWindowProc("MsgLoop", hwnd, uMsg, wParam, lParam);
}
}
}
***************
*** 2352,2358 ****
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return DefWindowProc(hwnd, uMsg, wParam, lParam);
#endif
perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
--- 2340,2346 ----
#ifdef PERL_OBJECT
CPerl *pPerl;
pPerl = PERL_OBJECT_FROM_WINDOW(hwnd);
! if(pPerl == NULL) return CallDefWindowProc("InactiveMsgLoop0", hwnd,
uMsg, wParam, lParam);
#endif
perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong(hwnd, GWL_USERDATA);
***************
*** 2362,2366 ****
return 0;
}
}
! return DefWindowProc(hwnd, uMsg, wParam, lParam);
! }
\ No newline at end of file
--- 2350,2354 ----
return 0;
}
}
! return CallDefWindowProc("InactiveMsgLoop", hwnd, uMsg, wParam, lParam);
! }
diff -r -c \win32-gui-rel-0.0.665/GUI_Options.cpp ./GUI_Options.cpp
*** \win32-gui-rel-0.0.665/GUI_Options.cpp Wed Feb 27 03:09:22 2002
--- ./GUI_Options.cpp Fri Nov 7 22:19:35 2003
***************
*** 907,913 ****
} else if(strcmp(option, "-enabled") == 0) {
SwitchBit(mii->fMask, MIIM_STATE, 1);
next_i = i + 1;
! SwitchBit(mii->fState, MFS_ENABLED, SvIV(ST(next_i)));
} else if(strcmp(option, "-name") == 0) {
next_i = i + 1;
#ifdef PERLWIN32GUI_STRONGDEBUG
--- 907,913 ----
} else if(strcmp(option, "-enabled") == 0) {
SwitchBit(mii->fMask, MIIM_STATE, 1);
next_i = i + 1;
! SwitchBit(mii->fState, MFS_DISABLED, ! SvIV(ST(next_i)));
} else if(strcmp(option, "-name") == 0) {
next_i = i + 1;
#ifdef PERLWIN32GUI_STRONGDEBUG