![]() |
SHAutoComplete in CXTPControlCombox |
Post Reply
|
| Author | |
blueseaing
Groupie
Joined: 14 June 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Topic: SHAutoComplete in CXTPControlComboxPosted: 02 November 2004 at 11:15pm |
|
Please help me! I use the ::SHAutoComplete in the CMainFrame::OnCreateControl to a CXTPControlCombox, but it failed ,and the ::SHAutoComplete return not S_OK, how can i solve the problem?Does the CXTPControlCombox not support the ::SHAutoComplete? Thanks a lot. int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl) //use ::SHAutoComplete return TRUE;
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 November 2004 at 3:49am |
|
after you call CreateObject() edit of Combo Box is NULL, so pEdit == NULL (see debugger). you need to create custom combo:
class CComboBoxURL : public CXTPControlComboBox IMPLEMENT_XTP_CONTROL(CComboBoxURL, CXTPControlComboBox) void CComboBoxURL::SetRect(CRect rcControl) CXTPControlComboBox::SetRect(rcControl); if (!bCreated && m_pEdit && m_pEdit->GetSafeHwnd()) }
oh.. as i see you already use CControlComboBoxAddress. so add SetRect method. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
blueseaing
Groupie
Joined: 14 June 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 November 2004 at 3:02am |
|
Tanks a lot to oleg for your help, and I will trouble you again. I used your method and the SHAutoComplete will work but I find two problems again , that's 1 when I try to drag the autocomplete hook window and the hook window will disappear and only remain the white rectangle , the rectanage can zoom , after release the mouse ,all disappear. 2 when the autocomplete list appear the mouse wheel can't use but the common windows combox can use. I change the customtheme example and I post the source code. and I replace the find combox. Thanks. 2004-11-04_030207_CustomThemes.rar Edited by blueseaing |
|
![]() |
|
blueseaing
Groupie
Joined: 14 June 2004 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 November 2004 at 12:39am |
|
wait for oleg help. thanks. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |