Board index » delphi » HELP ME PLEASE - Creating program groups and items

HELP ME PLEASE - Creating program groups and items

Can any of you guru's out there help a confused beginner. I need to
create a program group and item within it. I know I need to use DDE to
talk to progman but I am not having any joy.

A PINT DOWN MY LOCAL TO THE FIRST PERSON TO HELP ME.

Cheers in advance.

Richard

 

Re:HELP ME PLEASE - Creating program groups and items


Quote
rich...@ram1.demon.co.uk (Richard Morris) wrote:
>Can any of you guru's out there help a confused beginner. I need to
>create a program group and item within it. I know I need to use DDE to
>talk to progman but I am not having any joy.
>A PINT DOWN MY LOCAL TO THE FIRST PERSON TO HELP ME.
>Cheers in advance.
>Richard

Attached to this you will a file, PM.PAS.  It is a unit for accessing
the Program Manager's DDE functions.. I found it in the Delphi
Developer's Guide, and it's worked great for me..  Hope it helps...

Example of using this unit:

uses PM;

  Try
     TProgMan.Create(Self);
     TProgMan.CreateGroup('FOO');
     TProgMan.AddItem('d:\delphi\readme.txt', 'delphi');
     TProgMan.DeleteItem('delphi');
     TProgMan.DeleteGroup('FOO');
  Finally
     TProgMan.free;
  End;

David Sim
simda...@ix.netcom.com

Re:HELP ME PLEASE - Creating program groups and items


begin 644 pm.pas
<uuencoded_portion_removed>
H("`@("`@("`@("`@>R!C;&5A;B!U<"!]#0IE;F0[#0H-"F5N9"X-"@``
`
end

Re:HELP ME PLEASE - Creating program groups and items


Quote
rich...@ram1.demon.co.uk (Richard Morris) wrote:
>Can any of you guru's out there help a confused beginner. I need to
>create a program group and item within it. I know I need to use DDE to
>talk to progman but I am not having any joy.
>A PINT DOWN MY LOCAL TO THE FIRST PERSON TO HELP ME.
>Cheers in advance.
>Richard

Make sure you have a DDEClientConv Object(PROGMAN,PROGMAN) then --

procedure AddToProgMan;
var
  DDEString:array[0..255]of char;
begin
  MessageDlg('The program has been installed successfully.'+#013+
             'Setup will now create an icon in Windows for you.',
             mtInformation, [mbOK], 0);
  StrPCopy(DDEString,'[CreateGroup(MyGroup)]');
  DdeClientConv1.ExecuteMacro(DDEString,True);
  while DdeClientConv1.WaitStat do application.ProcessMessages;
  StrPCopy(DDEString,'[AddItem(C:\MySubDir\MyProg.EXE'+
             #44+'MyDescription'+#44+',,)]');
  DdeClientConv1.ExecuteMacro(DDEString,True);
  while DdeClientConv1.WaitStat do application.ProcessMessages;
  StrPCopy(DDEString,'[ShowGroup(MyGroup,1)]');
  DdeClientConv1.ExecuteMacro(DDEString,True);
  while DdeClientConv1.WaitStat do application.ProcessMessages;
end;

Other Threads