List Browse Lost after App Minimised

Hi Everyone,

Bit of a long shot but in my app every list browse in every window get’s ‘lost’ after the app is minimised and maximised. Please see this video for an example:

Has anybody seen this behaviour before and knows how to stop it? Or where would one start looking to find out what is going on?

Using C11.0.13372. Multi-dll app. Many, many templates…

Regards,
Trent

I can see you have visual studio on your desktop, so you should have MS Spy++.

Load your app, load up Spy++. select Windows (Spy,Windows) to display a very long tree list of windows linked to your desktop.

Click Search (3rd option on the Spy++ Main Menu),
Click and hold the left mouse button on the round target in the icon window and drag the changed mouse cursor onto your list box and then release the left mouse button on the list box.

Spy++ should expand the tree list and select the “window” responsible for your list box.
You should see something like

Window [hex value] "" ClaList_03450000H

Now right mouse click on the ClaList entry and select Properties, a window will appear.

What does the Rectangle entry field and Restored Rect entry field display before and after minimising your main app?

1 Like

Hi Richard,

It looks like the rect is resized to 10x10. Before:

After:

Regards,
Trent

Ok, so with the app open before minimising and having highlighted the ClaList control in Spy++, can you right mouse click on the ClaList to get the pop up menu, select messages and then very carefully, move the mouse to the app’s minimise button to minimise the app whilst the mouse pointer avoids any part of the program (to avoid Spy++ logging windows messages), minimise it, then maximise it.

Do you have any subclassing in use which might be highjacking the windows message, maybe a 3rd party addon, maybe a WM_message has the wrong value?

You could also compare the windows messages captured to those in a C6 app to see if there is any difference?

Edit: Maybe there is a system hook being used intercepting the WM message. I have noticed the other day when going through the windows api’s, it is now possible to build apps which block system hooks from being installed, which I thought was quite good.

“Ok, so with the app open before minimising” > No messages appear in Spy++.

“Do you have any subclassing in use” > Sorry but I have no idea.

“You could also compare the windows messages captured to those in a C6 app” > I don’t have C6 or any C6 apps anymore.

Further info:

  1. The issue occurs when the maximise button is pressed. The app doesn’t have to be minimised to the tray, even just a minimised app window then clicking the maximise button will do it.
  2. I have found other browse windows that it doesn’t occur on so will dig deeper to find out the differences between them.

Regards,
Trent

Can you get any messages to appear when you move your mouse over the app? You should see things like WM_xyz and other stuff.

If you look at the procedure.clw, do you see any local procedures and what classes are included in the procedure? Sometimes a class could have a subclassing procedure built into it, that might be included in the procedure.

It doesnt have to be specifically a C6 app, it could be a C7 or later. C6 is force of habit for me.

So point 2. What are the differences the browse windows that behave have compared to the one’s that dont behave?

If there are no differences, have you tried exporting the procedure to a txa and then reimporting it, given it a new procedure name, and have you wiped all the compiler files just to be on the safe side?

That will be the OBJ folder in your app’s main folder where the app, dct, clw, lib, ico, jpg etc files exist (dependent on your redirection file configuration).
I know this sometimes caused problems in the past, dont know if its still an issue today.

So theres a couple things to establish, which I havent done myself, and that is, is a list control shrunk normally when an app is minimised, and if it is, then why isnt it getting restored to its previous size.
If the list control being shrunk is not normal behaviour when the app is minimised, then what is shrinking it when the app’s minimise button is clicked on.

Spy++ could give you the info to those two last questions, but if you are not getting the messages, can you see what the property of the “faulty” list control is when the app is minimised and then do the same for a list control which works as expected, when its minimised, ie a repeat of the the screenshots you did earlier?

At least this way, you might be able to establish if the faulty list box is being shrunk when the app is minimised and by then doing the same process for a working as expected list box, you can establish if its normal behaviour for the list box to be shrunk. Does that make any sense?

Thanks Richard. Found I was using the wrong Spyy++ version and now have messages.

Minimise:

<000001> 000306BC S WM_GETDLGCODE
<000002> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000003> 000306BC S WM_GETTEXTLENGTH
<000004> 000306BC R WM_GETTEXTLENGTH cch:0
<000005> 000306BC S WM_IME_SETCONTEXT fSet:1 iShow:C000000F
<000006> 000306BC R WM_IME_SETCONTEXT
<000007> 000306BC S WM_SETFOCUS hwndLoseFocus:000301F0
<000008> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:11010A0E lParam:00000000
<000009> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000010> 000306BC S message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] wParam:00000000 lParam:00000000
<000011> 000306BC R message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] lResult:1ED31DF8
<000012> 000306BC R WM_SETFOCUS
<000013> 000306BC S WM_GETDLGCODE
<000014> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000015> 000306BC S WM_KILLFOCUS hwndGetFocus:000306F2
<000016> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:51010DCC lParam:00000000
<000017> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000018> 000306BC R WM_KILLFOCUS
<000019> 000306BC S WM_IME_SETCONTEXT fSet:0 iShow:C000000F
<000020> 000306BC R WM_IME_SETCONTEXT
<000021> 000306BC S WM_GETDLGCODE
<000022> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000023> 000306BC S WM_GETTEXTLENGTH
<000024> 000306BC R WM_GETTEXTLENGTH cch:0
<000025> 000306BC S WM_IME_SETCONTEXT fSet:1 iShow:C000000F
<000026> 000306BC R WM_IME_SETCONTEXT
<000027> 000306BC S WM_SETFOCUS hwndLoseFocus:000306F2
<000028> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:1B010E7F lParam:00000000
<000029> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000030> 000306BC S message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] wParam:00000000 lParam:00000000
<000031> 000306BC R message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] lResult:1ED31DF8
<000032> 000306BC R WM_SETFOCUS
<000033> 000306BC S WM_GETDLGCODE
<000034> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000035> 000306BC S WM_GETTEXTLENGTH
<000036> 000306BC R WM_GETTEXTLENGTH cch:0
<000037> 000306BC S WM_WINDOWPOSCHANGING lpwp:019AF4CC
<000038> 000306BC R WM_WINDOWPOSCHANGING
<000039> 000306BC S WM_NCCALCSIZE fCalcValidRects:True lpncsp:019AF4A4
<000040> 000306BC R WM_NCCALCSIZE fuValidRect:0000 lpncsp:019AF4A4
<000041> 000306BC S WM_WINDOWPOSCHANGED lpwp:019AF4CC
<000042> 000306BC S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:6 nHeight:274
<000043> 000306BC R WM_SIZE
<000044> 000306BC R WM_WINDOWPOSCHANGED
<000045> 000306BC S WM_GETTEXTLENGTH
<000046> 000306BC R WM_GETTEXTLENGTH cch:0
<000047> 000306BC S WM_WINDOWPOSCHANGING lpwp:019AF4CC
<000048> 000306BC R WM_WINDOWPOSCHANGING
<000049> 000306BC S WM_NCCALCSIZE fCalcValidRects:True lpncsp:019AF4A4
<000050> 000306BC R WM_NCCALCSIZE fuValidRect:0000 lpncsp:019AF4A4
<000051> 000306BC S WM_WINDOWPOSCHANGED lpwp:019AF4CC
<000052> 000306BC S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:6 nHeight:6
<000053> 000306BC R WM_SIZE
<000054> 000306BC R WM_WINDOWPOSCHANGED
<000055> 000306BC P WM_PAINT hdc:00000000
<000056> 000306BC S WM_NCPAINT hrgn:00000001
<000057> 000306BC R WM_NCPAINT
<000058> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:91010DA0 lParam:00000000
<000059> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000060> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:11010A0E lParam:00000000
<000061> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000062> 000306BC S WM_CTLCOLORSCROLLBAR hdcSB:04010AEF hwndSB:00030612
<000063> 000306BC R WM_CTLCOLORSCROLLBAR hBrush:0010008E
<000064> 000306BC S WM_KILLFOCUS hwndGetFocus:(null)
<000065> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:51010DCC lParam:00000000
<000066> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000067> 000306BC R WM_KILLFOCUS
<000068> 000306BC S WM_IME_SETCONTEXT fSet:0 iShow:C000000F
<000069> 000306BC S WM_IME_NOTIFY dwCommand:IMN_CLOSESTATUSWINDOW dwCommand:00000001 dwData:00000000
<000070> 000306BC R WM_IME_NOTIFY
<000071> 000306BC R WM_IME_SETCONTEXT

Maximise:

<000001> 000306BC S WM_GETDLGCODE
<000002> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000003> 000306BC S WM_GETTEXTLENGTH
<000004> 000306BC R WM_GETTEXTLENGTH cch:0
<000005> 000306BC S WM_IME_SETCONTEXT fSet:1 iShow:C000000F
<000006> 000306BC R WM_IME_SETCONTEXT
<000007> 000306BC S WM_SETFOCUS hwndLoseFocus:000301F0
<000008> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:11010A0E lParam:00000000
<000009> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000010> 000306BC S message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] wParam:00000000 lParam:00000000
<000011> 000306BC R message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] lResult:1ED31DF8
<000012> 000306BC R WM_SETFOCUS
<000013> 000306BC S WM_GETDLGCODE
<000014> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000015> 000306BC S WM_KILLFOCUS hwndGetFocus:000306F2
<000016> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:51010DCC lParam:00000000
<000017> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000018> 000306BC R WM_KILLFOCUS
<000019> 000306BC S WM_IME_SETCONTEXT fSet:0 iShow:C000000F
<000020> 000306BC R WM_IME_SETCONTEXT
<000021> 000306BC S WM_GETDLGCODE
<000022> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000023> 000306BC S WM_GETTEXTLENGTH
<000024> 000306BC R WM_GETTEXTLENGTH cch:0
<000025> 000306BC S WM_IME_SETCONTEXT fSet:1 iShow:C000000F
<000026> 000306BC R WM_IME_SETCONTEXT
<000027> 000306BC S WM_SETFOCUS hwndLoseFocus:000306F2
<000028> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:1B010E7F lParam:00000000
<000029> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000030> 000306BC S message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] wParam:00000000 lParam:00000000
<000031> 000306BC R message:0xC1B7 [Registered:"CW_QUERY_PFIELD"] lResult:1ED31DF8
<000032> 000306BC R WM_SETFOCUS
<000033> 000306BC S WM_GETDLGCODE
<000034> 000306BC R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
<000035> 000306BC S WM_GETTEXTLENGTH
<000036> 000306BC R WM_GETTEXTLENGTH cch:0
<000037> 000306BC S WM_WINDOWPOSCHANGING lpwp:019AF4CC
<000038> 000306BC R WM_WINDOWPOSCHANGING
<000039> 000306BC S WM_NCCALCSIZE fCalcValidRects:True lpncsp:019AF4A4
<000040> 000306BC R WM_NCCALCSIZE fuValidRect:0000 lpncsp:019AF4A4
<000041> 000306BC S WM_WINDOWPOSCHANGED lpwp:019AF4CC
<000042> 000306BC S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:6 nHeight:274
<000043> 000306BC R WM_SIZE
<000044> 000306BC R WM_WINDOWPOSCHANGED
<000045> 000306BC S WM_GETTEXTLENGTH
<000046> 000306BC R WM_GETTEXTLENGTH cch:0
<000047> 000306BC S WM_WINDOWPOSCHANGING lpwp:019AF4CC
<000048> 000306BC R WM_WINDOWPOSCHANGING
<000049> 000306BC S WM_NCCALCSIZE fCalcValidRects:True lpncsp:019AF4A4
<000050> 000306BC R WM_NCCALCSIZE fuValidRect:0000 lpncsp:019AF4A4
<000051> 000306BC S WM_WINDOWPOSCHANGED lpwp:019AF4CC
<000052> 000306BC S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:6 nHeight:6
<000053> 000306BC R WM_SIZE
<000054> 000306BC R WM_WINDOWPOSCHANGED
<000055> 000306BC P WM_PAINT hdc:00000000
<000056> 000306BC S WM_NCPAINT hrgn:00000001
<000057> 000306BC R WM_NCPAINT
<000058> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:91010DA0 lParam:00000000
<000059> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000060> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:11010A0E lParam:00000000
<000061> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000062> 000306BC S WM_CTLCOLORSCROLLBAR hdcSB:04010AEF hwndSB:00030612
<000063> 000306BC R WM_CTLCOLORSCROLLBAR hBrush:0010008E
<000064> 000306BC S WM_KILLFOCUS hwndGetFocus:(null)
<000065> 000306BC S message:0xB00C [User-defined:WM_APP+12300] wParam:51010DCC lParam:00000000
<000066> 000306BC R message:0xB00C [User-defined:WM_APP+12300] lResult:1C100BB6
<000067> 000306BC R WM_KILLFOCUS
<000068> 000306BC S WM_IME_SETCONTEXT fSet:0 iShow:C000000F
<000069> 000306BC S WM_IME_NOTIFY dwCommand:IMN_CLOSESTATUSWINDOW dwCommand:00000001 dwData:00000000
<000070> 000306BC R WM_IME_NOTIFY
<000071> 000306BC R WM_IME_SETCONTEXT

If you look at the procedure.clw

Here are the only classes in the module.clw:

 ThisWindow           CLASS(WindowManager)
Ask                    PROCEDURE(),DERIVED
Init                   PROCEDURE(),BYTE,PROC,DERIVED
Kill                   PROCEDURE(),BYTE,PROC,DERIVED
Run                    PROCEDURE(USHORT Number,BYTE Request),BYTE,PROC,DERIVED
TakeAccepted           PROCEDURE(),BYTE,PROC,DERIVED
TakeCloseEvent         PROCEDURE(),BYTE,PROC,DERIVED
TakeEvent              PROCEDURE(),BYTE,PROC,DERIVED
TakeFieldEvent         PROCEDURE(),BYTE,PROC,DERIVED
TakeNewSelection       PROCEDURE(),BYTE,PROC,DERIVED
TakeWindowEvent        PROCEDURE(),BYTE,PROC,DERIVED
                     END

Toolbar              ToolbarClass
! ----- ThisAnyFont --------------------------------------------------------------------------
ThisAnyFont          Class(AnyFont)
                     End  ! ThisAnyFont
! ----- end ThisAnyFont -----------------------------------------------------------------------
! ----- ThisListManager:Browse:1 --------------------------------------------------------------------------
ThisListManager:Browse:1 Class(ListManager)
                     End  ! ThisListManager:Browse:1
! ----- end ThisListManager:Browse:1 -----------------------------------------------------------------------
! ----- ThisListManager:DBK:CategoryName --------------------------------------------------------------------------
ThisListManager:DBK:CategoryName Class(ListManager)
                     End  ! ThisListManager:DBK:CategoryName
! ----- end ThisListManager:DBK:CategoryName -----------------------------------------------------------------------
! ----- ThisAnyText --------------------------------------------------------------------------
ThisAnyText          Class(AnyText)
    ! derived method declarations
SetFileNames           PROCEDURE (),Virtual
                     End  ! ThisAnyText
! ----- end ThisAnyText -----------------------------------------------------------------------
BRW1                 CLASS(BrowseClass)                    ! Browse using ?Browse:1
Q                      &Queue:Browse:1                !Reference to browse queue
ApplyFilter            PROCEDURE(),DERIVED
Init                   PROCEDURE(SIGNED ListBox,*STRING Posit,VIEW V,QUEUE Q,RelationManager RM,WindowManager WM)
ResetSort              PROCEDURE(BYTE Force),BYTE,PROC,DERIVED
SetQueueRecord         PROCEDURE(),DERIVED
TakeNewSelection       PROCEDURE(),DERIVED
UpdateWindow           PROCEDURE(),DERIVED
ValidateRecord         PROCEDURE(),BYTE,DERIVED
                     END

BRW1::Sort0:Locator  StepLocatorClass                      ! Default Locator
BRW1::Sort1:Locator  StepLocatorClass                      ! Conditional Locator - CHOICE(?CurrentTab)=1 and CHOICE(?Sheet2) = 1
BRW1::Sort2:Locator  StepLocatorClass                      ! Conditional Locator - CHOICE(?CurrentTab)=1 and CHOICE(?Sheet2) = 2
BRW1::Sort3:Locator  StepLocatorClass                      ! Conditional Locator - CHOICE(?CurrentTab)=1 and CHOICE(?Sheet2) = 3
BRW1::Sort4:Locator  EntryLocatorClass                     ! Conditional Locator - CHOICE(?CurrentTab)=2 and CHOICE(?Sheet3)=1
BRW1::Sort5:Locator  EntryLocatorClass                     ! Conditional Locator - CHOICE(?CurrentTab)=2 and CHOICE(?Sheet3)=2
BRW1::Sort6:Locator  EntryLocatorClass                     ! Conditional Locator - CHOICE(?CurrentTab)=2 and CHOICE(?Sheet3)=3
BRW1::Sort7:Locator  EntryLocatorClass                     ! Conditional Locator - CHOICE(?CurrentTab)=2 and CHOICE(?Sheet3)=4
BRW1::Sort8:Locator  EntryLocatorClass                     ! Conditional Locator - CHOICE(?CurrentTab)=2 and CHOICE(?Sheet3)=5
BRW1::Sort9:Locator  StepLocatorClass                      ! Conditional Locator - CHOICE(?CurrentTab)=2 and CHOICE(?Sheet3)=6
Resizer              CLASS(WindowResizeClass)
Init                   PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
Resize                 PROCEDURE(),BYTE,PROC,DERIVED
                     END

Calendar15           CalendarClass
FDB27                CLASS(FileDropClass)                  ! File drop manager
Q                      &Queue:FileDrop                !Reference to display queue
                     END

It doesnt have to be specifically a C6 app

I don’t have any other Clarion version.

So point 2. What are the differences the browse windows

Haven’t found any yet. They use all the same tempates, all ABC template chain standard stuff. I’ll try re-importing the procedure/cleaning the OBJ folder/testing the other list browse in Spy++ later today and will let you know the results.

Regards,
Trent

A little tip for comparing the WM messages

Downloads | Notepad++ (notepad-plus-plus.org)

Extend functionality with plugins | Notepad++ User Manual (npp-user-manual.org)

GitHub - notepad-plus-plus/nppPluginList: The official collection of Notepad++ plugins.

GitHub - pnedev/compare-plugin: Compare plugin for Notepad++

It wont be perfect, but the compare plugin will highlight blocks of WM_ which are identical or close to being identical, so it will help make going through the Spy++ messages more “palatable”.

I’ve tried the things that you have suggested:

  1. Export and re-import: same issue.

  2. Delete OBJ files for dll: same issue.

  3. Compare browse windows that do not exhibit this behaviour: can’t see anything different.

  4. Compare WM messages: Windows that don’t exhibit this behaviour have a lot less WM messages, but I don’t know what these messages mean or how to use them to debug my problem. Here is an example of a browse maximise that doesn’t exhibit the behaviour:

    <000001> 00010624 S WM_PAINT hdc:00000000
    <000002> 00010624 S WM_NCPAINT hrgn:2B040E51
    <000003> 00010624 R WM_NCPAINT
    <000004> 00010624 S message:0xB00C [User-defined:WM_APP+12300] wParam:0F010E66 lParam:00000000
    <000005> 00010624 R message:0xB00C [User-defined:WM_APP+12300] lResult:0F100BCB
    <000006> 00010624 R WM_PAINT
    <000007> 00010624 S WM_GETDLGCODE
    <000008> 00010624 R WM_GETDLGCODE fuDlgCode:DLGC_WANTARROWS | DLGC_HASSETSEL | DLGC_WANTCHARS
    <000009> 00010624 P WM_PAINT hdc:00000000
    <000010> 00010624 S WM_NCPAINT hrgn:00000001
    <000011> 00010624 R WM_NCPAINT
    <000012> 00010624 S WM_ERASEBKGND hdc:11010A62
    <000013> 00010624 R WM_ERASEBKGND fErased:True
    <000014> 00010624 S message:0xB00C [User-defined:WM_APP+12300] wParam:30010E80 lParam:00000000
    <000015> 00010624 R message:0xB00C [User-defined:WM_APP+12300] lResult:0F100BCB
    <000016> 00010624 S WM_CTLCOLORSCROLLBAR hdcSB:04010B12 hwndSB:00010626
    <000017> 00010624 R WM_CTLCOLORSCROLLBAR hBrush:0010008E

  5. I don’t think it’s normal behaviour for a list box to be shrunk on app minimise. If so would all the other controls be shrunk too? Why is it only the browse that is being shrunk?

I have found some more info: After the browse has resized to tiny, you can get it back to normal size by minimising or maximising the browse procedure window itself.

Regards,
Trent

  1. The list box is separate to the window in Spy++ so its not contained in the window.

So the app frame perhaps isnt passing everything to all open windows. What happens if you have two of the same windows open, do both fail, one work one fail, or both work?

So WM_xyz are Windows Messages sometimes with extra parameters which could be an address to a struct that contains more information.
The Accept loop in Clarion is the Message Loop in this document, basically windows is an (OS) Loop with one or more (program) loops and a program window is a (procedure) Loop usually on its own thread, but not always.
Window Messages (Get Started with Win32 and C++) - Win32 apps | Microsoft Docs

So Loop based OS’s have the advantage they can recover from crashes better than the older punch card and early main frame systems which would just crash and hang once some code has executed and/or hit a problem. The Windows core is reportedly one of the smallest loops for an OS, but that could just be MS marketing speak, but then the OS Tiny-Os, its core is only 400bytes according to this doc and many applications fit within 16Kb of memory, which is tiny with todays standards, you could fit an OS inside a hard disk controller or something like that, or some of todays digital watches!
Unbekannt (berkeley.edu)

These are some of the messages explained
WM_PAINT message (Winuser.h) - Win32 apps | Microsoft Docs
WM_ERASEBKGND message (Winuser.h) - Win32 apps | Microsoft Docs

WM_CTLCOLORSCROLLBAR message (Winuser.h) - Win32 apps | Microsoft Docs

The Spy++ is just showing you some of the WM its seeing, probably by hooking into the app, but this may become rarer as windows security is locking down some things which could be done easily in XP days.

API monitor apps also exist which will give you more of a trace of whats going on, one I’ved used in the past which OSS is rohitab.com api monitor, you can see what order some things are happening, like you can monitor how the Clarion runtime works.

Now if you are in Europe, and you find a bug, you can legally reverse engineer other peoples code to fix bugs. Now what the legal system doesnt comment on is what other knowledge you might gain in that process of reverse engineering and fixing bugs, buts its legal here in Europe, the High court has recently ruled on it!

Thanks for the detailed post, I will take a look at those MS docs tomorrow. Alas I am not in Europe but in Australia.

What happens if you have two of the same windows open

They both fail.

I just tested a client that still has the C8 version of our app and it doesn’t have this issue.

Regards,
Trent

JAT -
I’ve seen this before on very busy windows where controls that behave perfectly in the IDE loose their way at runtime.
Dumping to TXA and back, deleting tabs and putting them back, etc didn’t work.
I put a SetPosition for the wayward controls after the open which worked out and got me back to work. Try putting that in the maximized event for the window.
I realize that it’s the app that’s maximized so you may have to Notify that window’s thread from the application’s Maximized event.
and put the SetPosition in the window’s Notify event.

HTH
Chris C

Hi @ccordes ,

Thanks for your reply. I’ve been able to ‘fix’ the browse list using your suggestion:

  1. Added a global queue with proc name and thread number to store the threads of procs that have this issue.
  2. In the exe’s Main proc, added code in event:maximized to loop through this queue and notify each thread that is active.
  3. In each receiving proc, added code in WindowResizer.Resized method after parent code to set browse width and height local vars.
  4. In each receiving proc, when the notification is received set the window timer for half a second (further info below) and then on the first timer count set the browse width and height from the local vars.

The reason for the timer is because it wouldn’t work without it. The window needed a small delay for the resize to work. It probably did work without the timer but then the browse was resized back to tiny again too quick for the eye to see.

Thanks for your help.
Regards,
Trent

If the window is being resized but the list box isnt, would you even need the global queue in step 1 and 2?

For me it is required as my menu (Nav proc) is in a different proc than the Main proc. The Nav proc starts the browse window and needs to set the thread var somewhere so the Main proc can get it to notify the browse procs.

Hi @Trent_Crockett
That’s great. I’m glad it worked.

Be sure to let SV know about the original issue and any light you can shed on it.

The problem is I have no idea how to replicate the issue, therefore the bug report would be a bit useless for SV. Also don’t know if it’s a bug in C11 that has been fixed in C11.1.

Your two screen shots are proof and the WM_messages captured in Spy++ may also give them some insight.