I assumed that using Graphic Set Virtual 8000,4000 would create a hidden bitmap of about 32MB - increasing the memory footprint of the app.
But in this example, Task Manager shows no increase in memory requirements at all when going Virtual.
But, if I add a small BMP to the Graphic Virtual control, the app does seem to grow by the size of the BMP.
Bob apparently does something more than a very large bitmap ... not sure of the details.
But in this example, Task Manager shows no increase in memory requirements at all when going Virtual.
Code:
'Compilable Example: #Compile Exe #Dim All %Unicode = 1 #Include "Win32API.inc" Enum Equates Singular IDC_ButtonA = 500 IDC_ButtonB IDC_Graphic End Enum Global hDlg As Dword Function PBMain() As Long Dialog New Pixels, 0, "Fixed",300,300,300,200, %WS_OverlappedWindow To hDlg Control Add Graphic, hDlg, %IDC_Graphic, "", 0,0,300,200 Graphic Attach hDlg, %IDC_Graphic Control Add Button, hDlg, %IDC_ButtonA,"Virtual", 50,10,100,20 Control Add Button, hDlg, %IDC_ButtonB,"Fixed", 50,50,100,20 Dialog Show Modal hDlg Call DlgProc End Function CallBack Function DlgProc() As Long Select Case Cb.Msg Case %WM_Command Select Case Cb.Ctl Case %IDC_ButtonA : Graphic Set Virtual 8000,4000 : Dialog Set Text hDlg, "Virtual" Case %IDC_ButtonB : Graphic Set Fixed : Dialog Set Text hDlg, "Fixed" End Select End Select End Function
Bob apparently does something more than a very large bitmap ... not sure of the details.
Comment