Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

subclassing a child window

ahasan
Beginner
547 Views
I created the following child window with the WC_LISTVIIEW class and LVS_REPORT style:

hWndList = CreateWindowEx(WS_EX_RIGHTSCROLLBAR, WC_LISTVIEWA, " "C, IOR(WS_VISIBLE, IOR(WS_VSCROLL,
IOR(WS_CHILD, LVS_REPORT))),0, LVycoord ,rclist%right, height_LV_Wnd, hwnd, ID_LISTVIEW, ghInstance, NULL)

The child window with the List View control works fine.

I would like to double click a list View item and intercept the notification message (NM_DBLCLK sent via WN_NOTIFY).

I tried to subclass the child window (hWndList) using an example from the SDK, but my attempts failed, so I was wondering if it is possible to subclass this window. If not, is there another way to intercept the WM_NOTIFY message?
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
547 Views
It is possible to subclass the listview, but you don't need to. Controls in general are notintended to be subclassed; it is possible, but only if you need something really special. Controls aredesigned to be controlled from their parent window.
That being said, have in mind that WM_NOTIFY/NM_DBLCLK is sent to listview's parent window (hwnd) -- you're supposed to handle it in its window procedure, not in listview's subclassed procedure.
Or am I missing something in your question?
Jugoslav
0 Kudos
ahasan
Beginner
547 Views
Thanks for the reply jugoslavdujic.

I thought that the child window (hWndList) was the parent. I will treat the main window (hwnd) as the parent, and see what happens.
0 Kudos
Reply