[perl-win32-gui-users] damn!

2002-02-20 Thread Aldo Calpini
hello people!

I'm really sorry about my unforgivable absence of the last months :-(
just yesterday I discovered that I was kicked off this mailing list, due to
message bouncing, due to my broken email configuration.

I'm going through all kind of problems lately, last but not least the one
with DNS: you may have noticed that dada.perl.it is not there anymore, but
I'm (hopefully) getting back the control of my DNS, so this should be solved
sooner or later. I'm still depending on my ISP's geological times for this,
so I can't give a date. but in the mean time, dada's perl lab is still
available at: http://www.perl.it/dada/

and then, I had a major hard disk failure that scratched all my development
environment (the source itself are safe), so that I still can't compile
Win32::GUI as of now :-(

but except for that, I would like to go on with this module. the latest
version (build 659) is ready, but I just can't test it. I will release the
source on my site, and if someone can provide a binary (PPM or just the DLL,
I can package the PPM), this would be very appreciated.

regarding the last discussions (that I'm reading in the archives ;-), I can
say that the Tooltip question is fully implemented now. every control has
a -tip option that directly specifies the text that should appear in the
tooltip when the mouse is over it.

sorry again, people, I hope to be more "efficient" (?) in the future :-)

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;







Re: [perl-win32-gui-users] damn!

2002-02-20 Thread paul . barker
Hi Aldo

Nice to hear from you again - sorry to hear about your problems :(

I can produce a PPM if you let me know when the source is available.

Cheers

Paul




"Aldo Calpini" <[EMAIL PROTECTED]> on 20/02/2002 09:12:36




To:   "Perl-Win32-GUI-Users" 
cc:(bcc: Paul BARKER/IT/HTLUK)
bcc:  Paul BARKER/IT/HTLUK


Subject:  [perl-win32-gui-users] damn!



hello people!

I'm really sorry about my unforgivable absence of the last months :-(
just yesterday I discovered that I was kicked off this mailing list, due to
message bouncing, due to my broken email configuration.

I'm going through all kind of problems lately, last but not least the one
with DNS: you may have noticed that dada.perl.it is not there anymore, but
I'm (hopefully) getting back the control of my DNS, so this should be solved
sooner or later. I'm still depending on my ISP's geological times for this,
so I can't give a date. but in the mean time, dada's perl lab is still
available at: http://www.perl.it/dada/

and then, I had a major hard disk failure that scratched all my development
environment (the source itself are safe), so that I still can't compile
Win32::GUI as of now :-(

but except for that, I would like to go on with this module. the latest
version (build 659) is ready, but I just can't test it. I will release the
source on my site, and if someone can provide a binary (PPM or just the DLL,
I can package the PPM), this would be very appreciated.

regarding the last discussions (that I'm reading in the archives ;-), I can
say that the Tooltip question is fully implemented now. every control has
a -tip option that directly specifies the text that should appear in the
tooltip when the mouse is over it.

sorry again, people, I hope to be more "efficient" (?) in the future :-)

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;





___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users





***
Important.
Confidentiality: This communication is intended for the above-named person and
may be confidential and/or legally privileged. Any opinions expressed in this
communication are not necessarily those of the company. If it has come to you
in error you must take no action based on it, nor must you copy or show it to
anyone; please delete/destroy and inform the sender immediately.

Monitoring/Viruses
Orange may monitor all incoming and outgoing emails in line with current
legislation.  Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually virus free.

Orange PCS Limited is a subsidiary of Orange SA and is registered in England No
2178917, with its address at St James Court, Great Park Road, Almondsbury Park,
Bradley Stoke, Bristol BS32 4QJ.
***




[perl-win32-gui-users] question

2002-02-20 Thread Christian Koul
Hello,

Need help for this configuration (perl -v)
This is perl, v5.6.1 built for MSWin32-x86-multi-thread (with 1
registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 631 provided by ActiveState Tool Corp. http://www.
Built 17:16:22 Jan  2 2002
When i write  D:\PERL\WIN32\SAMPLES>perl hello.pl
Can't load 'D:/Perl/site/lib/auto/Win32/GUI/GUI.dll' for module
Win32::GUI: load_file:Le module spÚcifiÚ est introuvable at
D:/Perl/lib/DynaLoader.pm line 206.
Compilation failed in require at hello.pl line 9.
BEGIN failed--compilation aborted at hello.pl line 9.

Is there a way to solve? binary version of Win32-GUI installed with it's
install.bat file,?

--
Cordialement,

Ch. Koul



Re: [perl-win32-gui-users] ListView Checkboxes, ImageList, etc.

2002-02-20 Thread Sean Healy
I looked up some information on the LVM_SETITEMSTATE message (I've 
reproduced it below).  The only problem is that it wants a pointer, and when 
I've tried to pass pointers to SendMessage before, it doesn't work.  I pack 
the structure, then pack a pointer to it (I've tried using both 'p' and 'P' 
in my pack call), but it doesn't like the resulting pointer.  Anyway, maybe 
someone else can get it to work (I haven't actually tried it with this 
message).



From the MSDN web site (msdn.microsoft.com):


To send this message, call the SendMessage  function as follows.

lResult = SendMessage( // returns LRESULT in lResult
  (HWND) hWndControl, // handle to destination control
  (UINT) LVM_SETITEMSTATE, // message ID
  (WPARAM) wParam, // = (WPARAM) (int) i;
  (LPARAM) lParam // = (LPARAM) (LPLVITEM) pitem;
);

Parameters

i
Index of the list-view item. If this parameter is -1, then the state change 
is applied to all items.


pitem
Pointer to an LVITEM structure. The stateMask member specifies which state 
bits to change, and the state member contains the new values for those bits. 
The other members are ignored.



Syntax

typedef struct _LVITEM {
   UINT mask;
   int iItem;
   int iSubItem;
   UINT state;
   UINT stateMask;
   LPTSTR pszText;
   int cchTextMax;
   int iImage;
   LPARAM lParam;
#if (_WIN32_IE >= 0x0300)
   int iIndent;
#endif
#if (_WIN32_IE >= 0x560)
   int iGroupId;
   UINT cColumns; // tile view columns
   PUINT puColumns;
#endif
} LVITEM, *LPLVITEM;

Members

mask
   Set of flags that specify which members of this structure contain data 
to be set or which members are being requested. This member can have one or 
more of the following flags set:


   LVIF_COLUMNS
   The cColumns member is valid or must be filled in.
   LVIF_DI_SETITEM
   The operating system should store the requested list item information 
and not ask for it again. This flag is used only with the LVN_GETDISPINFO 
notification message.

   LVIF_GROUPID
   The iGroupId member is valid or must be filled in.
   LVIF_IMAGE
   The iImage member is valid or must be filled in.
   LVIF_INDENT
   The iIndent member is valid or must be filled in.
   LVIF_NORECOMPUTE
   The control will not generate LVN_GETDISPINFO to retrieve text 
information if it receives an LVM_GETITEM message. Instead, the pszText 
member will contain LPSTR_TEXTCALLBACK.

   LVIF_PARAM
   The lParam member is valid or must be filled in.
   LVIF_STATE
   The state member is valid or must be filled in.
   LVIF_TEXT
   The pszText member is valid or must be filled in.
iItem
Zero-based index of the item to which this structure refers. iSubItem
One-based index of the subitem to which this structure refers, or zero if 
this structure refers to an item rather than a subitem.

state
   Indicates the item's state, state image, and overlay image. The 
stateMask member indicates the valid bits of this member.


   Bits 0 through 7 of this member contain the item state flags. This can 
be one or more of the item state values.


   Bits 8 through 11 of this member specify the one-based overlay image 
index. Both the full-sized icon image list and the small icon image list can 
have overlay images. The overlay image is superimposed over the item's icon 
image. If these bits are zero, the item has no overlay image. To isolate 
these bits, use the LVIS_OVERLAYMASK mask. To set the overlay image index in 
this member, you should use the INDEXTOOVERLAYMASK macro. The image list's 
overlay images are set with the ImageList_SetOverlayImage function.


   Bits 12 through 15 of this member specify the state image index. The 
state image is displayed next to an item's icon to indicate an 
application-defined state. If these bits are zero, the item has no state 
image. To isolate these bits, use the LVIS_STATEIMAGEMASK mask. To set the 
state image index, use the INDEXTOSTATEIMAGEMASK macro. The state image 
index specifies the index of the image in the state image list that should 
be drawn. The state image list is specified with the LVM_SETIMAGELIST 
message.

stateMask
   Value specifying which bits of the state member will be retrieved or 
modified. For example, setting this member to LVIS_SELECTED will cause only 
the item's selection state to be retrieved.


   This member allows you to modify one or more item states without having 
to retrieve all of the item states first. For example, setting this member 
to LVIS_SELECTED and state to zero will cause the item's selection state to 
be cleared, but none of the other states will be affected.


   To retrieve or modify all of the states, set this member to (UINT)-1.

   You can use the macro ListView_SetItemState both to set and to clear 
bits.

pszText
   If the structure specifies item attributes, pszText is a pointer to a 
null-terminated string containing the item text. If the structure receives 
item attributes, pszText is a pointer to a buffer that receives the item 
text.


   If the value of pszText i

Re: [perl-win32-gui-users] question

2002-02-20 Thread Sean Healy

When i write  D:\PERL\WIN32\SAMPLES>perl hello.pl
Can't load 'D:/Perl/site/lib/auto/Win32/GUI/GUI.dll' for module
Win32::GUI: load_file:Le module spÚcifiÚ est introuvable at
D:/Perl/lib/DynaLoader.pm line 206.
Compilation failed in require at hello.pl line 9.
BEGIN failed--compilation aborted at hello.pl line 9.

Is there a way to solve? binary version of Win32-GUI installed with it's
install.bat file,?


Did you use PPM, or just unpack the .gz?  It looks like your DLL didn't make 
it to the right place.


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com




[perl-win32-gui-users] How to fix an image to a window ?

2002-02-20 Thread Guillem Cunillera Wefers

Hi, I'm doing a graphical inside a window, but when I move the window out the 
borders or when I put another window over the first, the image is cutted.
I attach the module and I am sure that there is  an easy solution.
Thanks,

package Mailtool::calculc;


use Mailtool::msg;
use Mailtool::accesweb;
use Mailtool::seleccio;
use Win32::GUI;

use Mailtool::loginUOC;

# =
# FINESTRES
# =

$w_calculcon = Win32::GUI::Window->new (
 -top  => 0,
 -left  => 0,
 -maxsize => [800,600], 
 -width  => 800, 
 -height  => 600, 
 -text  => "Resultats Tutor", 
 -name  => "Mailtool::calculcon::e_w_calculcon",);

# =
#   FONTS
# =

 $fo_normal = Win32::GUI::Font->new (
  -size => 16, 
  -bold => 0,);

  $fo_negreta = Win32::GUI::Font->new (
  -size => 16, 
  -bold => 1,);

  $fo_cursiva = Win32::GUI::Font->new (
   -size => 14, 
  -bold => 1, 
  -italic => 1,);

 $fo_petita = Win32::GUI::Font->new (
  -size => 11, 
  -bold => 0,);
  



# ===
# PENS
# ===

 my $verd  = new Win32::GUI::Pen(
-color => 65280 
);

 my $blau = new Win32::GUI::Pen(
   -color => 16711680
  );
 
 my $groc = new Win32::GUI::Pen(
   -color => 0xFF
  ); 
  




# =
# CRIDES EXTERNES
# =

# -
  sub prepara {
# -

 $w_calculcon->Show();
 
 # $Screen = new Win32::GUI::DC("DISPLAY");
 
  $Screen = $w_calculcon->GetDC;
}


# -
  sub visualitza {
# -

 $refdata = shift(@_);
$nbusties=shift(@_);
 $posinimin =shift(@_);
 $datamin=shift(@_);
 $posinimax =shift(@_);
 $datamax=shift(@_);
 $refbusties = shift(@_);
 $infotex = shift(@_);
 

 # crida:  Mailtool::calculc::visualitza([EMAIL 
PROTECTED],$busties,$posinimin,$posinimax,$refbusties);


 $diesfinestra=7;



 $Screen->Rectangle(50,50, 700,570);
 
 $alcadamax=0;
 $ii = $posinimin;
 while ($ii+$diesfinestra-1<=$posinimax)
 {
  for $jj (0..$nbusties-1)
  {
   $info[$jj][$ii-$posinimin]=0;
   for $kk (0..$diesfinestra-1)
   {
if (exists ($refdata->[$jj][$ii+$kk]))
{
 
$info[$jj][$ii-$posinimin]=$info[$jj][$ii-$posinimin]+$refdata->[$jj][$ii+$kk];
}
   }
   if ($info[$jj][$ii-$posinimin]>$alcadamax)
   {
$alcadamax=$info[$jj][$ii-$posinimin];
   }
  }
  $ii++;
 }
 

 $Screen->TextOut(35,25,$infotex);
 
 $Screen->TextOut(5,42,$alcadamax);  # el -8 es pel tamany de la font que es 16
 $Screen->TextOut(5,302,$alcadamax/2);
 $Screen->TextOut(5,562,0);
 
 $Screen->TextOut(30,580,$datamin.'+ 0..6');
 $Screen->TextOut(670,580,$datamax.'+ 0..6');
 
 
 
 $espai=648/($ii-$posinimin-1);
 

 for $ll (0..$nbusties-1)
 {
   $ypos[$ll]=570;
   
   if ($ll==0)
   {
$Screen->SelectObject($blau);
   }
   if ($ll==1)
   {
$Screen->SelectObject($verd);
   }
   if ($ll==2)
   {
$Screen->SelectObject($groc);
   }
   
   $Screen->MoveTo(705,80+$ll*60);
   $Screen->LineTo(780,80+$ll*60);
   $Screen->SelectObject($fo_petita);
   $Screen->TextOut(705,80+$ll*60+10,$refbusties->[$ll]->{Nom});
   
   
 }
 
 
 for $i (0..$ii-$posinimin-1)
 {
 
  $xpos = 50 +$espai*$i;
  
  for $ll (0..$nbusties-1)
  {
   if ($ll==0)
   {
$Screen->SelectObject($blau);
   }
   if ($ll==1)
   {
$Screen->SelectObject($verd);
   }
   if ($ll==2)
   {
$Screen->SelectObject($groc);
   }
   
   $yposvell[$ll]=$ypos[$ll];
   $ypos[$ll]=569-520*$info[$ll][$i]/$alcadamax;
   print " y: $ypos[$ll] \n";
   if ($i>0)
   {
$Screen->MoveTo($xpos-$espai,$yposvell[$ll]);
$Screen->LineTo($xpos,$ypos[$ll]);
   }
  }
 }
 
 Win32::GUI::Dialog();
  
}





#sub w_calculcon_Resize {
# print "holaa \n";
#  
visualitza($refdata,$nbusties,$posinimin,$datamin,$posinimax,$datamax,$refbusties,$infotex);
#}

1;


RE: [perl-win32-gui-users] damn!

2002-02-20 Thread Frazier, Joe Jr

> -Original Message-
> From: Aldo Calpini [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 20, 2002 4:13 AM
> To: Perl-Win32-GUI-Users
> Subject: [perl-win32-gui-users] damn!
> 
> 
> hello people!
> 
> I'm really sorry about my unforgivable absence of the last months :-(
> just yesterday I discovered that I was kicked off this 
> mailing list, due to
> message bouncing, due to my broken email configuration.
> 
> I'm going through all kind of problems lately, last but not 
> least the one
> with DNS: you may have noticed that dada.perl.it is not there 
> anymore, but
> I'm (hopefully) getting back the control of my DNS, so this 
> should be solved
> sooner or later. I'm still depending on my ISP's geological 
> times for this,
> so I can't give a date. but in the mean time, dada's perl lab is still
> available at: http://www.perl.it/dada/
> 
> and then, I had a major hard disk failure that scratched all 
> my development
> environment (the source itself are safe), so that I still 
> can't compile
> Win32::GUI as of now :-(
> 
> but except for that, I would like to go on with this module. 
> the latest
> version (build 659) is ready, but I just can't test it. I 
> will release the
> source on my site, and if someone can provide a binary (PPM 
> or just the DLL,
> I can package the PPM), this would be very appreciated.
> 
> regarding the last discussions (that I'm reading in the 
> archives ;-), I can
> say that the Tooltip question is fully implemented now. every 
> control has
> a -tip option that directly specifies the text that should 
> appear in the
> tooltip when the mouse is over it.

Ohh  Goodie!!
What other things are now implimented?   Has anyone had a chance to 
update/flesh out the documentation?  The examples all working now?  I saw a few 
months ago that it appeared that only two users could work on the project on 
sourcefourge, is there a posibility of having others contribute either xs code, 
docs, or examples so that releases dont take as long?  

Dont get me wrong, I am sure you have many other duties and obligations outside 
of Win32::GUI and I (along with so many others) REALLY appreciate all the time 
you have spent/can afford to spend on such a great tool for us Win32 perl 
hackers, but hopefully, if some others could give you some help, the entire 
community could benefit.  I for one would love to see more work done on the 
AcceloratorTable feature ( along with standard events for most 
controls(rightclick, click, gotfocus,lostfocus, etc), but am extremely happy 
now that the Tooltips should be functional.

Thanks for all the good work!


> 
> sorry again, people, I hope to be more "efficient" (?) in the 
> future :-)
> 
> cheers,
> Aldo
> 
> __END__
> $_=q,just perl,,s, , another ,,s,$, hacker,,print;
> 
> 
> 
> 
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



Re: [perl-win32-gui-users] How to fix an image to a window ?

2002-02-20 Thread Johan Lindstrom

At 19:36 2002-02-20 +0100, Guillem Cunillera Wefers wrote:
Hi, I'm doing a graphical inside a window, but when I move the window out 
the borders or when I put another window over the first, the image is cutted.

I attach the module and I am sure that there is  an easy solution.


I gather you are painting on the DC of your Window object. Assuming that, 
the problem is this: if you take on the responsibility to paint the Window 
yourself, you need to actually do that at certain points in time. When the 
OS regognizes that that something needs to be repainted it sends a WM_PAINT 
message to the window.


The only control in Win32::GUI that has a Paint event is the Graphic (well, 
and InteractiveGraphic or whatever it's called). So add a 
Win32::GUI::Graphic control and paint on that in the yourControlName_Paint 
sub. Windows will take care of _when_ to paint it, and you can force it to 
paint if you use the InvalidateRect() method on the control.



/J

 --  --- -- --  --  -- -  - -
Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED]

Latest bookmark: "Record Labels' Answer to Napster Still Has A..."
http://www.nytimes.com/2002/02/18/technology/18SONG.html





[perl-win32-gui-users] ListView Checkboxes Initial State Workaround

2002-02-20 Thread Eric Hansen
Since it does not appear that the checkbox initial state can be conventionally 
changed, how about an unconventional approach to the problem???

How about drawing yourself 2 bitmaps. One that looks like a checked checkbox 
and one that looks like an unchecked checkbox.  Then, define your ListView 
control without checkboxes but do assign an image list to the ListView 
containing your 2 checkbox bitmaps you just drew.  Then in your program you can 
give the appearance of checkboxes being activated by displaying either the 
checked or non-checked image by each data row in the ListView.  You can change 
the image(check state) by toggling the image within the ItemClick Event.  Use 
the ItemInfo Method to determine which image is displayed and use the 
ChangeItem method to display the other image. Hope this isn't too cheesy for 
everyone 

Eric Hansen
Dallas, TX USA 




[perl-win32-gui-users] ListView Checkboxes Workaround

2002-02-20 Thread Eric Hansen
BELOW CODE MIGHT BE USED TO SIMULATE LISTVIEW CHECKBOXES BY TOGGLING  DISPLAYED 
IMAGES IN AN IMAGE LIST.  YOU CAN SUBSTITUTE THE Bitmap filenames TO THOSE YOU 
HAVE ON HAND. 

use Win32::GUI;

$W = new Win32::GUI::DialogBox(
-name => "Window",
-text => "ListView Checkboxes Workaround",
-width => 275,
-height => 250,
-left => 50,
-top => 50
);


$B1 = new Win32::GUI::Bitmap("node.bmp");
$B2 = new Win32::GUI::Bitmap("node_sel.bmp");
$IL = new Win32::GUI::ImageList(16, 16, 0, 2, 10);
$IL->Add($B1, 0);
$IL->Add($B2, 0);

$LV = $W->AddListView(
 -name => "ListView",
 -multisel => 0,
 -left => 12,
 -top => 10,
 -height => 200,
 -width  => 225, 
);
$LV->View(1);  # detailed listing, i.e. columns and rows
$LV->SetImageList($IL,1);

$W->Show();
$W->BringWindowToTop();
Load_ListView();


Win32::GUI::Dialog();


sub Load_ListView {
   $LV->InsertColumn(-index => 1, -width => 200, -text => "FRUIT");  
   
   $LV->InsertItem(-item => 0, -text => "Apples",  -image => 0);
   $LV->InsertItem(-item => 1, -text => "Pears",   -image => 1);
   $LV->InsertItem(-item => 2, -text => "Oranges", -image => 0);
}  

sub ListView_ItemClick {
   $item=shift;
   %data=();
   %data=$LV->ItemInfo($item);  
   if ($data{-image} == 0) {
  $LV->ChangeItem(-item => $item, -image => 1);   
   } else {
  $LV->ChangeItem(-item => $item, -image => 0);
   }

}

sub Window_Terminate {
   return -1;
}





[perl-win32-gui-users] multiline menu items

2002-02-20 Thread Glenn Linderman
Hi,

I have an application where I'd like to have a multi-line menu item. 
I've seen that in programs, where the first line of the menu item has
text in the normal position, and the subsequent line(s) are further
indented, and when your mouse approaches/leaves the first or last line,
all of them change background color at once to show that the whole
multi-line item is selected/deselected.

Is this possible with Win32::GUI::Menu and/or Win23::GUI::MenuItem ???

-- 
Glenn
=
Remember, 84.3% of all statistics are made up on the spot.



[perl-win32-gui-users] Re: Listview Checkboxes

2002-02-20 Thread Paul Cooke
This is how I got it to work:

use Win32::API 0.20;
my $SendMsg = new Win32::API("user32", "SendMessage", "NNNP", "N");


use constant LVIF_STATE  => 0x8;
use constant LVM_SETITEMSTATE  => 0x102B;
use constant LVIS_STATEIMAGEMASK  => 0xF000;

my $LV = $Window->AddListView(
-name  => "ListView",
etc

To select:
my $lpPoint = pack("LA", LVIF_STATE, 0, 0, 0x2000,
LVIS_STATEIMAGEMASK, " ", 127, 0, 0, 0);
my $rtn = $SendMsg->Call($LV->{'-handle'}, LVM_SETITEMSTATE, -1, $lpPoint);

where -1 ticks all checkboxes, otherwise change to the index of the one you
want to select.

To un-select:
my $lpPoint = pack("LA", LVIF_STATE, 0, 0, 0x1000,
LVIS_STATEIMAGEMASK, " ", 127, 0, 0, 0);
my $rtn = $SendMsg->Call($LV->{'-handle'}, LVM_SETITEMSTATE, -1, $lpPoint);


Paul Cooke

-
Go Domino Pay per Click Search Engine
http://www.godomino.com?sig1
-