AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Dummy-Konstanten

Ein Thema von nailor · begonnen am 11. Mai 2003 · letzter Beitrag vom 11. Mai 2003
 
Benutzerbild von nailor
nailor

Registriert seit: 12. Dez 2002
Ort: Karlsruhe
1.989 Beiträge
 
#3
  Alt 11. Mai 2003, 13:59
Code:
program bla;

uses
  Windows,
  Messages;

const
  MC_case1: cardinal = 0;
  MC_case2: cardinal = 1;
  MC_case3: cardinal = 2;

function MessageLoop(hWnd: HWND; uMsg: UINT; wParam: wParam; lParam: LParam):
  lresult; stdcall;
begin
  Result := 0;
  case uMsg of
    WM_DESTROY:
      PostQuitMessage(0);
    WM_CREATE:
      begin
        //nix bis jetzt
      end;
  else
    Result := DefWindowProc(hWnd, uMsg, wParam, lParam);
  end;
end;

procedure mc(CodeNR: cardinal);
begin
case CodeNR of
  MC_case1: begin {irgendwas} end;
  MC_case2: begin {irgendwas} end;
  MC_case3: begin {irgendwas} end;
end;
end;

var
  WindowClass: TWndClassEx = (
    cbSize         : SizeOf(TWndClassEx);
    Style          : CS_HREDRAW or CS_VREDRAW;
    lpfnWndProc    : @MessageLoop;
    cbClsExtra     : 0;
    cbWndExtra     : 0;
    hbrBackground  : COLOR_APPWORKSPACE;
    lpszMenuName   : nil;
    lpszClassName  : 'myClass';
    hIconSm        : 0;    );
  msg: TMsg;
begin
WindowClass.hInstance := hInstance;
WindowClass.hCursor   := LoadCursor(0, IDC_ARROW);
WindowClass.hIcon     := LoadIcon(0, IDI_APPLICATION);

RegisterClassEx(WindowClass);

CreateWindowEX(0, 'myClass', 'capt', WS_CAPTION or WS_VISIBLE,
                100, 100, 200, 125, 0, 0, hInstance, nil);

while GetMessage(msg,0,0,0) do
  begin
    TranslateMessage(msg);
    DispatchMessage(msg);
  end;
ExitCode := msg.wParam;
end.
Michael N.
http://nailor.devzero.de/code/sharpmath/testing/ --- Tests, Feedback, Anregungen, ... aller Art sehr willkommen!
::: don't try so hard - it'll happen for a reason :::
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:26 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz