Hi John,

first of all it must be
   $file = Win32::GUI::GetSaveFileName(...);
instead of
   $file = GUI::GetSaveFileName(...);

Further I'm not really understanding what you're trying to do with the line
   my $file = "Untitled\0" . ' ' x 256;;
Perhaps it's just a typo but it crashes the interpreter.

I modified these lines and added some basic stuff in the following sample 
code:

# --- SAMPLE START ---

#!/usr/bin/perl

use strict;
use warnings;

use Win32::GUI qw();

my $window_main = Win32::GUI::Window->new(
 -name  => 'window_main',
 -size  => [320, 240],
 -title => 'CmnDlg - Save As',
);

$window_main->Show();

my $file = 'dummy.txt';
my $directory = 'C:/';

# Save as file dialog box, show files with *.txt extension, in messages 
folder

$file = Win32::GUI::GetSaveFileName(
 -owner     =>  $window_main,
 -title     =>  'Save As',
 -directory =>  $directory,
 -filter    =>  ['Text files', '*.txt', 'All files', '*.*'],
 -file      =>  $file,
);

# --- SAMPLE END ---

On my machine (Windows Vista 6.0.6000) it looks perfectly fine with all 
usual fields and controls.

I hope this helps to fix your code, otherwise posting a little more of your 
code could help to find the problem...

Best regards,
Matthias 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/

Reply via email to