🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.os2.programmer
3 messages
3 total messages Started by Jim Howe Wed, 01 May 1991 20:26
Group Handles from .INI Files
#2592
Author: Jim Howe
Date: Wed, 01 May 1991 20:26
14 lines
1147 bytes
I've just started exploring the profile capabilities of OS/2 PM
and I have a question that I hope someone can answer.  Several
of the Prf... calls take a group handle as a parameter.  However,
the only way I can find to get a group handle is to create a
new group.  Is there a way to get the handle to an existing group?


James W. Howe			   internet: jwh@citi.umich.edu
University of Michigan             uucp:     uunet!mailrus!citi.umich.edu!jwh
Ann Arbor, MI   48103-4943         

James W. Howe			   internet: jwh@citi.umich.edu
University of Michigan             uucp:     uunet!mailrus!citi.umich.edu!jwh
Ann Arbor, MI   48103-4943         
Re: Group Handles from .INI Files
#2610
Author: mikem
Date: Tue, 07 May 1991 20:29
45 lines
3522 bytes
In article <1991May1.202601.1272@terminator.cc.umich.edu> jwh@bodwin.ifs.umich.edu (Jim Howe) writes:
>I've just started exploring the profile capabilities of OS/2 PM
>and I have a question that I hope someone can answer.  Several
>of the Prf... calls take a group handle as a parameter.  However,
>the only way I can find to get a group handle is to create a
>new group.  Is there a way to get the handle to an existing group?
>

The API isn't very straigt forward..but here is what I use in a routine
to locate a group handle. This code fragment enumerates all groups in the
desktop manager then goes on to get the titles.

len = PrfQueryProgramTitles(hini1, SGH_ROOT, (PPROGTITLE)NULL, 0, (PULONG)   
   &count);                                                                  
if (!len)                                                                    
  {                                                                          
  fprintf(stderr, "FindGroup: PrfQueryProgramTitles() returned 0\n");        
  return  NULL;                                                              
  }                                                                          
                                                                             
if (DosAllocSeg((USHORT)len+10, &sel1, SEG_GETTABLE))                        
  {                                                                          
  fprintf(stderr, "FindGroup: DosAllocSeg() failed!\n");                     
  return  NULL;                                                              
  }                                                                          
                                                                             
titleptr = (PROGTITLE *)MAKEP(sel1, 0);                                      
PrfQueryProgramTitles(hini1, SGH_ROOT, titleptr, len+9, &count);             
group = NULL;                                                                
for (x = 0; x < (USHORT)count; x++)                                          
  {                                                                          
  pgroup = PrfCreateGroup(hini1, (PVOID)titleptr[x].pszTitle, SHE_VISIBLE|   
     SHE_PROTECTED);                                                         
  if (!pgroup)                                                               
    continue;                                                                
  count1 = 0;                                                                
  len = PrfQueryProgramTitles(hini1, pgroup, pptitle, 0, &count1);           
  if (len <= 0)                      // no programs in the group             
.... and so on..
See MS V4 pg 264 for details.

Hope this helps you out.
Michael R. MacFaden    IBM Palo Alto     Marketing Systems
mikem@ibmpa.awdpa.ibm.com, macfaden@paloic1.vnet.ibm.com 
disclaimer:  what I write above is not necessarily my employer's opinion 
PM changes from OS/2 Version 1.2 to 1.3
#2612
Author: Bart Pricola (588-0659)
Date: Wed, 08 May 1991 11:49
13 lines
972 bytes
Some co-workers of mine have written a PM application which worked
fine under OS/2 Version 1.2.  It does not work under version 1.3.

The problem is this: Not all the appropriate menu items appear in the
menu line at the top of the window and thus functionality is lost somewhere.

Is this common or a known problem?  They are investigating it and I thought
maybe I could get some answers here.

Thanks for any help.

-- 
Bart Pricola	bap@ssd.kodak.com	((716) 588-0443)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads