Einzelnen Beitrag anzeigen

heiopei
(Gast)

n/a Beiträge
 
#4

Re: fontänderung eines fensters mit nonvcl

  Alt 5. Mär 2005, 13:47
na gut,
also hier ist jetzt mal mein code, den ich bis jetzt hab:
(hatte davor zeitbedingt keinen zugriff drauf )

Delphi-Quellcode:
//innerhalb von wm_create...
  myfont := CreateFont(-12, 0, 0, 0, 0, 0, 0, 0, ANSI_CHARSET,
      OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
      DEFAULT_PITCH, 'MS Sans Serif');
  if myfont <> 0 then
    SendMessage(hwnd, WM_SETFONT, Integer(myfont), Integer(true));

//innerhalb von keydown...
  ahdc := GetDC(hWnd);
  SetBkMode(ahdc, TRANSPARENT);
  SetTextColor(ahdc, $0000FF00);
  SelectObject(ahdc, myfont);
  Textout(ahdc, tpos, rpos, PChar(@wparam), SizeOf(1));
  Inc(tpos, 10);
  ReleaseDC(hWnd, ahdc);
bin für schnelle hilfe sehr sehr dankbar!!!

heiopei
  Mit Zitat antworten Zitat