AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi MessageBoxIndirect eigenes Symbol
Thema durchsuchen
Ansicht
Themen-Optionen

MessageBoxIndirect eigenes Symbol

Offene Frage von "Colt Storm"
Ein Thema von Colt Storm · begonnen am 29. Aug 2006 · letzter Beitrag vom 29. Aug 2006
Antwort Antwort
Benutzerbild von Zacherl
Zacherl

Registriert seit: 3. Sep 2004
4.629 Beiträge
 
Delphi 10.2 Tokyo Starter
 
#1

Re: MessageBoxIndirect eigenes Symbol

  Alt 29. Aug 2006, 20:04
Wenn du dein Icon über einen Index einbindest (Mainicon ist meine ich 1), dann kannst du das verwenden:
Delphi-Quellcode:
function MyMessageBox(hWnd: HWND; Text, Caption: String; IconID: DWORD;
  const Buttons: Cardinal = MB_OK): Integer;
var MsgInfo: TMsgBoxParams;
begin
  With MsgInfo do
  begin
    cbSize := SizeOf(TMsgBoxParams);
    dwContextHelpId := 0;
    dwLanguageId := LANG_NEUTRAL;
    dwStyle := Buttons or MB_USERICON or MB_APPLMODAL;
    hInstance := GetWindowLong(hWnd, GWL_HINSTANCE);
    hwndOwner := hWnd;
    lpfnMsgBoxCallback := nil;
    lpszCaption := @Caption[1];
    lpszIcon := MAKEINTRESOURCE(IconID);
    lpszText := @Text[1];
  end;
  Result := Integer(MessageBoxIndirect(MsgInfo));
end;
Florian
Projekte:
- GitHub (Profil, zyantific)
- zYan Disassembler Engine ( Zydis Online, Zydis GitHub)
  Mit Zitat antworten Zitat
Antwort Antwort


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 05:23 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