Re: [perl-win32-gui-users] AutoScrolling a RichEdit?

2001-05-03 Thread Morbus Iff

>The workaround is:
>$logbox->SendMessage (0x115, 7, 0);   # scroll to bottom
>$logbox->SendMessage (0x115, 2, 0);   # scroll one page up
>$logbox->SendMessage (0x115, 1, 0);   # scroll one line down
>
>Or, how about one line per \n in the message plus one for the \n added
>outside the var:
>$logbox->SendMessage (0x115, 1, 0) while $message =~ /\n|$/g;
>... okay, this lacks readability, but it works, even under 98 :-)

Whoo hoo! The "1" worked perfectly for me. Thanks for hunting this down for 
me. I appreciate it dearly... You've made the next version of AmphetaDesk 
(shameless plug: http://www.disobey.com/amphetadesk/) even better...


Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/




Re: [perl-win32-gui-users] Windows freezing

2001-05-03 Thread export
Dear  Morbus,
Thank you for your email.
> In essence, LWP uses a blocking call to do whatever it's trying to do.
> Meaning that while LWP is running, Win32::GUI isn't listening to
> events, which is why the window appears to freeze (it's really just
> not listening to your mouseclicks or your window focus).

I do not think it is a problem of LWP but  Win32::GUI. because 
when I used to run very similar procedure as a CGI script under 
Apache web server, that is without Win32::GUI ,there were not 
such problems.

Ladislav



Re: [perl-win32-gui-users] Windows freezing

2001-05-03 Thread Morbus Iff

At 10:54 AM 5/3/01, [EMAIL PROTECTED] wrote:
>Dear  Morbus,
>Thank you for your email.
>> In essence, LWP uses a blocking call to do whatever it's trying to do.
>> Meaning that while LWP is running, Win32::GUI isn't listening to
>> events, which is why the window appears to freeze (it's really just
>> not listening to your mouseclicks or your window focus).
>
>I do not think it is a problem of LWP but  Win32::GUI. because
>when I used to run very similar procedure as a CGI script under
>Apache web server, that is without Win32::GUI ,there were not
>such problems.

Right - that's my point. When you were running your CGI script through 
Apache, you weren't using Win32::GUI. Apache spawns your CGI script as a 
new process, so LWP can take as long as it wants without interfering with 
everything else.


As soon as you run Win32::GUI, you've got to have one stream of 
consciousness listening to all the events happening in Windows. It has to 
listen to mouseclicks, focus events, window grabs, and all that crap. This 
is a constant "all the time" process.


LWP, on the other hand, takes over totally. It becomes the "all the time" 
process the moment it runs. You can't (easily) have two "all the time" 
processes running at the same time, so LWP "wins" since it's the 
latest/newest one.


With LWP being the "all the time", Win32::GUI can't listen to all the crap 
that's going on, so it doesn't know that it's supposed to refresh the 
screen or listen to your mouseclicks or so forth.


It's not a problem with Win32::GUI or LWP really. Both are doing what 
they're supposed to do. And they conflict because of that. If you want your 
window to stop freezing, you have to figure out how to have Win32::GUI and 
LWP listen "all the time" at the same time.


Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/




Re: [perl-win32-gui-users] Windows freezing

2001-05-03 Thread Aldo Calpini
[EMAIL PROTECTED] wrote:
> I do not think it is a problem of LWP but  Win32::GUI. because
> when I used to run very similar procedure as a CGI script under 
> Apache web server, that is without Win32::GUI ,there were not 
> such problems.

woah! this is, perhaps, the most pure nonsense since the epoch ;-)
CGI programming and GUI (or even 'proper') programming are two very
different beasts. you just can't compare them.

your CGI script did indeed 'freeze' just as your Win32::GUI script
does, but you were on the other side of an HTTP connection, so
you didn't noticed this (in fact, staring at the browser waiting
for data to come is the CGI equivalent of 'freezing' :-).
but in this case, there is no 'other side', so your whole program
is blocking (thus no UI -- user interaction) while LWP is working.

this is not a problem of LWP, neither a Win32::GUI one. the real
'problem' here is in the programming approach. you need to perform two
tasks in parallel (UI and LWP fetching its stuff), so guess what you
need? multithreading!

try this:
perldoc -f fork
perldoc perlfork

not the easiest thing in the world, but this is the right way.

cheers,
Aldo

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





[perl-win32-gui-users] Using GetOpenFileName

2001-05-03 Thread Piet De Jong

Hi 
I want to be able to show a dialog box with just a directory listing.

Can I pass any parameters to the function GetOpenFileName to only show
information relative to directories 
return the selected directory ?

Or is there a different function that I need to use ?

Many thanks,
Piet