Bug in CCheckListBox...
-
There is a bug in CCheckListBox, when loading a DLL with the dialog and ListBox control (derived from CCheckListBox), the Checklist is always empty, no matter how many AddStrings do you use. This always happends in the latest version of "MFC Static Release". In debug mode it works and in Shared MFC Release works again. There were no conflicts between compiler settings from the EXEcutable and DLL file with the dialogs containing the controls. And also there were no conflicts between resource IDs or any programmer mistake. After changing the CCheckListBox derived control to CListBox it worked with no problems. Thanks M$ for your geniune bugs :eek: :eek: :eek: :mad: :mad: :mad: :mad:
And also there were no conflicts between resource IDs or any programmer mistake. How can you be so sure that it's not a programmer's mistake? (Just curious) -- Alex Marbus www.marbus.net But then again, I could be wrong.
-
There is a bug in CCheckListBox, when loading a DLL with the dialog and ListBox control (derived from CCheckListBox), the Checklist is always empty, no matter how many AddStrings do you use. This always happends in the latest version of "MFC Static Release". In debug mode it works and in Shared MFC Release works again. There were no conflicts between compiler settings from the EXEcutable and DLL file with the dialogs containing the controls. And also there were no conflicts between resource IDs or any programmer mistake. After changing the CCheckListBox derived control to CListBox it worked with no problems. Thanks M$ for your geniune bugs :eek: :eek: :eek: :mad: :mad: :mad: :mad:
Heh, works in debug and not in release. I have had those bugs before. Build your release mode application with debug information and step into the AddString routine (it is very important that you still have your optimizations enabled). My bet is you have some strange stack problem or an unitialized variable. Tim Smith Descartes Systems Sciences, Inc.
-
Heh, works in debug and not in release. I have had those bugs before. Build your release mode application with debug information and step into the AddString routine (it is very important that you still have your optimizations enabled). My bet is you have some strange stack problem or an unitialized variable. Tim Smith Descartes Systems Sciences, Inc.
-
And also there were no conflicts between resource IDs or any programmer mistake. How can you be so sure that it's not a programmer's mistake? (Just curious) -- Alex Marbus www.marbus.net But then again, I could be wrong.
It can be a programmer mistake, but not mine, maybe microsoft... I have created an entire new application just with a CCheckListBox and I have added the string AddString(_T("Test")); and it happends the same. We have a separate resource DLL file which is loaded at startup. All other controls works well except this. Even AddString works when we derive the listbox from CListBox not CCheckListBox. After almost 8 hours of debugging and compiling with all sorts of settings and modifications, I found that if we compile the executable/application with MFC Shared it works and when it's compiled with MFC Static it does not work. The DLL was compiled using the same settings as the application/exe. I know sounds strange, but I'm sure there is something with MFC CCheckListBox code. X|
-
Heh, works in debug and not in release. I have had those bugs before. Build your release mode application with debug information and step into the AddString routine (it is very important that you still have your optimizations enabled). My bet is you have some strange stack problem or an unitialized variable. Tim Smith Descartes Systems Sciences, Inc.
I have created an entire new application just with a CCheckListBox and I have added the string AddString(_T("Test")); and it happends the same. We have a separate resource DLL file which is loaded at startup. All other controls works well except this. Even AddString works when we derive the listbox from CListBox not CCheckListBox. After almost 8 hours of debugging and compiling with all sorts of settings and modifications, I found that if we compile the executable/application with MFC Shared it works and when it's compiled with MFC Static it does not work. The DLL was compiled using the same settings as the application/exe. I know sounds strange, but I'm sure there is something with MFC CCheckListBox code. X|
-
I have created an entire new application just with a CCheckListBox and I have added the string AddString(_T("Test")); and it happends the same. We have a separate resource DLL file which is loaded at startup. All other controls works well except this. Even AddString works when we derive the listbox from CListBox not CCheckListBox. After almost 8 hours of debugging and compiling with all sorts of settings and modifications, I found that if we compile the executable/application with MFC Shared it works and when it's compiled with MFC Static it does not work. The DLL was compiled using the same settings as the application/exe. I know sounds strange, but I'm sure there is something with MFC CCheckListBox code. X|
-
I have created an entire new application just with a CCheckListBox and I have added the string AddString(_T("Test")); and it happends the same. We have a separate resource DLL file which is loaded at startup. All other controls works well except this. Even AddString works when we derive the listbox from CListBox not CCheckListBox. After almost 8 hours of debugging and compiling with all sorts of settings and modifications, I found that if we compile the executable/application with MFC Shared it works and when it's compiled with MFC Static it does not work. The DLL was compiled using the same settings as the application/exe. I know sounds strange, but I'm sure there is something with MFC CCheckListBox code. X|
Did you put AFXRES.RC into your RC include list? Martin
-
Did you put AFXRES.RC into your RC include list? Martin
I have included afxres.h Now I have included afxres.rc in the DLL file and it works. :-O I thought that afxres.rc is already included in MFC static library. How come that other controls worked without including the afxres.rc file ? (checkboxes, listbox, and all other controls) Thanks a lot !! :cool: :cool: :suss: :)
-
I have included afxres.h Now I have included afxres.rc in the DLL file and it works. :-O I thought that afxres.rc is already included in MFC static library. How come that other controls worked without including the afxres.rc file ? (checkboxes, listbox, and all other controls) Thanks a lot !! :cool: :cool: :suss: :)
-
The control is an MFC add-on. It isn't part of COMCTRL32. Thus, it requires extra resources for the bitmaps and such. Tim Smith Descartes Systems Sciences, Inc.
-
I have included afxres.h Now I have included afxres.rc in the DLL file and it works. :-O I thought that afxres.rc is already included in MFC static library. How come that other controls worked without including the afxres.rc file ? (checkboxes, listbox, and all other controls) Thanks a lot !! :cool: :cool: :suss: :)
NO! Remember, that resource references can't be resolved by the linker. That ist very very vary sad, but we have to live with this. Martin