I am running a dialog based project in VC6.0 and am trying to popup other modeless child dialogs to give me info on test ranges and setup information. I really want them to be modeless so that I can run the main test panel with the test ranges visable throughout if so desired.
I thought I was done but realized that the static control that comes with VC6.0 Standard only takes 256 characters. I suppose I could use a bunch of static controls but that looks dumb.
Edit boxes don't work well for me because they don't like tabs and newlines. I tried the rich text box control but when I put one on any dialog, even my main one, the whole dialog never displays. (Question for Microsoft I suppose.)
So, I started looking through the ActiveX controls and found a great plug in called Microsoft Forms 2.0 TextBox. I dropped in that control and made a nice setup box and range box for my two dialogs.
Well, here is the problem then. When I have a "Microsoft Forms 2.0 TextBox" control on my dialog I can't display my dialog as modeless. If I try to display it as modal with .DoModal everything works fine. I see that my problem is when I try to create the modeless dialog with the following command inside the Constructor for the dialog class:
error = this->Create(IDD_DIALOG, NULL);
All Microsoft tells me is that if the dialog is created and initialized without errors then error should be non zero. Well, it's zero if there is any NI control on the dialog. Consequently the dialog doesn't get displayed.
I wish that there was a nice TextBox control like in CVI. Just something you can edit straight from the dialog and it'll load itself just fine when you run it. Microsoft's standard static control is lame and the edit boxes don't let you type in the edit box from the dialog editor screen. So much for visual control. Anyway, I need some suggestions. I don't want to have the overhead of doing any SDI or MDI if I don't have to. I only do small projects and seperate Dialog projects work great.
Maybe I'm not doing something correctly with Visual C++ itself as far as creating modless dialogs are concerned, but the fact that all controls can be displayed as modal but only non-NI controls can be displayed modelessly seems strange. Maybe it's an ActiveX thing and since the NI-controls are the only ActiveX stuff I'm using I get into trouble. I'd appreciate some advice. Thanks,
Grant Johnson
Grant M. Johnson
Project Engineer
LECO Corporation