I have a very strange problem. I use D2007 on Win7 platform.
My application runs fine on the first Win7 machine (mine) but the UI doesn't refresh it correctly on a second Win7 system (a samsung tablet).
I use remote debugging on the Tablet. After a long cycle of evaluation and debugging, I see that the WM_SIZE
isn't lauched to one of my frames. Each frame is included on her parent and Align = alClient
.
On my machine, this message is well sent and, of course, the UI has the right behavior.
Which external function of the Windows Unit send the WM_Size message code ?
I will explain the problem with more details.
I see a different behaviour of the UI refresh between my two Win7 machines when the application is maximized or resized.
Some of the frames are correctly resized but one of them isn't. The structure is the following :
MainForm -> Some Frames -> PageControl -> TabSheet -> Frame1 -> Frame2.
Note that :
my UI runs correctly on a majority of computers.
I use the standard windows mechanism
In this structure, all the frames until to TabSheet included are resized but Frame1 is not. The frames are created in run-time.
Because I know the name of the TabSheet, I could stop on a break point and view the WMSize.
I use some conditionnal break points in TWinControl.AlignControls
and catch the handle of Frame1
.
With a break point on Classes.StdWndProc
, I could follow the messages sent to Frame1.Handle
.
When all is OK:
$0046 : WM_WINDOWPOSCHANGING
$0083 : WM_NCCALCSIZE
$0085 : WM_NCPAINT
$0014 : WM_ERASEBKGND
$0047 : WM_WINDOWPOSCHANGED
$0005 : WM_SIZE
And when the resize failed:
$0046 : WM_WINDOWPOSCHANGING
$0085 : WM_NCPAINT
$0014 : WM_ERASEBKGND
$0047 : WM_WINDOWPOSCHANGED
Because, the code is the same and the OS is a Win7 in both cases, I don't understand the problem.
I just know the two message WM_NCCALCSIZE
and WM_SIZE
are never sent in the second case.
And that's why I look for the functions that return a WM_SIZE
response.