Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. ActiveX event delay

ActiveX event delay

Scheduled Pinned Locked Moved ATL / WTL / STL
c++comhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dimitris Vasiliadis
    wrote on last edited by
    #1

    I am creating an activex treeview control (ATL, VC++ 6, Win2000) to use it from an MSAccess form. I bind the control value to a field (RegionID, integer) in the form, and also bind a combo box in the same field. When I click some node on my activex control I fire an xxx_Updated event, and expect to see the combo box value change, but nothing happens, until my activex control loses the focus. Is this the normal behaviour or am I doing something wrong, because I was expecting the other controls on the form that are bound on the same field like my activex control to be updated immediately when I fire the _Updated event, and not wait until my control loses the focus. Thanks in advance for any help. The code I use to fire the event is shown below. LRESULT CTreeView::onclick(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) {     if (FireOnRequestEdit(DISPID_VALUE) == S_FALSE)     {         bHandled = FALSE;         return 0;     }     UNUSED_ALWAYS(wParam);     UNUSED_ALWAYS(uMsg);      POINT pt;     TVHITTESTINFO hti;      POINTSTOPOINT(pt, lParam);     hti.pt = pt;     HTREEITEM hItem = TreeView_HitTest(m_ctlSysCtrl.m_hWnd, &hti);     if (hti.flags & (TVHT_ONITEMICON | TVHT_ONITEMLABEL))     {         TV_ITEM tvi = {0};         tvi.hItem = hItem;         tvi.mask |= TVIF_PARAM;         TreeView_GetItem(m_ctlSysCtrl.m_hWnd, &tvi);         put_Value(tvi.lParam);         FireOnChanged(DISPID_VALUE);         FireViewChange();         SendOnDataChange(NULL);         bHandled = TRUE;     }     else         bHandled = FALSE;     return 0; }


    ...Plug & Pray... X|

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups