Redraw Menu/Toolbar during Sizing
Posted: Mon Jul 08, 2013 11:53 am
I have a window with Menu and Toolbar. During sizing the window, I paint always the full window. This runs without problems.
My problem is, that during sizing the Menu and Toolbar aren't repainted often enough. Is there a way, to stop this?
The following example shows the problem only, if you have activated 'Show window content during sizing' (don't know the correct English description in Windows)
Tested Win7 x86 + x64
My problem is, that during sizing the Menu and Toolbar aren't repainted often enough. Is there a way, to stop this?
The following example shows the problem only, if you have activated 'Show window content during sizing' (don't know the correct English description in Windows)
Code: Select all
OpenWindow(0, 200, 200, 400, 300, "Test", #PB_Window_SystemMenu | #PB_Window_SizeGadget)
SmartWindowRefresh(0, #True)
If CreateToolBar(0, WindowID(0))
ToolBarStandardButton( 0, #PB_ToolBarIcon_New)
ToolBarStandardButton( 1, #PB_ToolBarIcon_Open)
ToolBarStandardButton( 2, #PB_ToolBarIcon_Save)
ToolBarStandardButton( 3, #PB_ToolBarIcon_Copy)
ToolBarStandardButton( 4, #PB_ToolBarIcon_Cut)
ToolBarStandardButton( 5, #PB_ToolBarIcon_Delete)
ToolBarStandardButton( 6, #PB_ToolBarIcon_Find)
ToolBarStandardButton( 7, #PB_ToolBarIcon_Help)
ToolBarStandardButton( 8, #PB_ToolBarIcon_Paste)
ToolBarStandardButton( 9, #PB_ToolBarIcon_Print)
ToolBarStandardButton(10, #PB_ToolBarIcon_PrintPreview)
ToolBarStandardButton(11, #PB_ToolBarIcon_Properties)
ToolBarStandardButton(12, #PB_ToolBarIcon_Redo)
ToolBarStandardButton(13, #PB_ToolBarIcon_Undo)
ToolBarStandardButton(14, #PB_ToolBarIcon_Replace)
ToolBarStandardButton(15, #PB_ToolBarIcon_New)
ToolBarStandardButton(16, #PB_ToolBarIcon_Open)
ToolBarStandardButton(17, #PB_ToolBarIcon_Save)
ToolBarStandardButton(18, #PB_ToolBarIcon_Copy)
ToolBarStandardButton(19, #PB_ToolBarIcon_Cut)
ToolBarStandardButton(20, #PB_ToolBarIcon_Delete)
ToolBarStandardButton(21, #PB_ToolBarIcon_Find)
ToolBarStandardButton(22, #PB_ToolBarIcon_Help)
ToolBarStandardButton(23, #PB_ToolBarIcon_Paste)
ToolBarStandardButton(24, #PB_ToolBarIcon_Print)
ToolBarStandardButton(25, #PB_ToolBarIcon_PrintPreview)
ToolBarStandardButton(26, #PB_ToolBarIcon_Properties)
ToolBarStandardButton(27, #PB_ToolBarIcon_Redo)
ToolBarStandardButton(28, #PB_ToolBarIcon_Undo)
ToolBarStandardButton(29, #PB_ToolBarIcon_Replace)
EndIf
If CreateMenu(0, WindowID(0))
MenuTitle("Menu 1")
MenuTitle("Menu 2")
MenuTitle("Menu 3")
MenuTitle("Menu 4")
MenuTitle("Menu 5")
MenuTitle("Menu 6")
MenuTitle("Menu 7")
MenuTitle("Menu 8")
MenuTitle("Menu 9")
EndIf
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_SizeWindow
For a = 1 To 100000
b = a
Next
Case #PB_Event_CloseWindow
End
EndSelect
ForEver