ActiveX Controls and hWnds: Getting a Presenter "into" a Control - Smalltalk

This is a discussion on ActiveX Controls and hWnds: Getting a Presenter "into" a Control - Smalltalk ; Hello Forum, We have an ActiveX control that allows us to create what the software designers have called a DialogBar (bring up any "task pane" in a Microsoft Office application and you'll see what a DialogBar is--a cross between a ...

+ Reply to Thread
Results 1 to 3 of 3

ActiveX Controls and hWnds: Getting a Presenter "into" a Control

  1. Default ActiveX Controls and hWnds: Getting a Presenter "into" a Control

    Hello Forum,

    We have an ActiveX control that allows us to create what the software
    designers have called a DialogBar (bring up any "task pane" in a
    Microsoft Office application and you'll see what a DialogBar is--a cross
    between a CommandBar and a Dialog).

    The content of the DialogBar is defined as an hWnd reference to [what
    other environments would call] a "form." Translated into Dolphin: the
    hWnd reference of a Presenter, which we know can be obtained in the
    following manner:

    p := ListPresenter create.
    contentHandle := p asParameter asInteger.

    (The DialogBar control expects the ChildHandle to be of type "long";
    hence the #asInteger send).

    We have no problem with the scenario above, except we seem to be unable
    to obtain an hWnd without actually opening the Presenter first. Now, we
    understand that first a connection to a view must be established in
    order to obtain the hWnd. But is there a way to create a Presenter that
    doesn't automatically open, yet provides a connected view?

    Thanks.


    Cheers,

    Eric


  2. Default Re: ActiveX Controls and hWnds: Getting a Presenter "into" a Control

    "Eric Taylor" <estaylor@cgpaint.com> wrote in message
    news:001c01c6d9dc$7a2cb2a0$6500a8c0@server...
    > Hello Forum,
    >
    > We have an ActiveX control that allows us to create what the software
    > designers have called a DialogBar (bring up any "task pane" in a
    > Microsoft Office application and you'll see what a DialogBar is--a cross
    > between a CommandBar and a Dialog).
    >
    > The content of the DialogBar is defined as an hWnd reference to [what
    > other environments would call] a "form." Translated into Dolphin: the
    > hWnd reference of a Presenter, which we know can be obtained in the
    > following manner:
    >
    > p := ListPresenter create.
    > contentHandle := p asParameter asInteger.
    >
    > (The DialogBar control expects the ChildHandle to be of type "long";
    > hence the #asInteger send).
    >
    > We have no problem with the scenario above, except we seem to be unable
    > to obtain an hWnd without actually opening the Presenter first. Now, we
    > understand that first a connection to a view must be established in
    > order to obtain the hWnd. But is there a way to create a Presenter that
    > doesn't automatically open, yet provides a connected view?
    > ...


    Well yes, normally by using #create inside a parent that is not visible. The
    reason that the presenter above is being automatically shown is because you
    are creating it outside a top-level presenter, and the system "helpfully"
    creates you a visible shell in order that you can use this kind of
    expression for testing/investigation purposes. I suggest debugging through
    'ListPresenter create' in order to see what happens - most of the action is
    Presenter>>createView:

    If you'd written your example like this, then the views would be created but
    hidden:

    s := Shell create.
    p := ListPresenter createIn: s.
    ....

    HTH

    OA


  3. Default Re: ActiveX Controls and hWnds: Getting a Presenter "into" a Control

    Support at Object Arts,

    I will give this a try later today. What you say makes perfect sense.

    Thank you.


    Cheers,

    Eric


    > -----Original Message-----
    > From: Support at Object Arts [mailto:support@objectHYPHENarts.com]
    > Posted At: Wednesday, September 20, 2006 10:58 AM
    > Posted To: comp.lang.smalltalk.dolphin
    > Conversation: ActiveX Controls and hWnds: Getting a Presenter "into" a
    > Control
    > Subject: Re: ActiveX Controls and hWnds: Getting a Presenter "into" a
    > Control
    >
    > "Eric Taylor" <estaylor@cgpaint.com> wrote in message
    > news:001c01c6d9dc$7a2cb2a0$6500a8c0@server...
    > > Hello Forum,
    > >
    > > We have an ActiveX control that allows us to create what the

    software
    > > designers have called a DialogBar (bring up any "task pane" in a
    > > Microsoft Office application and you'll see what a DialogBar is--a

    cross
    > > between a CommandBar and a Dialog).
    > >
    > > The content of the DialogBar is defined as an hWnd reference to

    [what
    > > other environments would call] a "form." Translated into Dolphin:

    the
    > > hWnd reference of a Presenter, which we know can be obtained in the
    > > following manner:
    > >
    > > p := ListPresenter create.
    > > contentHandle := p asParameter asInteger.
    > >
    > > (The DialogBar control expects the ChildHandle to be of type "long";
    > > hence the #asInteger send).
    > >
    > > We have no problem with the scenario above, except we seem to be

    unable
    > > to obtain an hWnd without actually opening the Presenter first.

    Now, we
    > > understand that first a connection to a view must be established in
    > > order to obtain the hWnd. But is there a way to create a Presenter

    that
    > > doesn't automatically open, yet provides a connected view?
    > > ...

    >
    > Well yes, normally by using #create inside a parent that is not

    visible.
    > The
    > reason that the presenter above is being automatically shown is

    because
    > you
    > are creating it outside a top-level presenter, and the system

    "helpfully"
    > creates you a visible shell in order that you can use this kind of
    > expression for testing/investigation purposes. I suggest debugging

    through
    > 'ListPresenter create' in order to see what happens - most of the

    action
    > is
    > Presenter>>createView:
    >
    > If you'd written your example like this, then the views would be

    created
    > but
    > hidden:
    >
    > s := Shell create.
    > p := ListPresenter createIn: s.
    > ...
    >
    > HTH
    >
    > OA



+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 12-21-2007, 12:17 PM
  2. "Internet Explorer" "Operation aborted" and "Menu Control"
    By Application Development in forum DOTNET
    Replies: 1
    Last Post: 10-04-2007, 04:53 PM
  3. ActiveX control "Click to activate and use this control" message
    By Application Development in forum Inetserver
    Replies: 4
    Last Post: 01-21-2007, 05:35 AM
  4. """""""""""""""""""""Visual C++ 2005 Express"""""""""""""""""
    By Application Development in forum DOTNET
    Replies: 0
    Last Post: 03-12-2006, 03:55 AM