[Lazarus] Error when create a main window

Carlos German Tejero german_tejero at yahoo.com.ar
Tue Jan 20 11:38:16 CET 2009


failed to create win32 control, error: 1407

2009/1/20 Vincent Snijders <vincent.snijders at gmail.com>

> 2009/1/20 Carlos German Tejero <german_tejero at yahoo.com.ar>:
> > Hi, i'm using lazarus v0.9.27 r18334 i386-win32-win32/win64 and fpc 2.2.3
> on
> > a WindowsXP64.
> > I try to port a delphi program to lazarus/fpc, but when create then main
> > window, the program raise an exception.
> > The exception raise in Win32WSControls unit:
> >
> > ....
> >       {$ifdef WindowsUnicodeSupport}
> >       if UnicodeEnabledOS then
> >         Window := CreateWindowExW(FlagsEx,
> > PWideChar(WideString(pClassName)),      //<<<--- Return 0
> >           PWideChar(Utf8Decode(WindowTitle)), Flags,
> >           Left, Top, Width, Height, Parent, MenuHandle, HInstance, nil)
> >       else
> >         Window := CreateWindowEx(FlagsEx, pClassName,
> >           PChar(Utf8ToAnsi(WindowTitle)), Flags,
> >           Left, Top, Width, Height, Parent, MenuHandle, HInstance, nil);
> >       {$else}
> >         Window := CreateWindowEx(FlagsEx, pClassName,
> >           PChar(WindowTitle), Flags,
> >           Left, Top, Width, Height, Parent, MenuHandle, HInstance, nil);
> >       {$endif}
> >
> >       if Window = 0 then
> >       begin
> >         raise exception.create('failed to create win32 control, error:
> > '+IntToStr(GetLastError()));  //<<<-- Raise then exception
> >       end;
> > ...
> >
> > The attached file "error.txt" is a backtrace.
> >
> > Any help or suggestion are welcome!!!!
> > Sorry my null english.
>
> If you continue to run it, what is the exception message (or the
> GetLastError)?
>
> Vincent
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 
Carlos Germán Tejero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20090120/0fb4808c/attachment-0007.html>


More information about the Lazarus mailing list