Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - OutlookBar item selection...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

OutlookBar item selection...

 Post Reply Post Reply
Author
Message
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Topic: OutlookBar item selection...
    Posted: 28 April 2008 at 10:48pm

How can I change the current selected item of OutlookBar without user intervention?

 
I use this code, but it does not change the selection focus
 

m_wndOutlookBar.GetAt(6)->SetExpanded(TRUE); // open the folder

m_wndOutlookBar.PostMessage( OBN_XT_ITEMCLICK, CMD_ITEM2 ); // simulate mouse click 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 12:40am
Hi,
OutlookBar is very obsolete control. Use CXTPTaskPanel instead.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 8:47am
I used the code from the latest sample from version 11.2.2 
 

CXTPOfficeBorder<CXTPTaskPanel> m_wndOutlookBar;

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 8:54am
oh ok.
 
try this
m_wndOutlookBar.SetFocusedItem(m_wndOutlookBar.GetAt(6));
 
 
 OBN_XT_ITEMCLICK is message of CXTOutBarCtrl - not CXTPTaskPanel.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 9:17am
Hi,
  No, it does nothing.
  the item is not highlighted. And I think your code sets the focus to folder 6, I need to set the selection to an item not to folder.
 
 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 2:34pm
to item:
 
m_wndOutlookBar.SetFocusedItem(m_wndOutlookBar.GetAt(6)->GetAt(0));
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
evoX View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 July 2007
Status: Offline
Points: 207
Post Options Post Options   Thanks (0) Thanks(0)   Quote evoX Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 7:26pm
thanks, now it works
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.048 seconds.