[Bug 24757] New: Form can not be deactivated using SetWindowLong

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Oct 16 01:38:20 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=24757

           Summary: Form can not be deactivated using SetWindowLong
           Product: Wine
           Version: 1.3.2
          Platform: x86
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdi32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: alejandro.lavarello at gmail.com


With SetWindowLong one can make a window that never activates,
e.g., never gets focused and stay below the others.
This works OK in Windows XP, but do not work in Wine.
This is the Lazarus code, that once compiled, makes
an application that works in Windows but not in Wine:

----begin code --------

unit Unit1; 



{$mode objfpc}{$H+}



interface



uses

  Windows, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,

  StdCtrls, ExtCtrls;



type



  { TForm1 }



  TForm1 = class(TForm)

    Button1: TButton;

    Edit1: TEdit;

    Timer1: TTimer;

    procedure Button1Click(Sender: TObject);



    procedure FormCreate(Sender: TObject);

    procedure FormShow(Sender: TObject);

    procedure Timer1Timer(Sender: TObject);

  private

    { private declarations }



  public

    { public declarations }

  end; 



var

  Form1: TForm1; 

    i:integer;

implementation



{$R *.lfm}






{ TForm1 }



procedure TForm1.FormCreate(Sender: TObject);

begin

  i:=0;

  Timer1.Interval :=5000;

  Timer1.Enabled :=True;

  Edit1.Text :='Init';

  Self.ShowInTaskBar :=stNever;

end;



procedure TForm1.Button1Click(Sender: TObject);

begin

  i:=i+1;

  Edit1.Text :='Click number: '+IntToStr(i);

end;






procedure TForm1.Timer1Timer(Sender: TObject);

begin

  Edit1.text:='Form with style = WS_EX_NOACTIVATE';

  SetWindowLong(self.Handle  , GWL_EXSTYLE, WS_EX_NOACTIVATE);

  Timer1.Enabled :=False;

end;





END.




----end code ----------

Tested in Wine 1.3.2 under Puppy Linux 4.3.1 and in
WineXO under Sugar in a XO-1.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list