How Can I make Codejock Control dialog modal

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 579
Joined: Thu Feb 11, 2010 1:39 pm

How Can I make Codejock Control dialog modal

#1 Post by unixkd »

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.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: How Can I make Codejock Control dialog modal

#2 Post by Auge_Ohr »

hi,

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

User avatar
unixkd
Posts: 579
Joined: Thu Feb 11, 2010 1:39 pm

Re: How Can I make Codejock Control dialog modal

#3 Post by unixkd »

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.

User avatar
Auge_Ohr
Posts: 1428
Joined: Wed Feb 24, 2010 3:44 pm

Re: How Can I make Codejock Control dialog modal

#4 Post by Auge_Ohr »

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.
hm ...
if it is a activeX you can try o:Interface
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() ?
as Name say that is only the Foreground ( Z-Order ) Windows.
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
find Windows by CLASS Name ("Notepad")

Code: Select all

nNotepad := DllCall("User32.dll", DLL_STDCALL, "FindWindowA", "Notepad"+ Chr(0), 0)
to find out CLASS Name i use WinID http://www.dennisbabkin.com/winid/

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))
and her a other Function used with Codejock

Code: Select all

FUNCTION CJ_SetXParent( hWndChild, hWndNewParent )
   DllCall( 'User32', DLL_STDCALL, 'SetParent', hWndChild,hWndNewParent)
RETURN NIL
greetings by OHR
Jimmy

Post Reply