Some MFC questions
I am starting a script editor project for UT scripts. I decided to use the MFC and I want to try to imitate VC++ as much as possible. I have a few questions however:
1. How do I change the default file extensions in the Load/Save boxes (at the moment it is just "all files")?
2. How can I colour code the text within the editor (like in VC++, DevC++ and any other half-decent code editor)? At present I have a CEditView derived class for my document views.
3. How do I add a dockable toolbar at the side with controls (like the tree view for projects)?
Anyone with any of these answers can they PLEASE post here. Thank you.
>>>>>>>>>>>>>>>>>
Ilthigore
<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>Ilthigore<<<<<<<<<<<<<<<<<
December 10, 2002 12:55 PM
1. How do I change the default file extensions in the Load/Save boxes (at the moment it is just "all files"?
// This creates a SaveAs File Dlg with a *.bmp extension
CFileDialog FileDlg(false, "bmp";
2. How can I colour code the text within the editor (like in VC++, DevC++ and any other half-decent code editor)? At present I have a CEditView derived class for my document views.
If you want to rool your own you should look into how ot implement Lexicons... otherwise I know http://www.codeproject.com and http://www.codeguru.com have some user created classes for syntax highlighting.
3. How do I add a dockable toolbar at the side with controls (like the tree view for projects)?
I would suggest you use a Docking Window... I personally would use the Docking Windows found here http://www.datamekanix.com . THis is the code (at least in part) used by Dundas SOftware for making Docking Windows. These classes are extremly easy to use and have a few nice features like saving the window positions in the registry.
// This creates a SaveAs File Dlg with a *.bmp extension
CFileDialog FileDlg(false, "bmp";
2. How can I colour code the text within the editor (like in VC++, DevC++ and any other half-decent code editor)? At present I have a CEditView derived class for my document views.
If you want to rool your own you should look into how ot implement Lexicons... otherwise I know http://www.codeproject.com and http://www.codeguru.com have some user created classes for syntax highlighting.
3. How do I add a dockable toolbar at the side with controls (like the tree view for projects)?
I would suggest you use a Docking Window... I personally would use the Docking Windows found here http://www.datamekanix.com . THis is the code (at least in part) used by Dundas SOftware for making Docking Windows. These classes are extremly easy to use and have a few nice features like saving the window positions in the registry.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement