Click here for NewsObjects Overview
GetProfilePriority Method (Headline Control)
Windows - Visual C++


Description
The GetProfilePriority method returns the priority level for the specified profile.

Syntax
short priority = GetProfilePriority(LPCTSTR profileCode);

The GetProfilePriority syntax has these parts:

 Part

Description

profileCode

A String containing a two-letter code representing the profile.

priority

Return value. A short integer that contains the priority level for the specified profile. -1 is returned if the priority has no foreground or background color.

Remarks:
The profile priority is related to the group of headline methods that gets and sets background and foreground colors for specific profiles. If a headline is associated with profiles that have conflicting colors assigned to them, the profile priority indicates which one receives priority and therefore which color is used.

Priorities can only be assigned to those profiles that have a forecolor and/or backcolor associated with them. If priorities are not explicitly assigned using SetProfilePriority, then the default is the order that the colors were assigned using SetProfileForeColor and/or SetProfileBackColor. An attempt to assign a priority to a profile with no associated forecolor or backcolor is ignored. 

The profile priority can be thought of as the position of a particular profile in a list of all profiles which have foreground and/or background colors assigned to them. 1 is the highest priority value.

For example, if you have four profiles:

Profile code

Priority

AB

1

CD

2

EF

3

GH

4

And you call SetProfilePriority for EF to 1. The new order is as follows:

Profile code

Priority

EF

1

AB

2

CD

3

GH

4

If you call SetProfilePriority for a new profile (IJ) to 9, it will actually become priority 5 because there are only four profiles in the list. 

See Also: GetProfileBackColor GetProfileForeColor SetProfileBackColor SetProfileForeColor SetProfilePriority

Back to: Headline Methods