Hi all,
How Can I make Codejock Control dialog modal to EXTERNAL dll dialog window.
I use Fastreport and would like to make the "SAVE AS" dialog of codejock to be modal to the REPORT DESIGNER of the Fast Report.
Joe.
How Can I make Codejock Control dialog modal
Re: How Can I make Codejock Control dialog modal
hi,
Codejock CommonDialog Control Members have Property : ParentHwnd
Codejock CommonDialog Control Members have Property : ParentHwnd
Handle to the parent control from which the dialog is displayed.
Used to center dialog to the parent window.
greetings by OHR
Jimmy
Jimmy
Re: How Can I make Codejock Control dialog modal
Hi Jimmy,
I have tried that, NOT working. The Fastreport designer has no property for the handle so I use WIN API to get the active Window handle and assigned it to the
:parentHwnd property. What I am not sure of is if the Win API is getting the designer handle or Not.
Is there any other way to get the Hwnd of any dialog apart from WIN API :GetForegroundWindow() ?
Thanks.
Joe.
I have tried that, NOT working. The Fastreport designer has no property for the handle so I use WIN API to get the active Window handle and assigned it to the
:parentHwnd property. What I am not sure of is if the Win API is getting the designer handle or Not.
Is there any other way to get the Hwnd of any dialog apart from WIN API :GetForegroundWindow() ?
Thanks.
Joe.
Re: How Can I make Codejock Control dialog modal
hm ...unixkd wrote:The Fastreport designer has no property for the handle so I use WIN API to get the active Window handle and assigned it to the :parentHwnd property.
if it is a activeX you can try o:Interface
as Name say that is only the Foreground ( Z-Order ) Windows.unixkd wrote:What I am not sure of is if the Win API is getting the designer handle or Not.
Is there any other way to get the Hwnd of any dialog apart from WIN API :GetForegroundWindow() ?
to find any Window use API Function "FindWindowA()" http://msdn.microsoft.com/en-us/library ... 85%29.aspx
find Windows by Title
Code: Select all
PROCEDURE AppSys
LOCAL cTitle := "CD-DVD"
LOCAL hWndDlg := DllCall( "User32.dll", DLL_STDCALL, "FindWindowA", 0, cTitle )
IF !( hWndDlg == 0 )
DllCall( "User32.dll", DLL_STDCALL, "SetForegroundWindow", hWndDlg )
DllCall( "User32.dll", DLL_STDCALL, "BringWindowToTop", hWndDlg )
DllCall( "User32.dll", DLL_STDCALL, "ShowWindow", hWndDlg, 1 )
DllCall( "User32.dll", DLL_STDCALL, "UpdateWindow", hWndDlg )
*** It is a second instance.... Bye Bye
QUIT
ENDIF
RETURN
Code: Select all
nNotepad := DllCall("User32.dll", DLL_STDCALL, "FindWindowA", "Notepad"+ Chr(0), 0)
find some special Windows ( e.g. Commen Dialogs )
Code: Select all
nFaxWin := DllCall("User32.dll", DLL_STDCALL, "FindWindowA", "#32770"+ Chr(0), "FRITZ!fax - send by Xbase++" + Chr(0))
Code: Select all
FUNCTION CJ_SetXParent( hWndChild, hWndNewParent )
DllCall( 'User32', DLL_STDCALL, 'SetParent', hWndChild,hWndNewParent)
RETURN NIL
greetings by OHR
Jimmy
Jimmy