Autor Beitrag
BlackPhantom
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 144

Win 2000, Win XP, UNIX
D7 Prof, C, HTML, VB 5
BeitragVerfasst: Do 01.05.03 16:52 
Nochmals HI@all

Mir viel gerade ein was ich noch Fragen wollte und zwar:

Ich möchte das die Überschrift bzw. Caption der Form genau in der Mitte der Meüleiste oben ist.
Des Weiteren möchte ich eine andere Farbe für die Überschrift.

Kann man beides irgendwie in die Tat umsetzten oder geht das nicht?

thx4all

MFG
BlackP

Moderiert von user profile iconTino: Titel geändert.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 01.05.03 17:52 
Ja, gehen tut es schon.. is aber ein bisschen komplizierter. Du musst auf die WM_NCPAINT Message reagieren und den NonClient Bereich selbst malen...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
BlackPhantom Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 144

Win 2000, Win XP, UNIX
D7 Prof, C, HTML, VB 5
BeitragVerfasst: Do 01.05.03 17:58 
Und wie soll das gehen? Gibt es so ne Art kleines Tutorial irgendwo oder einen Beitrag im Forum wo das schon erklärt worden ist?
WEil ich habe keine Ahnung wie man den Non-Cilent Bereich selber malen soll...

:?:
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 01.05.03 18:09 
Es gibt eine Komponente namen skinz. Die dürfte dir helfen. geh mal auf torry.net und such da nach dieser.
BlackPhantom Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 144

Win 2000, Win XP, UNIX
D7 Prof, C, HTML, VB 5
BeitragVerfasst: Do 01.05.03 18:13 
danke ich schau direkt mal nach
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 01.05.03 18:28 
Hi,

bei den RX Komponenten ist eine Compo namens TRXGradientCaption dabei - bei der kannst du den Font umstellen. Allerdings geht das mit dem Zentrieren nicht.

AXMD
Jack Falworth
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 222

Win XP Pro, Slackware 10.0
D5 Enterprise, C++, ABAP
BeitragVerfasst: Do 01.05.03 18:31 
Im Notfall zentrieren mit Leerzeichen und Augenmaß :)

_________________
Andere zu kritisieren ist mitunter eine Möglichkeit, sich selbst ins bessere Licht zu setzen.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 01.05.03 18:35 
AXMD hat folgendes geschrieben:
Hi,

bei den RX Komponenten ist eine Compo namens TRXGradientCaption dabei - bei der kannst du den Font umstellen. Allerdings geht das mit dem Zentrieren nicht.

AXMD

Drum lautet bei dir die Devise für solche Sachen immer "selbermachen"! ;) Dann kann ich das so machen wie ich mir das vorstell.. :) -> bei meinem X-Spy zeichne ich die Caption zB auch selber.. werd den Code für die "TStyleForm" vielleicht auch veröffentlichen...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Moritz M.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1672



BeitragVerfasst: Do 01.05.03 18:36 
Da muss er aber verschiedene Auflösungen, Bildschirmgrößen, evtl. virtuelle Styles, falls verändertbar, Fenstergröße, beachten.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 01.05.03 19:20 
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
procedure WMNCPAINT(var Msg: TMessage); Message WM_NCPAINT;

[...]

procedure TForm1.WMNCPAINT(var msg: TMessage);
var
  rect: TRect;
  dc: HDC;
  szBuffer: array[0..255] of Char;
begin
  Inherited;
  if Msg.Msg = WM_NCPAINT then
  begin
    dc := GetWindowDC(Handle);
    rect.Left := GetSystemmetrics(SM_CXEDGE);
    rect.Top := GetSystemmetrics(SM_CYEDGE);
    rect.Right := Form1.Width-GetSystemmetrics(SM_CYEDGE);
    rect.Bottom := Getsystemmetrics(SM_CYCAPTION)+GetSystemmetrics(SM_CYFRAME);
    lstrcpy(szBuffer, 'Meine Fenstercaption');
    SetBkMode(dc, TRANSPARENT);
    SetTextColor(dc, RGB(255,255,255));
    DrawText(dc, szBuffer, lstrlen(szBuffer), rect, DT_CENTER or DT_VCENTER);
    ReleaseDC(Handle, dc);
  end;
  ReleaseDc(Handle, dc);
end;
BlackPhantom Threadstarter
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 144

Win 2000, Win XP, UNIX
D7 Prof, C, HTML, VB 5
BeitragVerfasst: Fr 02.05.03 20:05 
Danke......Ich versteh vielleicht mal die Hälfte davon hat mir aber sehr geholfen. Nochmals vielen Dank@ Luckie und allen anderen die sich an am Thread beteiligt haben.

thx@all

MFG
BlackP
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 03.05.03 02:40 
Das zweite RealeaseDC kannst du dir übrigens schenken.