Autor Beitrag
JensLaskowski
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

Win XP
BDS 2006 Architect
BeitragVerfasst: Mo 24.09.07 16:27 
Hallo,

ich will eine DBGrid benutzen, die aber keine Scrollbar hat. Daraufhin habe ich im Internet gesucht und habe folgendes gefunden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
type
  TNoScrollDBGrid = class(TDBGrid)
  private
    procedure WMNCCalcSize(var Msg: TMessage);
      message WM_NCCALCSIZE;
  end;

procedure TNoScrollDBGrid.WMNCCalcSize(var Msg: TMessage);
const
  Scrollstyles = WS_VSCROLL or WS_HSCROLL;
var
  Style: Integer;
begin
  Style := GetWindowLong(Handle, GWL_STYLE);
  if (Style and Scrollstyles) <> 0 then
    SetWindowLong(Handle, GWL_STYLE, Style and not Scrollstyles);
  inherited;
end;


Wenn ich aber diesen Code in meinem Code einfüge bekomme ich folgende Fehlermeldungen und weiß nicht wieso. Denn ich bin der meinung, dasss ich alles richtig eingebaut habe.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
[Pascal Error] HauptUnit.pas(87): E2003 Undeclared identifier: 'WMNCCalcSize'
[Pascal Error] HauptUnit.pas(87): E2029 ';' expected but '(' found
[Pascal Error] HauptUnit.pas(87): E2029 ';' expected but ')' found
[Pascal Error] HauptUnit.pas(91): E2003 Undeclared identifier: 'Handle'
[Pascal Error] HauptUnit.pas(94): E2075 This form of method call only allowed in methods of derived types
[Pascal Error] HauptUnit.pas(26): E2065 Unsatisfied forward or external declaration: 'TForm1.WMNCCalcSize'
[Pascal Fatal Error] FilmBase.dpr(9): F2063 Could not compile used unit 'HauptUnit.pas'


Kann mir jemand helfen??

Mit freundlichen Grüßen
JensLaskowski


Moderiert von user profile iconjasocul: Topic aus Datenbanken verschoben am Mo 24.09.2007 um 18:35

_________________
Nichtstun macht nur dann Spaß, wenn man eigentlich viel zu tun hätte.
Wonko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 69



BeitragVerfasst: Mo 24.09.07 16:44 
Hallo,
zu Deinen Fehlermeldungen kann ich leider nichts sagen, aber vielleicht hilft Dir das weiter?

_________________
"Read the directions, even if you don't follow them.", Mary Schmich
JensLaskowski Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

Win XP
BDS 2006 Architect
BeitragVerfasst: Di 25.09.07 17:42 
Danke Wonko.

Die Methode hat funktioniert. Weiß net ob es an de Delphi Version liegt, dass die andere Methode von mir nicht geht.

Mit freundlichen Grüßen
JensLaskowski

_________________
Nichtstun macht nur dann Spaß, wenn man eigentlich viel zu tun hätte.