[Q] Context explorer menu - GetCommandString()
From: Donovan J. Edye (donovan_at_nospam.edye.wattle.id.au)
Date: 10/30/03
- Next message: Michael Fritz: "Re: TAction and ShortCut "Del""
- Previous message: Jeremy Collins: "Re: Does this already exist ? TAction with Mouse-Cursor support."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Oct 2003 01:11:47 -0700
G'Day,
All the examples I have seen the use StrCopy() to place the information for explorers
status bar into pszName. However the following code just makes blocks (grabage) appear
in my status bar. Howerver if I do say pszName[0] := 'F', pszName[1] := 'i' etc. with
a null terminator on the end then explorer displays the text supplied.
So what am I missing here about StrCopy?
TIA
function TFileAssistant.GetCommandString(idCmd, uType: UINT; pwReserved: PUINT;
pszName: LPSTR; cchMax: UINT): HRESULT;
////////////////////////////////////////////////////////////////////////////////
// PURPOSE: This method is invoked to display the string information in
// the status bar at the bottom of explorer
// HISTORY:
// DJE 25/10/2003 # Initial Creation
begin
//Return success
result := S_OK;
//Ensure we are doing help context
if (uType and GCS_HELPTEXT) <> 0 then
begin
case idCmd - FMenuIndexOffset of
0: StrCopy(pszName, PChar('File Assistant'));
else
result := E_INVALIDARG;
end;
end;
end;
-- -- Donovan J. Edye ---------------------------------------------------------------------- SetiStats - Get your SETI statistics delivered to your mailbox daily. http://www.edye.wattle.id.au/p.php?page=/delphi/setistats ----------------------------------------------------------------------
- Next message: Michael Fritz: "Re: TAction and ShortCut "Del""
- Previous message: Jeremy Collins: "Re: Does this already exist ? TAction with Mouse-Cursor support."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|