"Button-bar" like in the CE-Addressbook
-
Hi, how is that "Button-bar" (#ab|cde|...|xyz) at the top of the CE-addressbook programmed? That would interest me, because it's fine for scrolling in a listbox. Greetings, Frank _____ easySMS for pocket PC _____ www.Siedler-Net.de/WinCE/easySMS/
-
Hi, how is that "Button-bar" (#ab|cde|...|xyz) at the top of the CE-addressbook programmed? That would interest me, because it's fine for scrolling in a listbox. Greetings, Frank _____ easySMS for pocket PC _____ www.Siedler-Net.de/WinCE/easySMS/
Check my article on that issue. It's a simple approach to that problem. Hope you find it useful. http://www.codeproject.com/useritems/CLetterStrip.asp[^] Cheers.
-
Check my article on that issue. It's a simple approach to that problem. Hope you find it useful. http://www.codeproject.com/useritems/CLetterStrip.asp[^] Cheers.
Yep, that looks good!! But how can i run that codesample with my Embedded Visual C++ ? Therefor a Project is needed!? Greetings, Frank _____ easySMS for pocket PC _____ www.Siedler-Net.de/WinCE/easySMS/
-
Yep, that looks good!! But how can i run that codesample with my Embedded Visual C++ ? Therefor a Project is needed!? Greetings, Frank _____ easySMS for pocket PC _____ www.Siedler-Net.de/WinCE/easySMS/
Right. Do this: In your CChildWnd, declare the following:
protected:
CLetterStrip m_wndStrip;In the
OnCreate
handler, create the window. To place it on the top, just like the image on the article, use the following:DWORD dwStyle = WS_CHILD | WS_VISIBLE;
m_wndStrip.Create(dwStyle, CPoint(0, 0), this, ID_LETTERSTRIP);To handle the letter commands, use the following message map:
BEGIN_MESSAGE_MAP(CChildView, CWnd))
//{{AFX_MSG_MAP(CWordList)
...
ON_COMMAND(ID_LETTERSTRIP, OnLetterStrip)
...
//}}AFX_MSG_MAP
END_MESSAGE_MAP()In the
OnLetterStrip
method, usem_wndStrip.GetOption()
to retrieve the selected letter. Note that the letter strip is created as a child window, not as a toolbar.