failed to create win32 control, error: 1407<br><br><div class="gmail_quote">2009/1/20 Vincent Snijders <span dir="ltr"><<a href="mailto:vincent.snijders@gmail.com">vincent.snijders@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/1/20 Carlos German Tejero <<a href="mailto:german_tejero@yahoo.com.ar">german_tejero@yahoo.com.ar</a>>:<br>
<div><div></div><div class="Wj3C7c">> Hi, i'm using lazarus v0.9.27 r18334 i386-win32-win32/win64 and fpc 2.2.3 on<br>
> a WindowsXP64.<br>
> I try to port a delphi program to lazarus/fpc, but when create then main<br>
> window, the program raise an exception.<br>
> The exception raise in Win32WSControls unit:<br>
><br>
> ....<br>
> {$ifdef WindowsUnicodeSupport}<br>
> if UnicodeEnabledOS then<br>
> Window := CreateWindowExW(FlagsEx,<br>
> PWideChar(WideString(pClassName)), //<<<--- Return 0<br>
> PWideChar(Utf8Decode(WindowTitle)), Flags,<br>
> Left, Top, Width, Height, Parent, MenuHandle, HInstance, nil)<br>
> else<br>
> Window := CreateWindowEx(FlagsEx, pClassName,<br>
> PChar(Utf8ToAnsi(WindowTitle)), Flags,<br>
> Left, Top, Width, Height, Parent, MenuHandle, HInstance, nil);<br>
> {$else}<br>
> Window := CreateWindowEx(FlagsEx, pClassName,<br>
> PChar(WindowTitle), Flags,<br>
> Left, Top, Width, Height, Parent, MenuHandle, HInstance, nil);<br>
> {$endif}<br>
><br>
> if Window = 0 then<br>
> begin<br>
> raise exception.create('failed to create win32 control, error:<br>
> '+IntToStr(GetLastError())); //<<<-- Raise then exception<br>
> end;<br>
> ...<br>
><br>
> The attached file "error.txt" is a backtrace.<br>
><br>
> Any help or suggestion are welcome!!!!<br>
> Sorry my null english.<br>
<br>
</div></div>If you continue to run it, what is the exception message (or the GetLastError)?<br>
<br>
Vincent<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lazarus.freepascal.org">Lazarus@lazarus.freepascal.org</a><br>
<a href="http://www.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://www.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Carlos Germán Tejero<br>