|
For a long time I've looked for a program that would allow me to print C code with syntax color highlighting. The best that I had found was emacs (my normal editor) which used Ghostscript and was able to print basically what I saw on the screen. It worked, but was horribly slow - a six page print could take around a half hour (it produced nearly 100 MB per page). This afternoon I decided to see if maybe something else was available and came across your program. Didn't take that long to set up using the instructions in the article, and I am now able to print at roughly the same speeds as I would from editors like notepad.
Thank you for taking the time to create this program and share it with the world.
Regards,
Dave Harper
|
|
|
|
|
DavidHarper wrote: Thank you for taking the time to create this program and share it with the world.
You are welcome. I'm glad you found it usefull. Never though it would be used for it's printing abilities
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi,
Can anyone tell me how to call the config setting in C# project?
Thanks!
|
|
|
|
|
I have never tried to call the CPL from managed myself but this article may be of help.
http://www.codeproject.com/KB/cs/appletengine.aspx
|
|
|
|
|
Hello Again Jan & all,
Can you please tell me if I can programmatically change the Delimeter Background Color for the selected line ONLY. I wish to do this so that the delimeters on the currently selected line do not standout but are the same color as the selected line's background color.
Regards
Mule
|
|
|
|
|
TeeJayMule101 wrote: Can you please tell me if I can programmatically change the Delimeter Background Color for the selected line ONLY. I wish to do this so that the delimeters on the currently selected line do not standout but are the same color as the selected line's background color.
There is no way you can influence the colors for the selected line only. To get this to work like you want it to you will need to make some changes to the Brainchild source code. Something like a flag that says not to use text background colors on the current line when the current line marker is shown...
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi,
I am using Windows XP SP3 and I have tried to install this control in Visual Studio 2008 but the control fails to self-register. I have tried to manually register it with REGSVR32 but it produces an error which is caught by JIT debugger.
Can you please tell me what could be causing this problem?
I am using the .ocx, .dll & .cpl file from the Brainchild compiled binaries file. I have recently reinstalled but I have not had any problems installing this control in XP or VS2008 in the past.
Thanks and regards
|
|
|
|
|
Hi,
I have just checked on my virtual machine running XP + SP3 with the binaries downloaded from CodeProject and the binaries from my latest build and in both cases the ocx registers OK.
I can also add it to my toolbox in VS 2005. I am not at my personal machine now which has VS 2008 installed so I have not tested it on VS 2008 but I can't see why that would be a problem.
Just to make sure:
1) Are your settings (.bcp) files OK?
2) Are your registration settings for Brainchild OK? (LOCAL_MACHINE\Software\BCDLL\CurrentVersion\Settings)
3) Are the .cpl, .dll & .ocx located in the same folder?
4) Do you have admin rights to perform the registration?
If so what is the error you get when trying to register the component?
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi,
First of all, I wanted to say thank you for this wonderful control. I am currently using it in a C# project I am working one, completely trouble free It's a very easy to use, attractive and comprehensive Editor control. It has taken many many months if not years off my project. So thank you again
I have really only one small concern. I would like very much to change the name of the configuration editor, from what it is ("Brainchild configuration editor.") to something a little more generic (ie "Editor Options" or "Configuration Options", something in title case and without the dot on the end).
Unfortunately I am new c# and very new to c++, otherwise I would compile a new version of the Configuration Applet. This being said, it there anyway you could build and post on this site another version of the BCC.cpl binary with the title changed to one of the above? Alternatively, could you step me through how to compile a new version myself. I have Visual C++ Express 2005.
Thanks & Kindest Regards
|
|
|
|
|
Hello TeeJayMule101,
It is probably a to big of a job to try and compile a new version of the cpl with VC express. On the other hand it is also difficult for me to provide you with a version with the requested changes.
If you really want only to change the title of the configurator you are probably best of to "patch" the BCC.cpl file. Simply open it in VC++ in the binary editor and look up the title text. As long as you do not make the title longer than it already is you should be able to change it there (Do not forget to terminate the new title with a 0 byte).
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi Jan,
Thank you very much for your reply. I have been able to change the title of the Editor to what I wanted, thanks to your help.
Kindest Regards
TeeJay
|
|
|
|
|
Hello all,
Is there any way to wrap the text to fit the container area and avoid horizontal scroll bars?
|
|
|
|
|
this is a great setup, you or one of the best programmers I seen.
I'm a hobby programmer that ponds out code, cutting and pasting because I'm not a good typist and I studied Lots of programming languages, started on trs80 and Qbasis, stop until windows 95 began wit c and it seem strange the tried Liberty basic, then relies it great for quick utilities but to slow for large programs,
went back to tried c++ classes confuse me because the book I used use student,teacher and class room stuff to explain,got on the internet started Jscript love it, tried Pearl don't like it, began PHP like it, and sql for the internet.anyway I mite not write the best programs but I can read them fix them and can tell good ones from bad.
yours or great, comment good, good procedures,compact with all the bell and whistles.
I'd like to set your code up as a platform on my computer and add a project manager to it.
I sell programs on ebay and would get $5 for it.
I do not what to go behind your back since you spent a lot of time and effort. I will include your copyright in the install,help, and about box.
please give me a good copyright acknowledgement to use
|
|
|
|
|
You can use the code in any way you see fit. Commercial or otherwise. Complete or only parts of it. It is free for anyone to use.
-Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
When can we expect a new version, with the Defaults directory bug (slash Create Registry key) fixed?
Elsethread you mention a possible version problem between the DLL and the compiled binary. However, I just downloaded both minutes ago, entered the registry key manually, and got that dreaded error message.
... That said -- great job! My free tip of the day: If you ever feel like checking the world of Unicode, you should read James Brown's catch22[^] pages.
[JW]
|
|
|
|
|
I'm afraid it can be a long wait since I am no longer actively developing Brainchild. Even though I have developed the control beyond what you can download here I no longer have the time or energy necessary to develop the control any further.
Regards,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi, i'm new in OOP and i'm learning how to program on visual studio 2005.
When i tried to compile the demo i got:
Error 5 fatal error C1083: Cannot open include file: 'classes/all.h': No such file or directory c:\documents and settings\optimus primum\escritorio\brainchild\bcdemo\bcdemo\bcdemo.h 6
How can i solve this?
how can i use brainchild on a IDE that i want to develop in visual Studio .NET?
|
|
|
|
|
I created a file classes in the visual studios VC include directory
the project default includ dirrectory what ever that is and then extract the classli.zip to it.
I really extract it to my desttop in a new folder but when I got the message and seen
the <> was a clue it shound be a compilers include path and copied it to c:\program files\microsoft visual studio\vc7\include directory.
this will solve many of the compile problems
|
|
|
|
|
I download source code of DLL and OCX. When I compile OCX using the DLL I have compiled on my machine, I got "Performing Registration Error" during compilation. If I use original DLL and LIB file to compile OCX, it is OK. When I try to register compiled OCX from command line, I got LoadLibrary("BrainChild.ocx") failed - Invalid access to memory location error. Anybody know what is happening?
I am using Visual Studio 2005 to compile these two project.
Thanks,
Ant.
|
|
|
|
|
After playing with the registry for about an hour. I've noticed that not all Windows Version allow read access from the "HKEY_LOCAL_MACHINE" key. Especially some Windows XP HOME OEM versons. You have to go into safe mode (or administrator mode) to read it. Users with laptops like DELL, Compaq or HP will have a problems setting up BrainChild Control Panel with the registry.
So, BrainChild Control Panel will only work if you are the administrator.
|
|
|
|
|
I've made a small change to the BCC source. In the main.cpp, I just changed HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER key. So, that it will work for multiple users and the administrator.
Open the registry to HKEY_LOCAL_MACHINE\Software\BCDLL\CurrentVersion. Add the string key "Settings". Then change that value to the path of the configuration files (*.bcp, from dll source).
Then, do the same for HKEY_CURRENT_USER\Software\BCDLL\CurrentVersion. Add the string key "Settings". Then change that value to the path of the configuration files (*.bcp, from dll source).
HKEY_LOCAL_MACHINE\Software\BCDLL\CurrentVersion and HKEY_CURRENT_USER\Software\BCDLL\CurrentVersion keys must equal and the path must be correct.
This should help a lot of people.
I love this control, thanks so much!
James harris
|
|
|
|
|
I've pointed it down to the exact code.
HRSRC hsrc = FindResource(hModule, lpszResource, _T("BRAINCHILD"));
For some reason hsrc returns NULL. It works in the WTL demo. When I insert it into my project the syntax coloring does not work. I've added the resource tree "BRAINCHILD" with the IDR_CPLUSPLUS resource file (c++.bcp) just like the demo.
The WTL Demo produces this warning, but it runs and the syntax coloing works.
BrainChildEdit warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
I am trying to figure why it's not coloring the text. Thanks for helping in Advance.
James Harris
|
|
|
|
|
Did you add the 'c++.bcp' file to your project as a custom resource (simply import the file as a resource)? If it you did not the FindResource() will not find it.
To get syntax coloring for brainchild you can also setup as explained in the article. That way the files are loaded by the control automatically. You only need to include the bcp files as resources in the executable when you want to embed the parser files into your executable.
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
I've checked my resource file.
IDR_CPLUSPLUS BRAINCHILD "res\\c++.bcp"
It does appear in there. Also, I've check the res folder and the file exist!
Also, when I run BrainChild and try to open the CPL. I get this error, "Problems reading the brainchild configuration files. Therefore it is not possible to edit the settings." I've inserted the key into the registry like you said in the help files.
The LoadFile function does not like unicode. For example, I've had to add code for string conversion;
BOOL LoadFile(BOOL bForce, LPCTSTR lpszFileName)
{
ATLASSERT(::IsWindow(m_hWnd));
int n = 0;
while(lpszFileName[n] != 0){
buffer[n] = lpszFileName[n];
n++;
}
buffer[n] = 0;
return (::SendMessage(m_hWnd, BCM_LOADFILE, bForce, (LPARAM)buffer) == BCMR_OK);
}
Is there anything that's I'm doing wrong? I'm using visual studios 7.1.
James Harris
|
|
|
|
|
FIXED!!! I've fixed the syntax coloring problem but not the brainchild configuration tool.
In VS 7.1 Properties. Select General under the Configuration Properties folder. Then, select "Use Mult-Btye Character Set" from the Character Set option.
You may want to add this to your Help File
|
|
|
|