fork download
  1. function ProcWnd(Wnd: HWND; uMsg: Integer; wPrm: WPARAM; lPrm: LPARAM): LRESULT; STDCALL;
  2. var
  3. //
  4. pnm: PNMHDR;
  5. //
  6. LPNMTVCD: LPNMTVCUSTOMDRAW;
  7. begin
  8. //
  9. Result:=0;
  10.  
  11. //
  12. if uMsg = WM_NOTIFY then
  13. begin
  14. //
  15. pnm:=PNMHDR(lPrm);
  16. //
  17. if pnm^.idFrom = idMyTreeView then
  18. //
  19. if pnm^.code = NM_CUSTOMDRAW then
  20. begin
  21. //
  22. LPNMTVCD:=LPNMTVCUSTOMDRAW(lPrm);
  23.  
  24. //
  25. case LPNMTVCD^.nmcd.dwDrawStage of
  26. //
  27. CDDS_PREPAINT:
  28. begin
  29. //
  30. uMsg:=CDRF_NOTIFYITEMDRAW;
  31. //
  32. Result:=CDRF_NOTIFYITEMDRAW;
  33. //
  34. Exit;
  35. end;
  36.  
  37. //
  38. CDDS_ITEMPREPAINT:
  39. begin
  40. //
  41. if (LPNMTVCD^.nmcd.uItemState and CDIS_SELECTED) <> 0 then
  42. begin
  43. //
  44. LPNMTVCD^.clrText:=$ffffff;
  45. //
  46. LPNMTVCD^.clrTextBk:=$c56a31;
  47. end;
  48.  
  49. //
  50. Result:=CDRF_NEWFONT;
  51. end;
  52. end;
  53. end
  54. end;
  55.  
  56. // ---> Обработка остальных событий окна.
  57. end;
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
Free Pascal Compiler version 2.6.4+dfsg-6 [2015/05/31] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling prog.pas
prog.pas(1,27) Error: Identifier not found "HWND"
prog.pas(1,56) Error: Identifier not found "WPARAM"
prog.pas(1,70) Error: Identifier not found "LPARAM"
prog.pas(1,80) Error: Identifier not found "LRESULT"
prog.pas(4,12) Error: Identifier not found "PNMHDR"
prog.pas(4,12) Error: Error in type definition
prog.pas(6,27) Error: Identifier not found "LPNMTVCUSTOMDRAW"
prog.pas(6,27) Error: Error in type definition
prog.pas(9,7) Error: Identifier not found "Result"
prog.pas(12,21) Error: Identifier not found "WM_NOTIFY"
prog.pas(15,14) Error: Identifier not found "PNMHDR"
prog.pas(17,10) Error: Illegal qualifier
prog.pas(17,33) Error: Identifier not found "idMyTreeView"
prog.pas(19,10) Error: Illegal qualifier
prog.pas(19,32) Error: Identifier not found "NM_CUSTOMDRAW"
prog.pas(22,31) Error: Identifier not found "LPNMTVCUSTOMDRAW"
prog.pas(25,21) Error: Illegal qualifier
prog.pas(27,20) Error: Identifier not found "CDDS_PREPAINT"
prog.pas(27,20) Error: Constant Expression expected
prog.pas(30,34) Error: Identifier not found "CDRF_NOTIFYITEMDRAW"
prog.pas(32,15) Error: Identifier not found "Result"
prog.pas(32,36) Error: Identifier not found "CDRF_NOTIFYITEMDRAW"
prog.pas(38,24) Error: Identifier not found "CDDS_ITEMPREPAINT"
prog.pas(38,24) Error: Constant Expression expected
prog.pas(38,24) Error: duplicate case label
prog.pas(41,22) Error: Illegal qualifier
prog.pas(41,56) Error: Identifier not found "CDIS_SELECTED"
prog.pas(44,20) Error: Illegal qualifier
prog.pas(46,20) Error: Illegal qualifier
prog.pas(50,15) Error: Identifier not found "Result"
prog.pas(50,29) Error: Identifier not found "CDRF_NEWFONT"
prog.pas(57,4) Fatal: Syntax error, "BEGIN" expected but "end of file" found
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
stdout
Standard output is empty