Hi,
Is there any way to get the windows handle of the Main Window?
I need it for some C function.
Regards.
Sudip
Windows handle of Main window
Moderator: Rathinagiri
Windows handle of Main window
With best regards,
Sudip
Sudip
Re: Windows handle of Main window
Hi Sudip,sudip wrote:Hi,
Is there any way to get the windows handle of the Main Window?
I need it for some C function.
Yes, of course.
Try the function GetFormHandle (FormName).
Take a look for a working sample below:
Code: Select all
/*
* MiniGUI DLL Demo
*/
#include "minigui.ch"
Function Main
DEFINE WINDOW Win_1 ;
AT 0,0 ;
WIDTH 400 ;
HEIGHT 400 ;
TITLE 'Hello World!' ;
MAIN
DEFINE MAIN MENU
DEFINE POPUP 'Test'
MENUITEM 'Test' ACTION CallDll32 ( "SetWindowText" , "USER32.DLL" , GetFormHandle ('Win_1') , "New title" )
END POPUP
END MENU
END WINDOW
ACTIVATE WINDOW Win_1
Return
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Windows handle of Main window
Hi Grigory,
Thanks a lot! It works
With best regards.
Sudip
Thanks a lot! It works
With best regards.
Sudip
With best regards,
Sudip
Sudip