I want to make a splash screen, I do not know the best way, but I drew a
Window with -style=> WS_POPUP
this worked on win98, but on windows2003 server, Activestatperl 5.83 I still
see the title of the window.
Also the window opens with default grey color of windows for a moment, then
the image appears over it appears, although I
set -background=>[255,255,255], and called SetImage($hbitmap) before showing
the window. also the title bar is still shown.


I also tried using win32:API to draw that window as I need it only once
through my program but the GetCurrentProcessId failed, windows2003 said the
call refrenced memory, the memory can't be read.

here is the code:
use Win32::API;

$instfunc = new Win32::API("kernel32", "GetModuleHandle",  '',  'F');
if(not defined $instfunc) {
        die "Cant import API GetModuleHandle: $!\n";
    }

print "Before Call \n";                                 # <---- I see this.
my $hInstance = $instfunc->Call();
print "After Call \n";                                    # <---- I cant see
this. The program stops before it. Do I need to allocate memory for a
pointer in Perl ?, How?

$DrawSplash = new Win32::API("user32", "CreateWindowEx",  'NPPNIIIIPPPP',
'P');
if(not defined $DrawSplash) {
        die "Cant import API CWindow: $!\n";
    }

$hwnd = $DrawSplash->Call(WS_EX_CLIENTEDGE,"Splash","Title",WS_POPUP,100,
   100,240,120,NULL,NULL, $hInstance,NULL);




Reply via email to