Hallo,
ich will eine DBGrid benutzen, die aber keine Scrollbar hat. Daraufhin habe ich im Internet gesucht und habe folgendes gefunden:
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.
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
jasocul: 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.