Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-03

Panel height property not working

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Erwin van den Bosch

Hello,

Have a strange problem since revision 23943. The compiler/build info dialog does not look good. The panels on that form have a height of 1 pixel. I build the ide with gtk2.
Revision 23942 is working fine.

Viewing the infobuild.lfm in an text editor shows the right height property values. But loading the form in the ide shows heights of 1 pixel.

Log tells:
------------------------------------------------------------------------ r23942 | mattias | 2010-03-11 16:31:17 +0100 (do, 11 mrt 2010) | 1 line

LCL: newautosize: removed debugging
------------------------------------------------------------------------ r23943 | mattias | 2010-03-11 16:49:01 +0100 (do, 11 mrt 2010) | 1 line

LCL: made NewAutoSize default, added -dOldAutoSize ------------------------------------------------------------------------

Groetjes,
Erwin.

Reply by email

Justin Smyth
to Erwin van den Bosch

Ok guys i have a really hairy one for you , i'm working on directshow player that i'm porting from Delphi to Lazarus x64 , in Lazarus in DirectShow when i call the RenderFile Function out of DirectShow it gives me a nasty exception error - Run Error 58632 ( is this a stub to say not supported yet ? )

Yet if i manually create the direct show filter and add them to the filter graph and conect them together the graph works

The RenderFile Function in DirectShow is defined as

RenderFile(lpcwstrFile, lpcwstrPlayList: pWideChar): HResult; stdcall;

I'm using this function to change my ansistring into a pWideChar -

MultiByteToWideChar(CP_ACP, 0, PChar(FileName), -1, wstrFileName, MAX_PATH);

and i use RenderFile like this -> fGraphBuilder.RenderFile(wstrFileName,nil)

And the Interface for IGraphBuilder from MS is

  IGraphBuilder = interface(IFilterGraph)
    ['{56A868A9-0AD4-11CE-B03A-0020AF0BA770}']
    (*** IGraphBuilder methods ***)
    function Connect(ppinOut, ppinIn: IPin): HResult; stdcall;
    function Render(ppinOut: IPin): HResult; stdcall;
    function RenderFile(lpcwstrFile, lpcwstrPlayList: pWideChar): HResult;
stdcall;
    function AddSourceFilter(lpcwstrFileName, lpcwstrFilterName: LPCWSTR;
        out ppFilter: IBaseFilter): HResult; stdcall;
    function SetLogFile(hFile: THandle): HResult; stdcall;
    function Abort: HResult; stdcall;
    function ShouldOperationContinue: HResult; stdcall;
  end;

and i filtergraph is

  IFilterGraph = interface(IUnknown)
    ['{56A8689F-0AD4-11CE-B03A-0020AF0BA770}']
    (*** IFilterGraph methods ***)
    function AddFilter(pFilter: IBaseFilter; pName: PWideChar): HResult;
stdcall;
    function RemoveFilter(pFilter: IBaseFilter): HResult; stdcall;
    function EnumFilters(out ppEnum: IEnumFilters): HResult; stdcall;
    function FindFilterByName(pName: PWideChar; out ppFilter: IBaseFilter):
HResult; stdcall;
    function ConnectDirect(ppinOut, ppinIn: IPin; pmt: PAMMediaType):
HResult; stdcall;
    function Reconnect(ppin: IPin): HResult; stdcall;
    function Disconnect(ppin: IPin): HResult; stdcall;
    function SetDefaultSyncSource: HResult; stdcall;
  end;

Any help would be great , otherwise i'll have to do some messy hacking to get this working

Reply by email

Vladimir Zhirov
to Justin Smyth: Ok guys i have a really hairy one for you , i'm working on directshow player that i'm…
Justin Smyth wrote 17 lines
Ok guys i have a really hairy one for you , i'm working on directshow player that i'm porting from Delphi to Lazarus x64 , in Lazarus in DirectShow when i call the RenderFile Function out of DirectShow it gives me a nasty exception error - Run Error 58632 ( is this a stub to say not supported yet ? ) Yet if i manually create the direct show filter and add them to the filter graph and conect them together the graph works The RenderFile Function in DirectShow is defined as RenderFile(lpcwstrFile, lpcwstrPlayList: pWideChar): HResult; stdcall; I'm using this function to change my ansistring into a pWideChar - MultiByteToWideChar(CP_ACP, 0, PChar(FileName), -1, wstrFileName, MAX_PATH);

I can only suggest to double-check the file name encoding. If FileName is coming from some UI control like TEdit then it is in UTF-8 and you would need something like

uses ..., lclproc;
var
 s: widestring;
s := UTF8ToUTF16(FileName)
RenderFile(PWideChar(S), nil);

Please note I have almost no experience with widestrings, so the code above may be wrong.

It could be helpful to dump original and converted string to some file before calling RenderFile to see their actual encoding.

Vladimir

Reply by email