rich edit control

rich edit control

Post by dim » Wed, 20 Nov 2002 17:50:43



hi,
I read in the MSDN library that winCE does not support CRichEditCtrl.
is there another way to implement rich text formatting in a dialog
based application? How can I do that?
thx
 
 
 

rich edit control

Post by Andrew Chuan » Tue, 26 Nov 2002 11:47:02


Hi,

I want to get the hotkey default setting on WinCE/PPC2002 but
can not find any document about this function. I don't know how
to implement this function. Any clue or suggestion would be highly
appreciated.

Thanks,
Andrew Chuang

 
 
 

rich edit control

Post by Bj?r » Wed, 27 Nov 2002 18:35:43


You could use something like:

HANDLE m_hCoreDll = LoadLibrary(_T("coredll.dll"));
        if(m_hCoreDll)
                m_procUnregisterFunc = (UnregisterFunc1Proc)GetProcAddress(m_hCoreDll,
_T("UnregisterFunc1"));

HANDLE m_hAygShell = LoadLibrary(_T("aygshell.dll"));
if(m_hAygShell)
   m_procShGetAppKeyAssocProc =
(SHGETAPPKEYASSOCPROC)GetProcAddress(m_hAygShell, _T("SHGetAppKeyAssoc"));

   if(bRegister)
   {
          ASSERT(m_procUnregisterFunc);
          BOOL bResult1 = m_procUnregisterFunc(MOD_WIN, iKey);
          BOOL bResult2 = ::RegisterHotKey(hWnd, iKey, MOD_WIN, iKey);

     return bResult2 && bResult1;
   }
   else
   {
     TCHAR szAppName[255];
     BYTE byteButton;

     m_procUnregisterFunc(MOD_WIN, iKey);

     if(byteButton = m_procShGetAppKeyAssocProc(szAppName))
       ::RegisterHotKey(hWnd, iKey, MOD_WIN, byteButton);

     return true;
   }

if(m_hAygShell)
   ::FreeLibrary(m_hAygShell);
if(m_hAygShell)
   ::FreeLibrary(m_hAygShell);

The key code are:
   KEY_APP1  193 0xC1
   KEY_APP2  194 0xC2
   KEY_APP3  195 0xC3
   KEY_APP4  196 0xC4
   KEY_APP5  197 0xC5
   KEY_ACTION  134 0x86
   KEY_SCRUP 38  0x26
   KEY_SCRDOWN 40  0x27

In your WindowProc you need something like:
   case WM_ACTIVATE:
     {
       // +++ handle system-keys +++
       if(LOWORD(wParam) == WA_INACTIVE)
         ; // Restore the old settings
       else
         ; // Set own settings
     }
     break;
   case WM_KEYUP:
     {
       switch(wParam)
       {
       case 0xC1: key = KEY_APP1; break;
       case 0xC2: key = KEY_APP2; break;
       case 0xC3: key = KEY_APP3; break;
       case 0xC4: key = KEY_APP4; break;
       case 0xC5: key = KEY_APP5; break;
       case 0x86: key = KEY_ACTION; break;
       case 0x26: key = KEY_SCRUP; break;
       case 0x27: key = KEY_SCRDOWN; break;
       default: return KEY_NONE;
       }
     }
     break;

This Code is accourding to "The Windows CE Technology Tutorial" by Chris
Muench an is working on a PPT2800.

regards,
   Bj?rn.


> Hi,

> I want to get the hotkey default setting on WinCE/PPC2002 but
> can not find any document about this function. I don't know how
> to implement this function. Any clue or suggestion would be highly
> appreciated.

> Thanks,
> Andrew Chuang

 
 
 

1. need rich edit control for wince to use with EVC

Hi all,
I need a rich edit control for pocket pc (that supports text font and color)
does anyone have any idea if such a control exists?
I know that WinCe does not support CRichEditCtrl, isn't there a substitute?
maybe some activeX control such as Win32's rich textbox.
thanks

2. Multiple LAN Cards and NT Server

3. Rich Edit Control

4. Restore--RAID

5. Rich edit control problem: bitmap font shows twice as wide as it should

6. Newbie question. Embedded Visual C++ toolkits.

7. coloring text in a rich edit control

8. Numlock Off when WinMe Boots

9. How to popup the shortcut menu in a rich edit control?

10. need rich edit control for wince to use with EVC

11. Rich edit control problem (Focus not changing with tab)

12. rich edit controls and bitmaps

13. Rich edit control 2.0 ?