[Q] Context explorer menu - GetCommandString()

From: Donovan J. Edye (donovan_at_nospam.edye.wattle.id.au)
Date: 10/30/03


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
---------------------------------------------------------------------- 


Relevant Pages

  • Re: Remove or Disable Search Bar In Internet Explorer
    ... > under the Explorer bar so that solved one problem. ... > registry like suggested. ... This disables F3 for searching, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Remove or Disable Search Bar In Internet Explorer
    ... under the Explorer bar so that solved one problem. ... registry like suggested. ... This disables F3 for searching, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Remove or Disable Search Bar In Internet Explorer
    ... Hi again Brent. ... suggesting to delete the Explorer Bar CLSID from the HKLM key for explorer ... This suggests the registry value to flip is ... Turns the F3 command and the Search bar. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Issues with "My Current Theme"
    ... > User have sometimes reported that menu buttons in programs other than Explorer (notepad, ... So if you menus look bad, and UserPreferencesMask looks like this: ... I select "My Current Theme" as the option, the menu bar items appear as 3D when selected. ...
    (microsoft.public.windowsxp.general)
  • Re: missing address bar in internet exploer toolbar
    ... Restore/Repair Toolbars in IE and/or Windows Explorer ... Microsoft-MVP Windows® XP ... 2004 Windows MVP "Winny" Award ... > i am missing an address bar on internet explorer tool bar and also one on ...
    (microsoft.public.windowsxp.general)