Registriert seit: 6. Jan 2005
Ort: Lübbecke
575 Beiträge
Turbo C++
|
Re: Immer diese Sanduhr ...
22. Okt 2005, 20:48
Hier mal WM_CREATE
Delphi-Quellcode:
// Fenster zentrieren
wnd := FindWindow('Progman', nil);
CenterWindow(wnd, hwnd, HWND_TOP);
// Fenster style richtig einstellen
style := GetWindowLong(hwnd, GWL_STYLE);
SetWindowLong(hwnd, GWL_STYLE, style and (not WS_BORDER));
// Static für den Hintergrund erstellen
CreateWindow('STATIC', nil, WS_VISIBLE or WS_CHILD or SS_BITMAP,
0, 0, width, 55, hwnd, 100, hInstance, nil);
// Hintergrund laden
hBmp := LoadImage(hInstance, 'BG\BG.bmp', IMAGE_BITMAP,
width, height, LR_LOADFROMFILE);
SendMessage(GetDlgItem(hwnd, 100), STM_SETIMAGE, IMAGE_BITMAP, hBmp);
// Rund ecken rulez :D
rgn := CreateRoundRectRgn(0, 0, width, height, 20, 20);
SetWindowRgn(hwnd, rgn, True);
Chuck Norris has counted to infinity ... twice!
|
|
Zitat
|