ActiveX resize at ON MAXIMIZE

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 182
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 17 times
Been thanked: 21 times

ActiveX resize at ON MAXIMIZE

Post by AUGE_OHR » Tue Nov 05, 2019 5:38 am

hi,

ich habe folgendes Demo gefunden und 2 Fragen
1.) wenn ich die Main Form maximiere bleibt das ActiveX von der Grösse. wie bekommt man es angepasst ?
2.) kann ich ein Flash SWF File als Resource anbinden ? und wie "lade" ist es dann ?

have found this Demo and 2 Question

1.) when maximize Main Form ActiveX stay small ... how to "resize" it :?:
2.) can i load a Flash SWF File as Resource :?: it Yes how to "load" it to play ...

Code: Select all

#include "hmg.ch"

FUNCTION Main()

   DEFINE WINDOW Form_1 ;
      AT 0,0            ;
      WIDTH 600         ;
      HEIGHT 500        ;
      TITLE "Giovanni"  ;
      MAIN
   END WINDOW

   @ 10,10 ACTIVEX Test                         ;
      PARENT Form_1                             ;
      WIDTH 560                                 ;
      HEIGHT 400                                ;
      PROGID "ShockwaveFlash.ShockwaveFlash.9" 

   Form_1.Test.Object:Movie := "d:\Video\DeskTop_Tower_12.swf"

   Activate Window Form_1

RETURN NIL

User avatar
bpd2000
Posts: 1088
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 102 times

Post by bpd2000 » Tue Nov 05, 2019 8:23 am

BPD
Convert Dream into Reality through HMG

User avatar
AUGE_OHR
Posts: 182
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 17 times
Been thanked: 21 times

Post by AUGE_OHR » Tue Nov 05, 2019 8:37 pm

hi,
bpd2000 wrote:
Tue Nov 05, 2019 8:23 am
refer link, you will get more idea/help related to RC
viewtopic.php?f=24&t=2291
viewtopic.php?f=5&t=3453&hilit=resource
viewtopic.php?f=11&t=3217&p=29812&hilit=resource#p29812
THX.
i have read about HMG_LoadResourceRawFile() but it did not say what those RT_* Constant are for :?:

Code: Select all

         - RT_CURSOR
         - RT_FONT
         - RT_BITMAP
         - RT_ICON
         - RT_MENU
         - RT_DIALOG
         - RT_STRING
         - RT_FONTDIR
         - RT_ACCELERATOR
         - RT_RCDATA
         - RT_MESSAGETABLE
         - RT_GROUP_CURSOR
         - RT_GROUP_ICON
         - RT_VERSION
         - RT_DLGINCLUDE
         - RT_PLUGPLAY
         - RT_VXD
         - RT_ANICURSOR
         - RT_ANIICON
         - RT_HTML
         - RT_MANIFEST 
as i say i want to load a Flash SWF file ... if possible from Resource.

---

how to "resize" Child ActiveX when Form is maximize :?:

User avatar
AUGE_OHR
Posts: 182
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 17 times
Been thanked: 21 times

Post by AUGE_OHR » Wed Nov 06, 2019 12:55 am

hi,

have try this

Code: Select all

#include "hmg.ch"
      ...
      ON MAXIMIZE DO_Resize({ThisWindow.WIDTH,ThisWindow.HEIGHT},Form_1.Test.Object)

FUNCTION DO_Resize(aSize,Obj)
   IF VALTYPE(aSize) = "A"
      IF VALTYPE(Obj) = "O"
          * Obj:SetSize(aSize)
   	  SetWindowsPos(Obj:HANDLE,0,0,0,aSize[1],aSize[2],SWP_NOSIZE)
      ENDIF
   ENDIF
RETURN NIL
but i got
undefined reference to `HB_FUN_SETWINDOWSPOS'
hm ... i know it is in HMG ... hm

so i copy from c:\hmg.3.4.4\SOURCE\c_windows.c

Code: Select all

HB_FUNC (SETWINDOWPOS)
and include it in my Source ... but now i got
C:/hmg.3.4.4/lib\libhmg.a(c_windows.o):c_windows.c:(.text+0x3e00): multiple definition of `HB_FUN_SETWINDOWPOS'
R:/Temp/hbmk_kqmctt.dir/FLASH.o:FLASH.c:(.text+0xe0): first defined here
R:/Temp/hbmk_kqmctt.dir/FLASH.o:FLASH.c:(.data+0x138): undefined reference to `HB_FUN_SETWINDOWSPOS'
collect2.exe: error: ld returned 1 exit status
now i'm total confused ... please help

---

i found

Code: Select all

	[ ON MAXIMIZE <MaximizeProcedure> ] ;
	[ ON MINIMIZE <MinimizeProcedure> ] ;
what about "normalize" :?:

Code: Select all

	[ ON NORMALIZE <NormalizeProcedure> ] ;

User avatar
bpd2000
Posts: 1088
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 102 times

Post by bpd2000 » Wed Nov 06, 2019 6:28 am

Check with
MoveWindow (hWnd, col, row, width, height, .T.)
BPD
Convert Dream into Reality through HMG

User avatar
bpd2000
Posts: 1088
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 197 times
Been thanked: 102 times

Post by bpd2000 » Wed Nov 06, 2019 2:52 pm

AUGE_OHR wrote:
Tue Nov 05, 2019 8:37 pm
hi,
bpd2000 wrote:
Tue Nov 05, 2019 8:23 am
refer link, you will get more idea/help related to RC
viewtopic.php?f=24&t=2291
viewtopic.php?f=5&t=3453&hilit=resource
viewtopic.php?f=11&t=3217&p=29812&hilit=resource#p29812
THX.
i have read about HMG_LoadResourceRawFile() but it did not say what those RT_* Constant are for :?:

Code: Select all

         - RT_CURSOR
         - RT_FONT
         - RT_BITMAP
         - RT_ICON
         - RT_MENU
         - RT_DIALOG
         - RT_STRING
         - RT_FONTDIR
         - RT_ACCELERATOR
         - RT_RCDATA
         - RT_MESSAGETABLE
         - RT_GROUP_CURSOR
         - RT_GROUP_ICON
         - RT_VERSION
         - RT_DLGINCLUDE
         - RT_PLUGPLAY
         - RT_VXD
         - RT_ANICURSOR
         - RT_ANIICON
         - RT_HTML
         - RT_MANIFEST 
as i say i want to load a Flash SWF file ... if possible from Resource.

---

how to "resize" Child ActiveX when Form is maximize :?:
Refer example to save and load file from resource
http://hmgforum.com/viewtopic.php?f=12&t=6186
BPD
Convert Dream into Reality through HMG

Post Reply