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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. the drag of listview column don't work

the drag of listview column don't work

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
2 Posts 2 Posters 1 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.
  • P Offline
    P Offline
    ProCodix
    wrote on last edited by
    #1

    hello, I'm a begginer with win32 api, and i try to make a SysListview32 (aka WC_listview) with draggable columns to modify it order with the mouse. To do this, i create it with the LVS_EX_HEADERDRAGDROP etended style, like this : ListView = CreateWindowEx( LVS_EX_HEADERDRAGDROP, WC_LISTVIEW, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | LVS_REPORT, 0, 0, RectParent.right, RectParent.bottom, hwnd, NULL, hInstance, NULL ); The listview appears correctly with columns and items, but don't work when i try to move a column with mouse. Do i forget something ??? Thank you in advance !!

    _ 1 Reply Last reply
    0
    • P ProCodix

      hello, I'm a begginer with win32 api, and i try to make a SysListview32 (aka WC_listview) with draggable columns to modify it order with the mouse. To do this, i create it with the LVS_EX_HEADERDRAGDROP etended style, like this : ListView = CreateWindowEx( LVS_EX_HEADERDRAGDROP, WC_LISTVIEW, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | LVS_REPORT, 0, 0, RectParent.right, RectParent.bottom, hwnd, NULL, hInstance, NULL ); The listview appears correctly with columns and items, but don't work when i try to move a column with mouse. Do i forget something ??? Thank you in advance !!

      _ Offline
      _ Offline
      _Flaviu
      wrote on last edited by
      #2

      LVS_EX_HEADERDRAGDROP is a extended style, that is why should be setup not there, but using SetExtendedStyle method:

      ListCtrl.SetExtendedStyle(LVS_EX_HEADERDRAGDROP);

      I don't know Win32, but I am sure there is SetExtendedStyle Win32 function ...

      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