|
As of yet there is no OCX version of the control. However it should be possible to create an ActiveX wrapper with relative ease. I cannot promise you it will happen soon but since you are not the first to ask for this I will put it on my TODO list.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi Jan,
How much of an effort might it be for a VC++ programmer to convert this? Hoping that you plan to do this, approximately when you plan to create the OCX which can be used in VB6?
Thanks,
Avins.
|
|
|
|
|
Anonymous wrote:
How much of an effort might it be for a VC++ programmer to convert this?
Actually not much at al. I have a first version of an ActiveX wrapper. It is not yet complete but most of it is done. It is a light wrapper which simply exposes a set of methods which internally call the messages. It also has a couple of events which translate the brainchild notifications.
This does mean that the OCX depends in the brainchild.dll but that should not be a problem.
Anonymous wrote:
Hoping that you plan to do this, approximately when you plan to create the OCX which can be used in VB6?
Like I mentioned the OCX is nearly ready. I am not really sure when I wil get around to uploading it together with a new version of brainchild though. If you want I can mail you a copy when I'm done. Just let me know.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
WOW, that sounds great !
Jan please mail me the OCX version to my ID avins_75@yahoo.com
|
|
|
|
|
Really great work. I don't understand syntax before.I tried to figure out a simple one from your project in order to understand into the inside. For example, just C++ syntax,or HTML syntax. What I need most is just syntax.but your project contains so many classes,I was confused and terrible.Could you figure out a simple syntax with simple UI? I want to understand the principle and use it in my way.
Thank you very much!
Alick
|
|
|
|
|
I am not really sure what you are trying to ask here. Do you mean to ask how you can create a parser file which controls syntax coloring? If so that is relatively easy. Just use BCC.cpl, the control panel applet which let's you create and edit these files. The files themselves are simple textual configuration files which you can edit by hand but I would not recommend it.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi,
Looking at the following code:
static void MoveSol( LPCLASSDATA lpcd )
{
/*
* Find first character offset.
*/
int nFirst = 0;
LPLINE pLine = GETLINE( lpcd );
while ( _istspace( pLine->pcText[ nFirst ] ) && nFirst < pLine->nLength ) nFirst++;
I have swapped the conditions, just in case there are no characters in the line. Not sure if you have already fixed the problem as well.
while ( nFirst < pLine->nLength && _istspace( pLine->pcText[ nFirst ] ) ) nFirst++;
See ya
|
|
|
|
|
QuiOui wrote:
while ( _istspace( pLine->pcText[ nFirst ] ) && nFirst < pLine->nLength ) nFirst++;
I have swapped the conditions, just in case there are no characters in the line. Not sure if you have already fixed the problem as well.
while ( nFirst < pLine->nLength && _istspace( pLine->pcText[ nFirst ] ) ) nFirst++;
Good catch. I guess I never pressed the HOME key on an empty line. I will fix this ASAP.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi, First of all, great code. I'm just having one small problem.
I'm using VC7 2002 to compile the BCC project. When I run the BCDemo program, select Options->Configuration, then try to open any of the 'Syntax Coloring' options, the program Asserts.
Unhandled exception at 0x1002da31 (Brainchild.dll) in bcdemo.exe: 0xC0000005: Access violation reading location 0x000007ff. - the actual crash is in array.c (ArrayGetSize)
(although it says brainchild.dll, when I replace the BCC.cpl that I built with the one in the Brainchild_WTL project, I dont get the assertion.)
I dont know if I've got some strange build settings going on (though I didnt change anything), or if this is a bug you've already fixed.
I noticed that the BCC.cpl that comes with the WTL is version 2.2.0, whereas the one I build is 2.1.0. Did the source change? If so, can I get the new stuff?
I dont know if you can fix what I broke, but any help you can give is appreciated.
cheers
Sam
|
|
|
|
|
sammyc wrote:
Unhandled exception at 0x1002da31 (Brainchild.dll) in bcdemo.exe: 0xC0000005: Access violation reading location 0x000007ff. - the actual crash is in array.c (ArrayGetSize)
(although it says brainchild.dll, when I replace the BCC.cpl that I built with the one in the Brainchild_WTL project, I dont get the assertion.)
I dont know if I've got some strange build settings going on (though I didnt change anything), or if this is a bug you've already fixed.
I noticed that the BCC.cpl that comes with the WTL is version 2.2.0, whereas the one I build is 2.1.0. Did the source change? If so, can I get the new stuff?
The 2.2.0 version only has a couple of minor fixes which should not pose this kind of a problem. Did you compile the dll the cpl and the demonstration program in debug/release versions?
The assertion in array.c does mean that it is in brainchild.dll but the call to the ArrayGetSize API, which is part of the undocumented brainchild API, is most likely made from the control panel applet. Could you try to copy the DEFS.H header from the dll source to the cpl source and recompile?
When I find the time I will try to release a new version of ClassLib and Brainchild soon. If you can't wait let me know and I will email it to you. I cannot promise the problem you found is fixed since it is unknown to me and I cannot reproduce it.
Bye,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
c:\program files\microsoft visual studio\myprojects\bcc\bcc.h(12) : fatal error C1083: Cannot open include file: 'classes/all.h': No such file or directory
treeview.cpp
c:\program files\microsoft visual studio\myprojects\bcc\bcc.h(12) : fatal error C1083: Cannot open include file: 'classes/all.h': No such file or directory
Error executing cl.exe.
BCC.cpl - 22 error(s), 0 warning(s)
What am I doing wrong?
Thank you
|
|
|
|
|
Are you sure you have ClassLib[^] setup correctly on your system? It is required to compile both BCC and the BCDemo demonstration program.
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
|
How can I change settings (syntax highlight colors, add keywords, etc.) at runtime?
|
|
|
|
|
Zodiacon wrote:
How can I change settings (syntax highlight colors, add keywords, etc.) at runtime?
Do you mean the setting of a specific control, all controls of a specific thread or the global settings?
To change the global settings you can use the method which the configuration tool uses. Write the changed settings in the directory you have setup containing the parser files. Call the, non-documented, API of the brainchild.dll, GetUpdateMessage(). Broadcast the result of this API as a message to all top-level windows and the changed settings are re-loaded by all the controls currently running. See line 245 of Main.cpp of the configuration tool.
To change the settings of controls that belong to a specific thread you can use the BCM_LOADPARSER message or the LoadParserFromFile() or LoadParserFromMemory() APIs introduced in version 2.2 of the control.
Currently there is no set way to change the setting of a single control. This is because the settings are loaded per-thread and not per-control. This has been done to preserve used resources.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Thanks for the prompt reply, Jan.
I was hoping for some hidden API, such as AddKeyword, and so on, but I guess I'll have to settle for writing to the BCP file and reloading the parser file.
In any case, you did a very good job!
Pavel
|
|
|
|
|
I just remembered another question:
Does the control support case fixing? I mean, for example, a language like VBScript is case insensitive, so I can write dim, DIM or Dim. Is there a feature to correct to the original case? e.g. if I write "dim", I would like the control to change it to "Dim" automatically. Is that possible?
If not - it's a feature worth considering... maybe I'll add it myself if time permits.
Pavel
|
|
|
|
|
No. The control does not have this option but it is an interesting suggestion. I have put it on my TODO list. I have some ideas on how to include this option without to much problems. I'll try to get it into the next release.
Thanks for the suggestion,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Is there any possibility to replace selection with specyfied text? I only see one method - be using clipboard and hardcoded commands CID_CLIP_COPY, CID_CLIP_CUT, etc...
|
|
|
|
|
Kuling wrote:
Is there any possibility to replace selection with specyfied text? I only see one method - be using clipboard and hardcoded commands CID_CLIP_COPY, CID_CLIP_CUT, etc...
No. This is not directly possible using a build-in command or massage. However I will put this option on my todo list. It will probably make it into the next release.
Thanks for the idea...
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hi, this control looks simply amazing! But, how could I use it with VB.NET or C#?
|
|
|
|
|
Blaz Ziherl wrote:
Hi, this control looks simply amazing! But, how could I use it with VB.NET or C#?
As far as I know nobody has created a .NET version/wrapper of this control. Since my .NET knowledge, especially in this area, is to limited I do not know what the easiest way would be to use this control in a .NET application. If I had to venture a guess I would say a COM wrapper but I'm not sure.
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|
|
Hey,
This sure is a cool control
but
Im new to VC6 and im having difficulty using this control.
cud any 1 plz tell me how can i start with this thing on VC6 (MFC).
Plz tell me the 1st 2nd 3rd step, im sure i'll have no problems afterwards plz help me start atleast).
I have a semester proj (compiler) and ive bulit till parser (using MFC). Now i want to add this control as an IDE to my project.
thanx.
raheel
|
|
|
|
|
Despite a "0 error(s); 0 warning(s)" result for all the modules, there was no ".exe" file written. Consequently, I didn't have any sample to run. Can you tell why that was the case?
Thanks.
William
Fortes in fide et opere!
|
|
|
|
|
I'm not sure what the problem may be but compiling brainchild itself will only result in a dll binary. To get a runnable demonstration you will also have to compile the BCDemo code which will result in an executable. Put these two in the same directory and running the BCDemo program should give you a running example.
There nothing special about the projects so Visual Studion should simply put the resulting binaries in their respective Debug/Release directories.
Please let me know if you get it to work...
Enjoy,
Jan
We are the all singing, all dancing crap of the world. - Tyler Durden
|
|
|
|