Merged revision(s) 51813-51814 #c83e1c15e5-#c83e1c15e5, 51820 #70a5958e59 from trunk:

Examples: Fix resource loading in TestAll project.
........
Examples: Re-enable "Win32 GUI application" of TestAll project (accidentically introduced by me in r51813 #c83e1c15e5).
........
Examples: Fix crash in TForm1.ApplicationIdle of TestAll project.
........

git-svn-id: branches/fixes_1_6@51990 -
This commit is contained in:
maxim 2016-03-19 13:09:27 +00:00
parent b3fb47b5d3
commit a53f6cb96f
3 changed files with 28 additions and 22 deletions

View File

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
@ -44,10 +44,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="9"/>
<SearchPaths>
</SearchPaths>
<Version Value="11"/>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
@ -60,11 +57,5 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>

View File

@ -960,7 +960,7 @@ BitBtn1 := TBitBtn.Create(Self);
Font.Pitch := fpDefault;
Font.Size := 10;
Font.Style := BitBtn1.Font.Style+[fsBold];
LoadGlyphFromLazarusResource('topendialog');
LoadGlyphFromResourceName(hInstance,'topendialog');
//height := 28; Has to be set before Glyph
//HelpContext := 0; Identifier not found
Hint := 'Settings for BitBtn1 >>';
@ -2251,7 +2251,7 @@ SpeedButton1 := TSpeedButton.Create(Self);
Hint := 'SpeedButton1';
Color := clBtnFace;
ShowHint := True;
LoadGlyphFromLazarusResource('laz_open');
LoadGlyphFromResourceName(hInstance,'laz_open');
Visible := True;
end;
@ -2267,10 +2267,10 @@ SpeedButton2 := TSpeedButton.Create(Self);
Left := 35;
Top := 28;
Flat := False;
Hint := 'SpeedButton1';
Hint := 'SpeedButton2';
Color := clBtnFace;
ShowHint := True;
LoadGlyphFromLazarusResource('laz_save');
LoadGlyphFromResourceName(hInstance,'laz_save');
Enabled := True;
Visible := True;
end;
@ -2286,10 +2286,10 @@ SpeedButton3 := TSpeedButton.Create(Self);
Left := 60;
Top := 28;
Flat := False;
Hint := 'SpeedButton1';
Hint := 'SpeedButton3';
Color := clBtnFace;
ShowHint := True;
LoadGlyphFromLazarusResource('item_font');
LoadGlyphFromResourceName(hInstance,'item_font');
Enabled := True;
Visible := True;
end;
@ -2308,7 +2308,7 @@ SpeedButton4 := TSpeedButton.Create(Self);
Hint := 'SpeedButton4';
Color := clBtnFace;
ShowHint := True;
LoadGlyphFromLazarusResource('tcolordialog');
LoadGlyphFromResourceName(hInstance,'tcolordialog');
Enabled := True;
Visible := True;
end;

View File

@ -1560,6 +1560,7 @@ lblState := TLabel.Create(Self);
// ADD TrackBar CompTools HERE !!!!!!!!!
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//++++++++++++++++++++++++++++++ TUpDown Tools ++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ADD UpDown CompTools HERE !!!!!!!!!
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -2495,17 +2496,31 @@ procedure TForm1.ApplicationIdle(Sender: TObject; var Done: Boolean);
var
CurControl: TControl;
P: TPoint;
begin
GetCursorPos(P);
F: TForm;
i: Integer;
begin
//Only perform OnIdle if either the mainform or one of the BenchForms is active
//e.g. if a ShowMessage is showing, FFocusControl may point to an aready
//destroyed component, thus crashing the application.
F := Screen.ActiveForm;
if not Assigned(F) then Exit;
if (F <> Self) then
begin
for i := Low(BenchForm) to High(BenchForm) do
if (BenchForm[i] = F) then Break;
//writeln('Not the MainForm or a BenchForm');
Exit;
end;
GetCursorPos(P);
CurControl := FindControlAtPosition(P, True);
if FFocusControl <> CurControl then
begin
if FFocusControl <> nil then
if FFocusControl <> nil then
VirOnLeave(FFocusControl);
FFocusControl := CurControl;
if FFocusControl <> nil then
VirOnEnter(FFocusControl);
end;
end;
end;
procedure TForm1.VirOnEnter(Sender: TObject);
begin