View Issue Details

IDProjectCategoryView StatusLast Update
0021915LazarusLCLpublic2013-04-04 10:13
Reporterocean Assigned ToBart Broersma  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
PlatformWin32 
Product Version1.1 (SVN) 
Summary0021915: Loading icon problem
DescriptionTried Lazarus-1.1-37117-fpc-2.6.1-20120501-win32.exe

Image1.Picture.Icon.Handle := LoadIcon(0, IDI_QUESTION);

This doesn't work anymore? I get some resource not found exception.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

duplicate of 0024222 closedPaul Ishenin Incorrect results given by LoadIcon, LoadCursor and LoadBitmap functions in a Windows environment. 

Activities

Reinier Olislagers

2012-05-02 10:14

developer   ~0059181

Perhaps a small test project would help with repeating tests?

ocean

2012-05-02 10:44

reporter   ~0059182

Works fine in 0.9.30.4 & 2.6.0. It's easy to test, just add Timage to form, that code and uses Windows;

2012-05-02 10:53

 

bug21915.zip (65,416 bytes)

Reinier Olislagers

2012-05-02 10:56

developer   ~0059183

Instead of telling us that... why not just upload the project. It makes it much more repeatable.

Attached project works for me. Compile, run, press button.
Hope that is what you meant.

Lazarus x86 windows, r37131, FPC fixes 2.6
Lazarus x64 windows, r37131, FPC trunk r21191

Anton Kavalenka

2012-05-02 11:15

reporter   ~0059184

Works fine in SVN trunk FPC + SVN trunk Lazarus

ocean

2012-05-02 11:25

reporter   ~0059185

Yes and it works here too. Only difference is I had "uses Windows" first.

uses Windows, Classes, SysUtils, ... Sample fails here.

ocean

2012-05-06 07:44

reporter   ~0059290

Is there something I'm missing?

Another similar problem, when I have moved Windows AFTER.

This code compiles fine:

uses
  Windows, Classes, SysUtils, FileUtil, Forms,
  Controls, Graphics, Dialogs, StdCtrls;

var bmp: TBitmap;
begin
 bmp:=TBitmap.create;
end;

This fails to compile:

uses
  Classes, SysUtils, FileUtil, Forms,
  Controls, Graphics, Dialogs, StdCtrls, Windows;

var bmp: TBitmap;
begin
 bmp:=TBitmap.create;
end;

unit1.pas(35,15) Error: identifier idents no member "create"
unit1.pas(35,15) Fatal: Syntax error, ";" expected but "identifier CREATE" found

Bart Broersma

2012-05-06 13:11

developer   ~0059300

TBitMap now points to Windows.TBitMap.
Please ask questions on the forum or mailinglist.

goldenfox

2012-05-07 04:26

reporter   ~0059328

Works fine here too even without modifying the attached source code.

Laz IDE SVN 37206
FPC 2.7.1 SVN 21248
Windows 7 Ultimate 32bit

2012-05-07 07:27

 

Bug21915_2.zip (65,738 bytes)

2012-05-07 07:28

 

Errormessage.jpg (162,323 bytes)   
Errormessage.jpg (162,323 bytes)   

ocean

2012-05-07 07:29

reporter   ~0059331

Well it certanly does not work here. Try my attachment. See also attached screenshot of the error.

SVN 37117, FPC 2.6.1

Bart Broersma

2013-04-04 00:46

developer   ~0066792

Please continue in 0024222 and close this one.

Issue History

Date Modified Username Field Change
2012-05-02 09:33 ocean New Issue
2012-05-02 09:33 ocean Widgetset => Win32/Win64
2012-05-02 10:14 Reinier Olislagers Note Added: 0059181
2012-05-02 10:44 ocean Note Added: 0059182
2012-05-02 10:53 Reinier Olislagers File Added: bug21915.zip
2012-05-02 10:56 Reinier Olislagers Note Added: 0059183
2012-05-02 11:15 Anton Kavalenka Note Added: 0059184
2012-05-02 11:25 ocean Note Added: 0059185
2012-05-06 07:44 ocean Note Added: 0059290
2012-05-06 13:11 Bart Broersma Note Added: 0059300
2012-05-07 04:26 goldenfox Note Added: 0059328
2012-05-07 07:27 ocean File Added: Bug21915_2.zip
2012-05-07 07:28 ocean File Added: Errormessage.jpg
2012-05-07 07:29 ocean Note Added: 0059331
2013-04-04 00:46 Bart Broersma LazTarget => -
2013-04-04 00:46 Bart Broersma Note Added: 0066792
2013-04-04 00:46 Bart Broersma Relationship added duplicate of 0024222
2013-04-04 00:46 Bart Broersma Status new => resolved
2013-04-04 00:46 Bart Broersma Resolution open => duplicate
2013-04-04 00:46 Bart Broersma Assigned To => Bart Broersma
2013-04-04 10:13 ocean Status resolved => closed