And it is really strange to see what's happening with the message pump at selected points that seems to lead up to the crash. The crash does not happen in debug mode, just when running the compiled executable.
The program is designed to open up a file of images, it constructs the treeview to show a list of said images in the file. This all works nicely. However, I can open one file after another, and the treeview resets properly, and reloads without causing a boom. It's when I make a selection on the treeview to make the associated image that the boom will happen shortly thereafter when I open another file.
It seems that after I make that initial selection click in the treeview, the reset and reload will send a succession of %TVN_SELCHANGED notifications to the main dialog window, and I'm not certain if that's supposed to happen. This is also resulting in every selection causing the program to attempt to display the selected image, and probably on my fault, I'm not checking bounds, so it goes boom.
I am going to code around this behavior, I'm just wondering if it's something I'm supposed to do, or is something that I'm going to have to do due to the succession of %TVN_SELCHANGED codes being sent. I don't see a means from the SDK on clearing a selection from a treeview, ...
P.S. Using DDT;
The program is designed to open up a file of images, it constructs the treeview to show a list of said images in the file. This all works nicely. However, I can open one file after another, and the treeview resets properly, and reloads without causing a boom. It's when I make a selection on the treeview to make the associated image that the boom will happen shortly thereafter when I open another file.
It seems that after I make that initial selection click in the treeview, the reset and reload will send a succession of %TVN_SELCHANGED notifications to the main dialog window, and I'm not certain if that's supposed to happen. This is also resulting in every selection causing the program to attempt to display the selected image, and probably on my fault, I'm not checking bounds, so it goes boom.
I am going to code around this behavior, I'm just wondering if it's something I'm supposed to do, or is something that I'm going to have to do due to the succession of %TVN_SELCHANGED codes being sent. I don't see a means from the SDK on clearing a selection from a treeview, ...
P.S. Using DDT;
Code:
CONTROL ADD "SysTreeView32", hDlg, %IDTV_FOXTREE, "FoxTree", 6, 254, 126, _ 149, %WS_CHILD OR %WS_VISIBLE OR %WS_TABSTOP OR %TVS_HASBUTTONS OR _ %TVS_LINESATROOT OR %TVS_SHOWSELALWAYS OR %TVS_FULLROWSELECT OR _ 0, %WS_EX_CLIENTEDGE OR %WS_EX_ACCEPTFILES OR _ %WS_EX_LEFT OR %WS_EX_LTRREADING OR %WS_EX_RIGHTSCROLLBAR
Comment