home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 21 / IOPROG_21.ISO / SOFT / DDESUP.ZIP / DDEINF3.TXT < prev    next >
Encoding:
Text File  |  1995-05-19  |  2.3 KB  |  65 lines

  1.                              
  2. Knowledge Base+
  3.  
  4. Title: INF: Using ReplaceItem() Command in Program Manager DDE 
  5. Document Number: Q102590           Publ Date: 19-SEP-1994 
  6. Product Name: Microsoft Windows Software Development Kit 
  7. Product Version: 3.10 
  8. Operating System: WINDOWS 
  9.  
  10.   
  11.  -------------------------------------------------------------------- 
  12.  The information in this article applies to: 
  13.   
  14.   - Microsoft Windows Software Development Kit (SDK) version 3.1 
  15.  -------------------------------------------------------------------- 
  16.   
  17.  SUMMARY 
  18.  ======= 
  19.   
  20.  Program Manager has a dynamic-data exchange (DDE) command-string 
  21.  interface that allows other applications to manipulate its group 
  22.  windows. Windows version 3.1 has a new command called ReplaceItem(), 
  23.  which instructs Program Manager to delete an item and replace it with 
  24.  a new item when Program Manager receives a subsequent AddItem() 
  25.  command. 
  26.   
  27.  MORE INFORMATION 
  28.  ================ 
  29.   
  30.  The syntax for the ReplaceItem() command is 
  31.   
  32.     ReplaceItem(ItemName) 
  33.   
  34.  where ItemName is the name of the item that is to be replaced. 
  35.   
  36.  The ReplaceItem() command instructs Program Manager to delete the 
  37.  given ItemName and record the position of the deleted item. The next 
  38.  time Program Manager receives an AddItem() command, it adds the new 
  39.  item to this previously recorded position, effectively replacing the 
  40.  deleted item with the new one. 
  41.   
  42.  For example, Program Manager has a group called "MAIN" with an item 
  43.  called "TEST". To replace the item TEST with a new item "NEW", the 
  44.  following commands must be executed: 
  45.   
  46.     ShowGroup ("MAIN", 1);    //Activate the group first. 
  47.     ReplaceItem ("TEST"); 
  48.     AddItem ("NEW"); 
  49.   
  50.  The position of the newly added item will be the same as the deleted 
  51.  item (TEST) regardless of what parameters are passed in the AddItem() 
  52.  command. Given that the position (xpos, ypos) of item TEST was (10, 
  53.  10) in the group MAIN before it was replaced by item NEW, specifying a
  54.  new (xPos, yPos) position for NEW in the AddItem() command has no 
  55.  effect. Program Manager adds the NEW item at the recorded position 
  56.  (10, 10) in MAIN. 
  57.   
  58.  Additional reference words: 3.10 
  59.  KBCategory: Prg 
  60.  KBSubcategory: UsrDde 
  61.  
  62. COPYRIGHT Microsoft Corporation, 1994. 
  63.  
  64.  
  65.