Trouble with List Control and Dialog
-
Ok, i have a dialog which i made with the resource editor. all the code is done with pure win32, no MFC. Now when i have list control on the dialog, the CreateDialog function fails and the dialog is not created. When i set the "No Fail Create" (or something like that) prop on the dialog, the function succeeds the window is made but the list control doesnt show up. when i take the list control off, it doesnt matter whether the "no fail create" prop is set or not, the function succeeds and everything works fine. i also have the same problem when i add a progress bar. extra info: a while back, i made a MFC project that used a list control and a progress bar, the list control caused no problem, but when the progress bar was put on the dialog, the program crashed.
-
Ok, i have a dialog which i made with the resource editor. all the code is done with pure win32, no MFC. Now when i have list control on the dialog, the CreateDialog function fails and the dialog is not created. When i set the "No Fail Create" (or something like that) prop on the dialog, the function succeeds the window is made but the list control doesnt show up. when i take the list control off, it doesnt matter whether the "no fail create" prop is set or not, the function succeeds and everything works fine. i also have the same problem when i add a progress bar. extra info: a while back, i made a MFC project that used a list control and a progress bar, the list control caused no problem, but when the progress bar was put on the dialog, the program crashed.
The dialog creation is failing because the list control window class isn't registered. Add a call to
InitCommonControls()
in your app's init code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Magnae clunes mihi placent, nec possum de hac re mentiri. -
The dialog creation is failing because the list control window class isn't registered. Add a call to
InitCommonControls()
in your app's init code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Magnae clunes mihi placent, nec possum de hac re mentiri. -
that didnt seem to make a difference keep in mind im not using MFC, and i dont plan on it. i suspect that function is for MFC? seems to be alot of trouble to get access to it.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/html/vctbsaddingcontrolstoadialogcausesthedialogtonolongerfunction.asp[^] It's amazing what one can find in MSDN.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcresed/html/vctbsaddingcontrolstoadialogcausesthedialogtonolongerfunction.asp[^] It's amazing what one can find in MSDN.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!