I have tried to call Win32 API SetParent, then send a WM_CHANGEUISTATE
message to the new parent, but the parent of the VB6 form remains NULL.
Has anyone been successful doing that?
Marlon
Magnus Lindström wrote:
> I have made a function in a Visual C++ DLL which shows a modified
> Common Dialog (Save File) with an additional button.
> When this button is pressed I call a VB function which looks something
> like this:
>
> Public Sub CallbackSaveFileDlg(hWnd As Long)
> 'hWnd is the hWnd of the common dialog which still is visible
> frmOptions.Show vbModal 'TODO add [OwnerForm]
> End Sub
>
> I sure would like to put something derived from hWnd as the [OwnerForm].
>
> Any ideas ?
> Anyone tried to change a common dialog in pure VB ?
>
> --
> Magnus Lindstrom
I still have some questions. When I use Spy++ to look up the
properties of the sample dialog (after I click "Make me modal to
Notepad" button), the parent window of it is NULL and owner is
ThunderRT5Main (the VB5 runtime window).
I am not sure if it is possible or pratical to change the owner window.
I am wondering if we can change the parent.
I didn't want to make my question lengthy at first, but I guess I
misled you. We have an ActiveX document application written in C++,
which has an add-in framework to load DLLs at run-time. Among those
add-ins, some are writen in C++, some are in VB6. Now we have a
problem with some modal dialog boxes. The problem is when opening the
ActiveX document app in IE, some modal dialogs can appear behind the
browser. (like the upgrade window in Adobe Arobat reader).
What we have found out is IE cannot manage modal behavior very well
without the parent of modal dialog being set to IE - the container.
I found IE handles following dialog boxes OK:
- CDialog::DoModal()
- AfxMessageBox(...)
While it doesn't handle modal behavor well with all VB modal forms.
Any ideas?
Did you try
Call SetWindowLong(hwndOwned, GWL_HWNDPARENT, hwndOwner)
which makes an ownership between both of the windows which also causes the
owned window to be on top of the owner and to disappear/appear when the
owner will be minimized/restored?
Juergen.
--
────────────────────────
Bridge Eng.,Tongji Univ.,Shanghai,PRC
Cobalt
E-mail:xiaoso...@263.net
────────────────────────
"Juergen Thuemmler" <th...@removethisgmx.de> 写入消息新闻:%23sdYOPk...@TK2MSFTNGP03.phx.gbl...