|   CIMEShare 
     
      This provides a global interface. 
      This interface allows clients to receive 
      common display attributes for MS-IME so that an application can have same look as other 
      IMEShare client applications. 
      
        
          Interface id  | 
          N/A (Using DLL 
          exported class factory)  | 
         
        
          Version  | 
          1.0  | 
         
       
     
    
        
       
        
     
    Value Definitions  
    IME States 
     
      Possible values are...  
        - IMESATTR_INPUT
  
        - IMESATTR_TARGET_CONVERTED
  
        - IMESATTR_CONVERTED
  
        - IMESATTR_TARGET_NOTCONVERTED
  
        - IMESATTR_INPUT_ERROR
  
        - IMESATTR_FIXEDCONVERTED
  
        
      
    Underline styles  
     
      Possible values are...  
      
     
       
        - IMESTY_UL_NONE
  
        - IMESTY_UL_SINGLE
  
        - IMESTY_UL_DOTTED
  
        - IMESTY_UL_THICK
  
        - IMESTY_UL_THICKDITHLOWER
  
        - IMESTY_UL_DITHLOWER
  
        
      
    Idsty tokens  
    and corresponding values  
     
       
        | Token |  
        Value type |  
        Comment |  
        
       
        | IdstyIMEShareFBold |  
        BOOL |  
        TRUE if it has bold style. |  
        
       
        | IdstyIMEShareFItalic |  
        BOOL |  
        TRUE if it has italic style. |  
        
       
        | IdstyIMEShareFUl |  
        BOOL |  
        TRUE if it has underline. |  
        
       
        | IdstyIMEShareUKul |  
        UINT |  
        Kind of underline. Will be ignored when IdstyIMEShareFUl  
        is FALSE. |  
        
       
        | IdstyIMEShareFWinCol* |  
        BOOL |  
        TRUE if color for text is in Windows color  
        definition. |  
        
       
        | IdstyIMEShareFFundCol* |  
        BOOL |  
        TRUE if color is in fundamental color  
        definition. |  
        
       
        | IdstyIMEShareFRGBCol* |  
        BOOL |  
        TRUE if color is in RGB color definition. |  
        
       
        | IdstyIMEShareFSpecCol* |  
        BOOL |  
        TRUE if color is in special color definition. |  
        
       
        | IdstyIMEShareRGBCol* |  
        COLORREF |  
        Current color setting in RGB |  
        
      
    * needs to specify subproperty ID (one of following)  
     
       
        | Subproperty ID |  
        Description |  
        
       
        | IdstyIMEShareSubText |  
        Color for text. |  
        
       
        | IdstyIMEShareSubBack |  
        Color for background. |  
        
       
        | IdstyIMEShareSubUl |  
        Color for underline. |  
        
      
    Creating CIMEShare  
    Instance  
     
    C IMEShare  
    * WINAPI PIMEShareCreate(void);  
     
     
      Return Values:  
      
     
       
         
          | CIMEShare * |  
          Pointer to CIMEShare interface |  
          
        
        
      
    General functions  
    BOOL CIMEShare::FDeleteIMEShare(void);  
     
      This releases CIMEShare interface.   
      Return Values:  
       
         
          | BOOL |  
          TRUE when succeeded. |  
          
        
        
      
    void CIMEShare::CustomizeIMEShare(void);  
     
      This opens control panel with which user can customize IME attributes.  
      
    Getting style  
    attributes  
    BOOL  
    CIMEShare::FSupportSty(UINT sty, UINT styAltered);  
     
      This defines style substitution. If your application doesn't have capability to  
      draw sty attributes but styAltered, you may force IMEShare to return styAltered  
      style whenever sty style is originally stated.  
      Note:  
      Only underlines are the subject to the substitution.  
      Parameters:  
       
         
          | UINT sty |  
          (IN) Style that will be substituted. One of IMESTY_UL_*. |  
          
         
          | UINT styAltered |  
          (IN) Style override with. One of IMESTY_UL_*. |  
          
        
        
      Return Values:  
       
         
          | BOOL |  
          TRUE when succeeded. |  
          
        
        
      
    DWORD CIMEShare::DwGetIMEStyle(const  
    UINT attr, const UINT idsty);  
     
      This retrieves various style setting given as idsty for given attr.  
      Parameters:  
       
         
          | UINT attr |  
          (IN) One of IMESATTR_*. |  
          
         
          | UINT idsty |  
          (IN) Style idsty token(IdstyIMEShare*)  
          which requests corresponding attributes. |  
          
        
        
      Return Values:  
       
         
          | DWORD |  
          Value for requested attributes. Cast may be required. |  
          
        
        
      
    LID management  
    IMEShare uses LID to store attribute settings for each language separetely.  
    IMEShare can get default LID by itself, but client can change it.  
    LID  
    CIMEShare::LidSetLid(LID lid);   
     
      This sets current LID.  
      Parameters:  
       
      Return Values:  
       
      
    LID  
    CIMEShare::LidGetLid(void);  
     
      This gets current LID.  
      Return Values:  
       
      
    Special functions  
    for control panel   
    These methods are provided only for use by control panel for IME. Ordinary  
    client should not use them.  
    DWORD  
    CIMEShare::DwGetIMEStyleCpl(const UINT attr, const UINT idsty);  
     
      Basically does the same thing with  
      DwGetIMEStyle. Only the difference is this doesn't go through the underline substitution.  
      Parameters:  
       
         
          | UINT attr |  
          (IN) One of IMESATTR_*. |  
          
         
          | UINT idsty |  
          (IN) Style idsty token(IdstyIMEShare*)  
          which requests corresponding attributes. |  
          
        
        
      Return Values:  
       
         
          | DWORD |  
          Value for requested attributes. Cast may be required. |  
          
        
        
      
    BOOL  
    CIMEShare::FSetIMEStyleCpl(const UINT attr, const UINT idsty,  
    DWORD dwval);   
     
      This changes the style setting.  
      Parameters:  
       
         
          | UINT attr |  
          (IN) One of IMESATTR_*. |  
          
         
          | UINT idsty |  
          (IN) Style idsty token(IdstyIMEShare*)  
          which indicates corresponding attributes. |  
          
         
          | DWORD dwval |  
          (IN) Value to be set. |  
          
        
      Return Values:  
       
         
          | BOOL |  
          TRUE when succeeded. |  
          
        
      
    BOOL  
    CIMEShare::FSaveIMEShareCpl(void);   
     
      This saves the style settings to registry.  
      Return Values:  
       
         
          | BOOL |  
          TRUE when succeeded. |  
          
        
      
     |