Changing with and height of a window and a dialog

Changing with and height of a window and a dialog

Postby Massimo Linossi » Sat Jun 04, 2011 9:05 am

Hi.
I'm making some tests on the Acer Iconia tablet.
If I display a window and a dialog when the tablet if in landscape mode everything is perfect.
But when I rotate it I want to change the width and height according to the new size of the display area .
Is it possible to make it ? I've tried on the PAINT event but is not working.
Thanks a lot.
Massimo.
User avatar
Massimo Linossi
 
Posts: 505
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Changing with and height of a window and a dialog

Postby Antonio Linares » Sun Jun 05, 2011 3:51 am

Massimo,

You can do:

oWnd:nWidth = ...
oWnd:nHeight = ...

same for oDlg or any oControl
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing with and height of a window and a dialog

Postby Massimo Linossi » Sun Jun 05, 2011 3:59 am

Hi Antonio.
My problem is to recognize the rotating of the device. The original window is 1280 X 800 and when you rotate
the Iconia the window will be 800 X 1200. Is it possible to know when the device is changing the orientation ?
Thanks a lot.
Massimo.
User avatar
Massimo Linossi
 
Posts: 505
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Changing with and height of a window and a dialog

Postby Antonio Linares » Sun Jun 05, 2011 4:14 am

Massimo.

Please run this test in your tablet and review events.log to find what msgs you get when you rotate the screen:
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   local oWnd := TMyWindow():New()

   oWnd:Activate()

return nil

CLASS TMyWindow FROM TWindow

   CLASSDATA lRegistered

   METHOD HandleEvent( nMsg, nWParam, nLParam )

ENDCLASS

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TMyWindow

   LogFile( "events.log", { nMsg, nWParam, nLParam } )
 
return Super:HandleEvent( nMsg, nWParam, nLParam )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing with and height of a window and a dialog

Postby Massimo Linossi » Sun Jun 05, 2011 4:27 am

Hi Antonio.
This is the events.log

06/05/11 06:23:21: 49 0 0
06/05/11 06:23:21: 24 1 0
06/05/11 06:23:21: 70 0 1244328
06/05/11 06:23:21: 70 0 1244328
06/05/11 06:23:21: 28 1 5300
06/05/11 06:23:21: 134 1 0
06/05/11 06:23:21: 13 520 1240680
06/05/11 06:23:21: 127 2 0
06/05/11 06:23:21: 127 0 0
06/05/11 06:23:21: 127 1 0
06/05/11 06:23:21: 6 1 0
06/05/11 06:23:21: 61 -1 -4
06/05/11 06:23:21: 61 0 -12
06/05/11 06:23:21: 7 0 0
06/05/11 06:23:21: 133 1 0
06/05/11 06:23:21: 13 520 1240684
06/05/11 06:23:21: 20 1778454738 0
06/05/11 06:23:21: 71 0 1244328
06/05/11 06:23:21: 13 520 1241180
06/05/11 06:23:21: 5 0 15598089
06/05/11 06:23:21: 3 0 4653084
06/05/11 06:23:21: 15 0 0
06/05/11 06:23:21: 799 1 0
06/05/11 06:23:21: 132 0 11993576
06/05/11 06:23:21: 32 394516 33554433
06/05/11 06:23:21: 512 0 7340492
06/05/11 06:23:22: 127 1 0
06/05/11 06:23:22: 127 2 0
06/05/11 06:23:22: 127 0 0
06/05/11 06:23:22: 49365 0 0
06/05/11 06:23:22: 132 0 11993576
06/05/11 06:23:22: 32 394516 33554433
06/05/11 06:23:22: 512 0 7340492
06/05/11 06:23:24: 49693 16777216 0
06/05/11 06:23:24: 49467 0 0
06/05/11 06:23:26: 49693 16777216 270
06/05/11 06:23:26: 49467 0 0
06/05/11 06:23:27: 70 0 1244204
06/05/11 06:23:27: 36 0 1243288
06/05/11 06:23:27: 71 0 1244204
06/05/11 06:23:27: 3 0 5898263
06/05/11 06:23:27: 13 520 1241056
06/05/11 06:23:27: 136 32 0
06/05/11 06:23:27: 133 1 0
06/05/11 06:23:27: 13 520 1239680
06/05/11 06:23:27: 20 -2097081783 0
06/05/11 06:23:27: 256 233 1
06/05/11 06:23:28: 15 0 0
06/05/11 06:23:28: 126 32 83886880
06/05/11 06:23:28: 15 0 0
06/05/11 06:23:28: 133 1 0
06/05/11 06:23:28: 13 520 1239268
06/05/11 06:23:28: 20 1778454738 0
06/05/11 06:23:28: 136 4 0
06/05/11 06:23:29: 26 24 1244224
06/05/11 06:23:31: 49693 16777216 0
06/05/11 06:23:31: 134 0 0
06/05/11 06:23:31: 13 520 1240556
06/05/11 06:23:31: 6 0 0
06/05/11 06:23:31: 28 0 3668
06/05/11 06:23:31: 8 0 0
06/05/11 06:23:31: 49467 0 0
06/05/11 06:23:31: 70 0 1244204
06/05/11 06:23:31: 71 0 1244204
06/05/11 06:23:31: 13 520 1241056
06/05/11 06:23:31: 28 1 3668
06/05/11 06:23:33: 134 1 0
06/05/11 06:23:33: 13 520 1240556
06/05/11 06:23:33: 6 1 0
06/05/11 06:23:33: 7 0 0
06/05/11 06:23:33: 70 0 1244204
06/05/11 06:23:33: 36 0 1243288
06/05/11 06:23:33: 133 1 0
06/05/11 06:23:33: 13 520 1240560
06/05/11 06:23:33: 20 -2097081783 0
06/05/11 06:23:33: 71 0 1244204
06/05/11 06:23:33: 3 0 4718622
06/05/11 06:23:33: 13 520 1241056
06/05/11 06:23:33: 136 32 0
06/05/11 06:23:33: 15 0 0
06/05/11 06:23:33: 126 32 52430080
06/05/11 06:23:34: 15 0 0
06/05/11 06:23:34: 133 1 0
06/05/11 06:23:34: 13 520 1239268
06/05/11 06:23:34: 20 1778454738 0
06/05/11 06:23:34: 134 0 0
06/05/11 06:23:34: 13 520 1240556
06/05/11 06:23:34: 6 0 0
06/05/11 06:23:34: 28 0 3668
06/05/11 06:23:34: 8 0 0
06/05/11 06:23:34: 70 0 1244204
06/05/11 06:23:34: 71 0 1244204
06/05/11 06:23:34: 13 520 1241056
06/05/11 06:23:34: 28 1 3668
06/05/11 06:23:34: 134 0 0
06/05/11 06:23:34: 13 520 1240556
06/05/11 06:23:34: 6 1 0
06/05/11 06:23:34: 7 0 0
06/05/11 06:23:34: 134 0 0
06/05/11 06:23:34: 13 520 1240556
06/05/11 06:23:34: 6 0 0
06/05/11 06:23:34: 28 0 3668
06/05/11 06:23:34: 8 0 0
06/05/11 06:23:34: 70 0 1244204
06/05/11 06:23:34: 71 0 1244204
06/05/11 06:23:34: 13 520 1241056
06/05/11 06:23:34: 28 1 3668
06/05/11 06:23:34: 134 1 0
06/05/11 06:23:34: 13 520 1240556
06/05/11 06:23:34: 6 1 0
06/05/11 06:23:34: 7 0 0
06/05/11 06:23:34: 26 24 1244224
06/05/11 06:23:38: 716 0 2359809
06/05/11 06:23:38: 132 0 2359809
06/05/11 06:23:38: 283 3 8389797
06/05/11 06:23:38: 282 0 1243308
06/05/11 06:23:38: 32 394516 33554452
06/05/11 06:23:38: 160 20 2294272
06/05/11 06:23:38: 32 394516 33619988
06/05/11 06:23:38: 161 20 2294272
06/05/11 06:23:38: 533 0 0
06/05/11 06:23:38: 274 61536 2294272
06/05/11 06:23:38: 674 0 0
06/05/11 06:23:38: 16 0 0
06/05/11 06:23:38: 144 0 0
06/05/11 06:23:38: 70 0 1243492
06/05/11 06:23:38: 71 0 1243492
06/05/11 06:23:38: 134 0 0
06/05/11 06:23:38: 13 520 1239844
06/05/11 06:23:38: 6 0 0
06/05/11 06:23:38: 28 0 5300
06/05/11 06:23:38: 8 0 0
06/05/11 06:23:38: 2 0 0
User avatar
Massimo Linossi
 
Posts: 505
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Changing with and height of a window and a dialog

Postby Antonio Linares » Sun Jun 05, 2011 6:14 am

Massimo,

Please rotate the tablet 10 times and then copy here the events.log again, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing with and height of a window and a dialog

Postby Massimo Linossi » Sun Jun 05, 2011 6:29 am

Here it is.
I have another question. When I display a dialog from a resource, is it possible to close this dialog and display another one
when the tablet is rotated ? I want to try to make different dialogs according to the resized display area.
Thanks a lot.
Massimo.

06/05/11 08:21:16: 49 0 0
06/05/11 08:21:16: 24 1 0
06/05/11 08:21:16: 70 0 1244328
06/05/11 08:21:16: 70 0 1244328
06/05/11 08:21:16: 28 1 3488
06/05/11 08:21:16: 134 1 0
06/05/11 08:21:16: 13 520 1240680
06/05/11 08:21:16: 127 2 0
06/05/11 08:21:16: 127 0 0
06/05/11 08:21:16: 127 1 0
06/05/11 08:21:16: 6 1 0
06/05/11 08:21:16: 61 -1 -4
06/05/11 08:21:16: 61 0 -12
06/05/11 08:21:16: 7 0 0
06/05/11 08:21:16: 133 1 0
06/05/11 08:21:16: 13 520 1240684
06/05/11 08:21:16: 20 16846678 0
06/05/11 08:21:16: 71 0 1244328
06/05/11 08:21:16: 13 520 1241180
06/05/11 08:21:16: 5 0 15598089
06/05/11 08:21:16: 3 0 4653084
06/05/11 08:21:16: 15 0 0
06/05/11 08:21:16: 127 1 0
06/05/11 08:21:16: 127 2 0
06/05/11 08:21:16: 127 0 0
06/05/11 08:21:16: 799 1 0
06/05/11 08:21:16: 49365 0 0
06/05/11 08:21:16: 132 0 12190151
06/05/11 08:21:16: 32 263340 33554433
06/05/11 08:21:16: 512 0 7537067
06/05/11 08:21:16: 132 0 12190151
06/05/11 08:21:16: 32 263340 33554433
06/05/11 08:21:16: 512 0 7537067
06/05/11 08:21:16: 132 0 12190151
06/05/11 08:21:16: 32 263340 33554433
06/05/11 08:21:16: 512 0 7537067
06/05/11 08:21:21: 49713 16777216 270
06/05/11 08:21:21: 49510 0 0
06/05/11 08:21:22: 70 0 1244204
06/05/11 08:21:22: 36 0 1243288
06/05/11 08:21:22: 71 0 1244204
06/05/11 08:21:22: 3 0 5898263
06/05/11 08:21:22: 13 520 1241056
06/05/11 08:21:22: 136 32 0
06/05/11 08:21:22: 133 1 0
06/05/11 08:21:22: 13 520 1239680
06/05/11 08:21:22: 20 33623066 0
06/05/11 08:21:22: 15 0 0
06/05/11 08:21:22: 126 32 83886880
06/05/11 08:21:23: 15 0 0
06/05/11 08:21:23: 133 1 0
06/05/11 08:21:23: 13 520 1239268
06/05/11 08:21:23: 20 16846678 0
06/05/11 08:21:23: 26 24 1244224
06/05/11 08:21:25: 49713 16777216 0
06/05/11 08:21:25: 49510 0 0
06/05/11 08:21:25: 134 0 0
06/05/11 08:21:25: 13 520 1240556
06/05/11 08:21:25: 6 0 0
06/05/11 08:21:25: 28 0 3744
06/05/11 08:21:25: 8 0 0
06/05/11 08:21:25: 70 0 1244204
06/05/11 08:21:25: 71 0 1244204
06/05/11 08:21:25: 13 520 1241056
06/05/11 08:21:25: 28 1 3744
06/05/11 08:21:25: 134 1 0
06/05/11 08:21:25: 13 520 1240556
06/05/11 08:21:25: 6 1 0
06/05/11 08:21:25: 7 0 0
06/05/11 08:21:26: 70 0 1244204
06/05/11 08:21:26: 36 0 1243288
06/05/11 08:21:26: 71 0 1244204
06/05/11 08:21:26: 3 0 4718622
06/05/11 08:21:26: 13 520 1241056
06/05/11 08:21:26: 136 32 0
06/05/11 08:21:26: 133 1 0
06/05/11 08:21:26: 13 520 1239680
06/05/11 08:21:26: 20 33623066 0
06/05/11 08:21:26: 15 0 0
06/05/11 08:21:27: 126 32 52430080
06/05/11 08:21:27: 15 0 0
06/05/11 08:21:27: 133 1 0
06/05/11 08:21:27: 13 520 1239268
06/05/11 08:21:27: 20 33623066 0
06/05/11 08:21:27: 134 0 0
06/05/11 08:21:27: 13 520 1240556
06/05/11 08:21:27: 6 0 0
06/05/11 08:21:27: 28 0 3744
06/05/11 08:21:27: 8 0 0
06/05/11 08:21:27: 70 0 1244204
06/05/11 08:21:27: 71 0 1244204
06/05/11 08:21:27: 13 520 1241056
06/05/11 08:21:27: 28 1 3744
06/05/11 08:21:27: 134 1 0
06/05/11 08:21:27: 13 520 1240556
06/05/11 08:21:27: 6 1 0
06/05/11 08:21:27: 7 0 0
06/05/11 08:21:27: 134 0 0
06/05/11 08:21:27: 13 520 1240556
06/05/11 08:21:27: 6 0 0
06/05/11 08:21:27: 28 0 3744
06/05/11 08:21:27: 8 0 0
06/05/11 08:21:28: 26 24 1244224
06/05/11 08:21:28: 70 0 1244204
06/05/11 08:21:28: 71 0 1244204
06/05/11 08:21:28: 13 520 1241056
06/05/11 08:21:28: 28 1 3744
06/05/11 08:21:28: 134 1 0
06/05/11 08:21:28: 13 520 1240556
06/05/11 08:21:28: 6 1 0
06/05/11 08:21:28: 7 0 0
06/05/11 08:21:30: 49713 16777216 270
06/05/11 08:21:30: 49510 0 0
06/05/11 08:21:31: 70 0 1244204
06/05/11 08:21:31: 36 0 1243288
06/05/11 08:21:31: 71 0 1244204
06/05/11 08:21:31: 3 0 6029336
06/05/11 08:21:31: 13 520 1241056
06/05/11 08:21:31: 136 32 0
06/05/11 08:21:31: 133 1 0
06/05/11 08:21:31: 13 520 1239680
06/05/11 08:21:31: 20 33620049 0
06/05/11 08:21:31: 15 0 0
06/05/11 08:21:32: 126 32 83886880
06/05/11 08:21:32: 15 0 0
06/05/11 08:21:32: 133 1 0
06/05/11 08:21:32: 13 520 1239268
06/05/11 08:21:32: 20 33620047 0
06/05/11 08:21:32: 134 0 0
06/05/11 08:21:32: 13 520 1240556
06/05/11 08:21:32: 6 0 0
06/05/11 08:21:32: 28 0 3744
06/05/11 08:21:32: 8 0 0
06/05/11 08:21:32: 70 0 1244204
06/05/11 08:21:32: 71 0 1244204
06/05/11 08:21:32: 13 520 1241056
06/05/11 08:21:32: 28 1 3744
06/05/11 08:21:32: 134 0 0
06/05/11 08:21:32: 13 520 1240556
06/05/11 08:21:32: 6 1 0
06/05/11 08:21:32: 7 0 0
06/05/11 08:21:32: 134 0 0
06/05/11 08:21:32: 13 520 1240556
06/05/11 08:21:32: 6 0 0
06/05/11 08:21:32: 28 0 3744
06/05/11 08:21:32: 8 0 0
06/05/11 08:21:32: 26 24 1244224
06/05/11 08:21:33: 70 0 1244204
06/05/11 08:21:33: 71 0 1244204
06/05/11 08:21:33: 13 520 1241056
06/05/11 08:21:33: 28 1 3744
06/05/11 08:21:33: 134 1 0
06/05/11 08:21:33: 13 520 1240556
06/05/11 08:21:33: 6 1 0
06/05/11 08:21:33: 7 0 0
06/05/11 08:21:34: 49713 16777216 0
06/05/11 08:21:34: 49510 0 0
06/05/11 08:21:36: 70 0 1244204
06/05/11 08:21:36: 36 0 1243288
06/05/11 08:21:36: 71 0 1244204
06/05/11 08:21:36: 3 0 4784159
06/05/11 08:21:36: 13 520 1241056
06/05/11 08:21:36: 136 32 0
06/05/11 08:21:36: 133 1 0
06/05/11 08:21:36: 13 520 1239680
06/05/11 08:21:36: 20 318836835 0
06/05/11 08:21:36: 15 0 0
06/05/11 08:21:36: 126 32 52430080
06/05/11 08:21:36: 15 0 0
06/05/11 08:21:36: 133 1 0
06/05/11 08:21:36: 13 520 1239268
06/05/11 08:21:36: 20 33620047 0
06/05/11 08:21:37: 134 0 0
06/05/11 08:21:37: 13 520 1240556
06/05/11 08:21:37: 6 0 0
06/05/11 08:21:37: 28 0 3744
06/05/11 08:21:37: 8 0 0
06/05/11 08:21:37: 70 0 1244204
06/05/11 08:21:37: 71 0 1244204
06/05/11 08:21:37: 13 520 1241056
06/05/11 08:21:37: 28 1 3744
06/05/11 08:21:37: 134 0 0
06/05/11 08:21:37: 13 520 1240556
06/05/11 08:21:37: 6 1 0
06/05/11 08:21:37: 7 0 0
06/05/11 08:21:37: 134 0 0
06/05/11 08:21:37: 13 520 1240556
06/05/11 08:21:37: 6 0 0
06/05/11 08:21:37: 28 0 3744
06/05/11 08:21:37: 8 0 0
06/05/11 08:21:37: 70 0 1244204
06/05/11 08:21:37: 71 0 1244204
06/05/11 08:21:37: 13 520 1241056
06/05/11 08:21:37: 28 1 3744
06/05/11 08:21:37: 134 1 0
06/05/11 08:21:37: 13 520 1240556
06/05/11 08:21:37: 6 1 0
06/05/11 08:21:37: 7 0 0
06/05/11 08:21:37: 26 24 1244224
06/05/11 08:21:38: 49713 16777216 270
06/05/11 08:21:38: 49510 0 0
06/05/11 08:21:40: 70 0 1244204
06/05/11 08:21:40: 36 0 1243288
06/05/11 08:21:40: 71 0 1244204
06/05/11 08:21:40: 3 0 6094873
06/05/11 08:21:40: 13 520 1241056
06/05/11 08:21:40: 136 32 0
06/05/11 08:21:40: 133 1 0
06/05/11 08:21:40: 13 520 1239680
06/05/11 08:21:40: 20 33620030 0
06/05/11 08:21:40: 15 0 0
06/05/11 08:21:40: 126 32 83886880
06/05/11 08:21:40: 15 0 0
06/05/11 08:21:40: 133 1 0
06/05/11 08:21:40: 13 520 1239268
06/05/11 08:21:40: 20 33623066 0
06/05/11 08:21:41: 134 0 0
06/05/11 08:21:41: 13 520 1240556
06/05/11 08:21:41: 6 0 0
06/05/11 08:21:41: 28 0 3744
06/05/11 08:21:41: 8 0 0
06/05/11 08:21:41: 70 0 1244204
06/05/11 08:21:41: 71 0 1244204
06/05/11 08:21:41: 13 520 1241056
06/05/11 08:21:41: 28 1 3744
06/05/11 08:21:41: 134 0 0
06/05/11 08:21:41: 13 520 1240556
06/05/11 08:21:41: 6 1 0
06/05/11 08:21:41: 7 0 0
06/05/11 08:21:41: 134 0 0
06/05/11 08:21:41: 13 520 1240556
06/05/11 08:21:41: 6 0 0
06/05/11 08:21:41: 28 0 3744
06/05/11 08:21:41: 8 0 0
06/05/11 08:21:41: 70 0 1244204
06/05/11 08:21:41: 71 0 1244204
06/05/11 08:21:41: 13 520 1241056
06/05/11 08:21:41: 28 1 3744
06/05/11 08:21:41: 134 1 0
06/05/11 08:21:41: 13 520 1240556
06/05/11 08:21:41: 6 1 0
06/05/11 08:21:41: 7 0 0
06/05/11 08:21:41: 26 24 1244224
06/05/11 08:21:43: 49713 16777216 0
06/05/11 08:21:43: 49510 0 0
06/05/11 08:21:45: 70 0 1244204
06/05/11 08:21:45: 36 0 1243288
06/05/11 08:21:45: 71 0 1244204
06/05/11 08:21:45: 3 0 4849697
06/05/11 08:21:45: 13 520 1241056
06/05/11 08:21:45: 136 32 0
06/05/11 08:21:45: 133 1 0
06/05/11 08:21:45: 13 520 1239680
06/05/11 08:21:45: 20 33623066 0
06/05/11 08:21:45: 15 0 0
06/05/11 08:21:45: 126 32 52430080
06/05/11 08:21:45: 15 0 0
06/05/11 08:21:45: 133 1 0
06/05/11 08:21:45: 13 520 1239268
06/05/11 08:21:45: 20 33620032 0
06/05/11 08:21:45: 134 0 0
06/05/11 08:21:45: 13 520 1240556
06/05/11 08:21:45: 6 0 0
06/05/11 08:21:45: 28 0 3744
06/05/11 08:21:45: 8 0 0
06/05/11 08:21:46: 70 0 1244204
06/05/11 08:21:46: 71 0 1244204
06/05/11 08:21:46: 13 520 1241056
06/05/11 08:21:46: 28 1 3744
06/05/11 08:21:46: 134 0 0
06/05/11 08:21:46: 13 520 1240556
06/05/11 08:21:46: 6 1 0
06/05/11 08:21:46: 7 0 0
06/05/11 08:21:46: 134 0 0
06/05/11 08:21:46: 13 520 1240556
06/05/11 08:21:46: 6 0 0
06/05/11 08:21:46: 28 0 3744
06/05/11 08:21:46: 8 0 0
06/05/11 08:21:46: 26 24 1244224
06/05/11 08:21:46: 70 0 1244204
06/05/11 08:21:46: 71 0 1244204
06/05/11 08:21:46: 13 520 1241056
06/05/11 08:21:46: 28 1 3744
06/05/11 08:21:46: 134 1 0
06/05/11 08:21:46: 13 520 1240556
06/05/11 08:21:46: 6 1 0
06/05/11 08:21:46: 7 0 0
06/05/11 08:21:48: 49713 16777216 270
06/05/11 08:21:48: 49510 0 0
06/05/11 08:21:49: 70 0 1244204
06/05/11 08:21:49: 36 0 1243288
06/05/11 08:21:49: 71 0 1244204
06/05/11 08:21:49: 3 0 6225946
06/05/11 08:21:49: 13 520 1241056
06/05/11 08:21:49: 136 32 0
06/05/11 08:21:49: 133 1 0
06/05/11 08:21:49: 13 520 1239680
06/05/11 08:21:49: 20 16846678 0
06/05/11 08:21:49: 15 0 0
06/05/11 08:21:50: 126 32 83886880
06/05/11 08:21:50: 134 0 0
06/05/11 08:21:50: 13 520 1240556
06/05/11 08:21:50: 6 0 0
06/05/11 08:21:50: 28 0 3744
06/05/11 08:21:50: 8 0 0
06/05/11 08:21:50: 70 0 1244204
06/05/11 08:21:50: 71 0 1244204
06/05/11 08:21:50: 13 520 1241056
06/05/11 08:21:50: 28 1 3744
06/05/11 08:21:50: 134 0 0
06/05/11 08:21:50: 13 520 1240556
06/05/11 08:21:50: 6 1 0
06/05/11 08:21:50: 7 0 0
06/05/11 08:21:50: 134 0 0
06/05/11 08:21:50: 13 520 1240556
06/05/11 08:21:50: 6 0 0
06/05/11 08:21:50: 28 0 3744
06/05/11 08:21:50: 8 0 0
06/05/11 08:21:50: 15 0 0
06/05/11 08:21:50: 133 1 0
06/05/11 08:21:50: 13 520 1239268
06/05/11 08:21:50: 20 16846678 0
06/05/11 08:21:50: 70 0 1244204
06/05/11 08:21:50: 71 0 1244204
06/05/11 08:21:50: 13 520 1241056
06/05/11 08:21:50: 28 1 3744
06/05/11 08:21:50: 134 1 0
06/05/11 08:21:50: 13 520 1240556
06/05/11 08:21:50: 6 1 0
06/05/11 08:21:50: 7 0 0
06/05/11 08:21:50: 26 24 1244224
06/05/11 08:21:52: 49713 16777216 0
06/05/11 08:21:52: 49510 0 0
06/05/11 08:21:53: 70 0 1244204
06/05/11 08:21:53: 36 0 1243288
06/05/11 08:21:53: 71 0 1244204
06/05/11 08:21:53: 3 0 4915234
06/05/11 08:21:53: 13 520 1241056
06/05/11 08:21:53: 136 32 0
06/05/11 08:21:53: 133 1 0
06/05/11 08:21:53: 13 520 1239680
06/05/11 08:21:53: 20 16846678 0
06/05/11 08:21:53: 15 0 0
06/05/11 08:21:53: 126 32 52430080
06/05/11 08:21:54: 15 0 0
06/05/11 08:21:54: 133 1 0
06/05/11 08:21:54: 13 520 1239268
06/05/11 08:21:54: 20 33620049 0
06/05/11 08:21:54: 134 0 0
06/05/11 08:21:54: 13 520 1240556
06/05/11 08:21:54: 6 0 0
06/05/11 08:21:54: 28 0 3744
06/05/11 08:21:54: 8 0 0
06/05/11 08:21:54: 70 0 1244204
06/05/11 08:21:54: 71 0 1244204
06/05/11 08:21:54: 13 520 1241056
06/05/11 08:21:54: 28 1 3744
06/05/11 08:21:54: 134 0 0
06/05/11 08:21:54: 13 520 1240556
06/05/11 08:21:54: 6 1 0
06/05/11 08:21:54: 7 0 0
06/05/11 08:21:54: 134 0 0
06/05/11 08:21:54: 13 520 1240556
06/05/11 08:21:54: 6 0 0
06/05/11 08:21:54: 28 0 3744
06/05/11 08:21:54: 8 0 0
06/05/11 08:21:54: 70 0 1244204
06/05/11 08:21:54: 71 0 1244204
06/05/11 08:21:54: 13 520 1241056
06/05/11 08:21:54: 28 1 3744
06/05/11 08:21:54: 134 1 0
06/05/11 08:21:54: 13 520 1240556
06/05/11 08:21:54: 6 1 0
06/05/11 08:21:54: 7 0 0
06/05/11 08:21:55: 26 24 1244224
06/05/11 08:21:56: 49713 16777216 270
06/05/11 08:21:56: 49510 0 0
06/05/11 08:21:57: 70 0 1244204
06/05/11 08:21:57: 36 0 1243288
06/05/11 08:21:57: 71 0 1244204
06/05/11 08:21:57: 3 0 6357019
06/05/11 08:21:57: 13 520 1241056
06/05/11 08:21:57: 136 32 0
06/05/11 08:21:57: 133 1 0
06/05/11 08:21:57: 13 520 1239680
06/05/11 08:21:57: 20 67174482 0
06/05/11 08:21:57: 15 0 0
06/05/11 08:21:58: 126 32 83886880
06/05/11 08:21:58: 15 0 0
06/05/11 08:21:58: 133 1 0
06/05/11 08:21:58: 13 520 1239268
06/05/11 08:21:58: 20 33620032 0
06/05/11 08:21:58: 134 0 0
06/05/11 08:21:58: 13 520 1240556
06/05/11 08:21:58: 6 0 0
06/05/11 08:21:58: 28 0 3744
06/05/11 08:21:58: 8 0 0
06/05/11 08:21:58: 70 0 1244204
06/05/11 08:21:58: 71 0 1244204
06/05/11 08:21:58: 13 520 1241056
06/05/11 08:21:58: 28 1 3744
06/05/11 08:21:58: 134 0 0
06/05/11 08:21:58: 13 520 1240556
06/05/11 08:21:58: 6 1 0
06/05/11 08:21:58: 7 0 0
06/05/11 08:21:58: 134 0 0
06/05/11 08:21:58: 13 520 1240556
06/05/11 08:21:58: 6 0 0
06/05/11 08:21:58: 28 0 3744
06/05/11 08:21:58: 8 0 0
06/05/11 08:21:59: 26 24 1244224
06/05/11 08:21:59: 70 0 1244204
06/05/11 08:21:59: 71 0 1244204
06/05/11 08:21:59: 13 520 1241056
06/05/11 08:21:59: 28 1 3744
06/05/11 08:21:59: 134 1 0
06/05/11 08:21:59: 13 520 1240556
06/05/11 08:21:59: 6 1 0
06/05/11 08:21:59: 7 0 0
06/05/11 08:22:01: 49713 16777216 0
06/05/11 08:22:01: 49510 0 0
06/05/11 08:22:02: 70 0 1244204
06/05/11 08:22:02: 36 0 1243288
06/05/11 08:22:02: 71 0 1244204
06/05/11 08:22:02: 3 0 4980772
06/05/11 08:22:02: 13 520 1241056
06/05/11 08:22:02: 136 32 0
06/05/11 08:22:02: 133 1 0
06/05/11 08:22:02: 13 520 1239680
06/05/11 08:22:02: 20 16846678 0
06/05/11 08:22:02: 15 0 0
06/05/11 08:22:02: 126 32 52430080
06/05/11 08:22:02: 15 0 0
06/05/11 08:22:02: 133 1 0
06/05/11 08:22:02: 13 520 1239268
06/05/11 08:22:02: 20 67174482 0
06/05/11 08:22:03: 134 0 0
06/05/11 08:22:03: 13 520 1240556
06/05/11 08:22:03: 6 0 0
06/05/11 08:22:03: 28 0 3744
06/05/11 08:22:03: 8 0 0
06/05/11 08:22:03: 70 0 1244204
06/05/11 08:22:03: 71 0 1244204
06/05/11 08:22:03: 13 520 1241056
06/05/11 08:22:03: 28 1 3744
06/05/11 08:22:03: 134 0 0
06/05/11 08:22:03: 13 520 1240556
06/05/11 08:22:03: 6 1 0
06/05/11 08:22:03: 7 0 0
06/05/11 08:22:03: 134 0 0
06/05/11 08:22:03: 13 520 1240556
06/05/11 08:22:03: 6 0 0
06/05/11 08:22:03: 28 0 3744
06/05/11 08:22:03: 8 0 0
06/05/11 08:22:03: 26 24 1244224
06/05/11 08:22:04: 70 0 1244204
06/05/11 08:22:04: 71 0 1244204
06/05/11 08:22:04: 13 520 1241056
06/05/11 08:22:04: 28 1 3744
06/05/11 08:22:04: 134 1 0
06/05/11 08:22:04: 13 520 1240556
06/05/11 08:22:04: 6 1 0
06/05/11 08:22:04: 7 0 0
06/05/11 08:22:06: 134 0 0
06/05/11 08:22:06: 13 520 1240556
06/05/11 08:22:06: 6 0 0
06/05/11 08:22:06: 28 0 3488
06/05/11 08:22:06: 8 0 0
06/05/11 08:22:10: 49713 16777216 270
06/05/11 08:22:10: 49510 0 0
06/05/11 08:22:11: 70 0 1244204
06/05/11 08:22:11: 36 0 1243288
06/05/11 08:22:11: 71 0 1244204
06/05/11 08:22:11: 3 0 6422556
06/05/11 08:22:11: 13 520 1241056
06/05/11 08:22:11: 136 32 0
06/05/11 08:22:11: 133 1 0
06/05/11 08:22:11: 13 520 1239680
06/05/11 08:22:11: 20 33623066 0
06/05/11 08:22:11: 15 0 0
06/05/11 08:22:11: 126 32 83886880
06/05/11 08:22:11: 15 0 0
06/05/11 08:22:11: 133 1 0
06/05/11 08:22:11: 13 520 1239268
06/05/11 08:22:11: 20 33620030 0
06/05/11 08:22:11: 49713 16777216 0
06/05/11 08:22:12: 49510 0 0
06/05/11 08:22:12: 26 24 1244224
06/05/11 08:22:14: 70 0 1244204
06/05/11 08:22:14: 36 0 1243288
06/05/11 08:22:14: 71 0 1244204
06/05/11 08:22:14: 3 0 5046310
06/05/11 08:22:14: 13 520 1241056
06/05/11 08:22:14: 136 32 0
06/05/11 08:22:14: 133 1 0
06/05/11 08:22:14: 13 520 1239680
06/05/11 08:22:14: 20 67174482 0
06/05/11 08:22:14: 15 0 0
06/05/11 08:22:15: 126 32 52430080
06/05/11 08:22:15: 15 0 0
06/05/11 08:22:15: 133 1 0
06/05/11 08:22:15: 13 520 1239268
06/05/11 08:22:15: 20 33620030 0
06/05/11 08:22:15: 136 4 0
06/05/11 08:22:15: 26 24 1244224
06/05/11 08:22:22: 537 7 0
06/05/11 08:22:23: 537 7 0
06/05/11 08:22:23: 537 7 0
06/05/11 08:22:23: 537 32768 1244220
06/05/11 08:22:24: 537 7 0
06/05/11 08:22:24: 537 7 0
06/05/11 08:22:24: 537 7 0
06/05/11 08:22:24: 537 7 0
06/05/11 08:22:25: 537 7 0
06/05/11 08:22:29: 136 32 0
06/05/11 08:22:29: 133 1 0
06/05/11 08:22:29: 13 520 1239680
06/05/11 08:22:29: 20 33620030 0
06/05/11 08:22:29: 15 0 0
06/05/11 08:22:29: 49743 0 0
06/05/11 08:22:36: 537 7 0
06/05/11 08:22:36: 537 7 0
User avatar
Massimo Linossi
 
Posts: 505
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Changing with and height of a window and a dialog

Postby Antonio Linares » Sun Jun 05, 2011 6:34 am

Massimo,

Yes, once we know which one is the rotate event then we can do what we want :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing with and height of a window and a dialog

Postby Massimo Linossi » Sun Jun 05, 2011 6:41 am

Great.
Is there a reference table about the numbers that the logfile function is creating ?
I saw that there are always 3 numbers after the time but I don't know what they mean.
User avatar
Massimo Linossi
 
Posts: 505
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Changing with and height of a window and a dialog

Postby Antonio Linares » Sun Jun 05, 2011 9:13 pm

Massimo,

The first value is the Windows msg sent to the window, the other two values are the supplied parameters (nWParam, nLParam). The msg value has to be converted into hexadecimal and then you can look for it inside windows.h

I think that 49713 value may be related to the rotate event. Please try this:
Code: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   local oWnd := TMyWindow():New()

   oWnd:Activate()

return nil

CLASS TMyWindow FROM TWindow

   CLASSDATA lRegistered

   METHOD HandleEvent( nMsg, nWParam, nLParam )

ENDCLASS

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TMyWindow

   LogFile( "events.log", { nMsg, nWParam, nLParam } )

   if nMsg == 49713
      MsgInfo( "rotate", nLParam )
   endif
 
return Super:HandleEvent( nMsg, nWParam, nLParam )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing with and height of a window and a dialog

Postby Massimo Linossi » Mon Jun 06, 2011 5:07 pm

Yes, it is working.
Now I have to find a way of changing the resolution of the open window and dialog with all the controls inside.
Thanks a lot.
Massimo.
User avatar
Massimo Linossi
 
Posts: 505
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Changing with and height of a window and a dialog

Postby Gale FORd » Wed Nov 04, 2015 3:42 pm

I found that the Rotate event is 126
I modified dialog.prg so I could do the following in my program.
oDlg:bRotate := { || msginfo( 'Rotate '+alltrim(str(ScreenWidth(),5))+'x'+alltrim(str(ScreenHeight(),5)))}
With windows 7 the width and height vary with rotation and whether the on screen keyboard is displayed and docked. So there could be 4 different width/height values when using Windows 7.
With Windows 10 the width and height vary with screen rotation but does not change when on screen keyboard is displayed so there are only 2 different values.

To test I modified dialog.prg with something like

#define GF_ROTATE 126
....
// Added to Class
DATA bRotate
....
// Added to HandleEvent
case nMsg == GF_ROTATE
if ValType( ::bRotate ) == "B"
eval( ::bRotate )
endif
return ::Super:HandleEvent( nMsg, nWParam, nLParam )
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Changing with and height of a window and a dialog

Postby Gale FORd » Wed Nov 04, 2015 3:45 pm

Actually there is an event define
WM_DISPLAYCHANGE = 126

I found the information here: https://msdn.microsoft.com/en-us/library/ms812142.aspx
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Changing with and height of a window and a dialog

Postby Antonio Linares » Thu Nov 05, 2015 12:02 pm

Gale,

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42203
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Changing with and height of a window and a dialog

Postby Gale FORd » Thu Nov 05, 2015 2:32 pm

Antonio,
Does the latest version of FW handle screen rotation? If not do you think something like ::bRotate or ::bOnRotate can be added to native Window class.
I am working more and more with Tablets and Convertibles.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 89 guests

cron