AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Wo ist oder wie heißt die Funktion: SHMessageBoxCheck?
Thema durchsuchen
Ansicht
Themen-Optionen

Wo ist oder wie heißt die Funktion: SHMessageBoxCheck?

Ein Thema von Luckie · begonnen am 2. Mai 2005 · letzter Beitrag vom 3. Jun 2005
Antwort Antwort
Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#1

Re: Wo ist oder wie heißt die Funktion: SHMessageBoxCheck?

  Alt 2. Mai 2005, 05:40
Zitat:
C:\WINDOWS\system32>dumpbin /exports shlwapi.dll | find "SHMessageBoxCheck"
185 00057865 [NONAME] _SHMessageBoxCheckA@24
191 000577DB [NONAME] _SHMessageBoxCheckW@24
291 000579FA [NONAME] _SHMessageBoxCheckExA@28
292 0005797B [NONAME] _SHMessageBoxCheckExW@28

The SHMessageBoxCheck family of functions are apparently exported only
by ordinal.
Also: @SHMessageboxCheck := GetProcAddress(hLib, PChar(185));

Hier noch ein C Fragement:

Code:
+ * @ [SHLWAPI.185]
+ *
+ * Pop up a 'Don't show this message again' dialogue box.
+ *
+ * PARAMS
+ *  hWnd     [I] Window to be the dialogues' parent
+ *  lpszText [I] Text of the message to show
+ *  lpszTitle [I] Title of the dialogue box
+ *  dwType   [I] Type of dialogue buttons (See below)
+ *  iRet     [I] Value to return if dialogue is not shown
+ *  lpszId   [I] Name of registry subkey which determines whether to show the dialog
+ *
+ * RETURNS
+ *  Success: The value returned from the dialogue procedure (e.g. IDOK).
+ *  Failure: iRet, if the default dialogue resource could not be loaded or the
+ *           dialogue should not be shown.
+ *
+ * NOTES
+ *  - Both lpszTitle and lpszId must be less than MAX_PATH in length.
+ *  - Possible values for dwType are:
+ *| Value    Buttons
+ *| -----     -------
+ *|   0       OK
+ *|   1       OK/Cancel
+ *|   2       Yes/No
+ */
+INT_PTR WINAPI SHMessageBoxCheckA(HWND hWnd, LPCSTR lpszText, LPCSTR lpszTitle,
+                                  DWORD dwType, INT_PTR iRet, LPCSTR lpszId)
+{
+  WCHAR szTitleBuff[MAX_PATH], szIdBuff[MAX_PATH];
+  WCHAR *szTextBuff = NULL;
+  int iLen;
+  INT_PTR iRetVal;
+
+  if (lpszTitle)
+    MultiByteToWideChar(CP_ACP, 0, lpszTitle, -1, szTitleBuff, MAX_PATH);
+
+  if (lpszText)
+  {
+    iLen = MultiByteToWideChar(CP_ACP, 0, lpszText, -1, NULL, 0);
+    szTextBuff = HeapAlloc(GetProcessHeap(), 0, iLen * sizeof(WCHAR));
+    MultiByteToWideChar(CP_ACP, 0, lpszText, -1, szTextBuff, iLen);
+  }
+
+  MultiByteToWideChar(CP_ACP, 0, lpszId, -1, szIdBuff, MAX_PATH);
+
+  iRetVal = SHMessageBoxCheckW(hWnd, szTextBuff, lpszTitle ? szTitleBuff : NULL,
+                               dwType, iRet, szIdBuff);
+  if (szTextBuff)
+    HeapFree(GetProcessHeap(), 0, szTextBuff);
+  return iRetVal;
+}
+
Thomas
  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 03:15 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