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 |
"Eric Taylor" <[hidden email]> 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 |
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:[hidden email]] > 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" <[hidden email]> wrote in message > news:001c01c6d9dc$7a2cb2a0$6500a8c0@server... > > Hello Forum, > > > > We have an ActiveX control that allows us to create what the > > 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 > > 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 |
Free forum by Nabble | Edit this page |