Hello,
I checked out the drag and drop examples and wanted to use it in bit different way, but the following is not working.
The standard example; where the LISTVIEW (or in my case, a TREEVIEW) is a child of the main window, everything is OK.
But if I have a dialog which loads as a control (DS_CONTROL) in the main window and if this child dialog has a LISTVIEW (or TREEVIEW)
the WM_DROPFILES message is not "caught" by the subclassed proc of the LISTVIEW (or TREEVIEW)
If I do a SetParent on the LISTVIEW (or TREEVIEW) and make it the child of the main window, the WM_DROPFILES starts working.
Anyone faced a similar problem??? :'( Some problem with the window styles? :dazzled:
I am using the "Dialog as main" type of window as my main window.
Regards,
Shantanu
Hi again,
I am attaching a stripped down version of the problem scenario. I have realized what is happening.
If the child dialog is "inside" a groupbox, then there's a problem. In the attached sample I have purposely kept the groupbox overlapping the treeview.
Anyone knows for sure what is causing the issue? Something to do with the ZOrder of the treeview or something?
Regards,
Shantanu
[attachment deleted by admin]
hey,Shantanu Gadgil
i tested it no any problem.
maybe i don't understand the problem.
[attachment deleted by admin]
For me the "while dragging" cursors appears only when I am hovering on that portion of the treeview where there is _NO_ overlapping the groupbox.
If I drag on the region where the groupbox and treeview overlap, the cursor turns to the normal cursor. :( It is as if the groupbox is ON TOP of the treeview.
This is the problem I was explaining.
Regards,
Shantanu
Quote#define IDD_DIALOG 1000
#define IDC_GRP1 1001
IDD_DIALOG DIALOGEX 6,3,345,213
CAPTION "Dialog As Main"
FONT 8,"MS Sans Serif",0,0
CLASS "DLGCLASS"
STYLE 0x10CF0800
EXSTYLE 0x00000000
BEGIN
CONTROL "IDC_GRP",IDC_GRP1,"Button",0x50000007,0,0,135,170,0x00000000
END
EXSTYLE WS_EX_ACCEPTFILES
Umm...I am confused...are you saying that I should set the WS_EX_ACCEPTFILES style ON for the groupbox? :( :red
If yes, that doesn't solve my problem
See...the groupbox is supposed to be on the main window.
The treeview which is on the _child_ dialog (NOT on the main window) is supposed to understand that a drag operation is "hovering over" it so that if there is any treeitem under the mouse, its state can be set to hilited.
Regards,
Shantanu
make a bmp to explain the problem.
Quote from: Shantanu Gadgil on January 05, 2007, 02:43:53 PM
Hi again,
I am attaching a stripped down version of the problem scenario. I have realized what is happening.
If the child dialog is "inside" a groupbox, then there's a problem. In the attached sample I have purposely kept the groupbox overlapping the treeview.
Anyone knows for sure what is causing the issue? Something to do with the ZOrder of the treeview or something?
Regards,
Shantanu
Of course it has to do with zOrder. Groupbox is a transparent control (because of that you cannot see how it actually overlaps listview), groupbox is actually on top and that part of listview is overlapped
I have given up on having a groupbox on the main window, but the problem continues...
Topic continued here...
http://www.masm32.com/board/index.php?topic=6477.0
Any help would be appreciated.
Thanks and regards,
Shantanu
QuoteUmm...I am confused...are you saying that I should set the WS_EX_ACCEPTFILES style ON for the groupbox? Sad redface
If yes, that doesn't solve my problem.
I have given up on having a groupbox on the main window,
[/b]
look at this.
[attachment deleted by admin]