I'm trying to create a frame VCL inside my project using factory pattern
something like this:
TFrame* newToolbarFrame =
FrameFactory::getInstance().createObject(toolbarFrameClassId);
When the factory creates implementation class , I get a error message about missing recourse file.
For example if I create instance of class TFra...
I have hierarchy of public interfaces like this:
struct ISwitchable {
/* Obtain pointer to another implemented interface of the same instance. */
virtual int switch(unsigned int interfaceId, void** pInstance) = 0;
};
struct IFoo : public ISwitchable { /* Methods */ };
struct IBar : public ISwitchable { /* Methods */ };
struct ...
If you have been successful in persisting your data, which type of stream did you get to work
Text or Binary
ANSI or UNICODE
Did you have to use any BOOST_ASSERTS or some extra MACRO or dance around the fairy ring at 4:00 am wearing your Moose sweater backwards.
Thanks for your answer
...
We use C++ Builder for an application whose forms are kept external to the EXE in a database. Application code is C++
This allows us to modify the forms and form/actions without a re-compile. Here is a snippet of code that gets the job done of loading a form.
RegisterClass(__classid(TButton));
RegisterClass(__classid(TEdit));
Regi...
Unfortunately I'm stuck with Borland C++ Builder and I need to recive UDP data. I have set up an TUDPSocket that can send data just fine, but I have no idea of how to get it to recive.
Does anyone have an example of that?
Do I need to set the LocalHost and LocalPort properties?
Can I use the OnRecive event?
The documentation I have f...
I'm familiar with using Delphi RTTI to access "simple" properties (ints/enums/strings, etc) but I cannot grasp how to work with Array properties.
I'm starting by looking for array equivalents for the GetPropValue/SetPropValue calls. I'd expect to see similar ones to these, but taking an extra "index" parameter, but can't seem to find a...
Where can I find API documentation for TComponent, TObject, TList, etc.? I am converting some C++ code that was written using C++ builder into C#. I'm having trouble finding related documentation for these classes in order to find a C# equivalent.
...
I'm trying to build several 'trees' in memory, and later assign one of them to a TTreeView control that the user can interact with. However, I can't construct any TTreeNodes objects without passing a pointer to an existing TTreeView. Passing in NIL causes AVs.
Two questions:- What's the reason for this "hard" linking between TTreeNodes ...
In the simplest possible terms (I'm an occasional programmer who lacks up-to-date detailed programming knowledge) can someone explain the simplest way to make use of the registry in codegear C++ (2007).
I have a line of code in an old (OLD!) program I wrote which is causing a significant delay in startup...
DLB->Directory=pIniFile->Rea...
In c++ builder 6 on windows vista ...
Graphics:: TBitmap * bmpscreencapture = new Graphics::TBitmap;
bmpscreencapture-> Height = Screen-> Height;
bmpscreencapture-> Width = Screen-> Width;
HDC ScreenSrc = GetWindowDC (0);
BitBlt (bmpscreencapture-> Canvas-> Handle, 0, 0, Screen-> Width,
Screen-> Height, ScreenSrc, 0, 0, SRCCOPY);
Canvas...
Hi everyone.
I have just switched from Builder 6 to Builder 2009 and have a question.
How can I write unicode string to a file?
TBytes Preamble1 = TEncoding::Unicode->GetPreamble();
UnicodeString str1("string1");
int len = TEncoding::Unicode->GetByteCount(str1);
FileWrite( iFile,&Preamble1[0],Preamble1.Length );
FileWrite( iFile,str...
Hi,
My message dilogs seem to disppear below the main form.
This only random. Most of the time it displays correctly on top, but some times disppear behind the main application form . What could be the reson?
Thanks
...
Is there any way to cancel or abort form creation from within the form's OnCreate event handler or C++Builder constructor?
Basically, I'd like to be able to call Close() from OnCreate or from the constructor and have it skip showing the form altogether. I have several forms that as part of their initialization may determine that they...
How can I mannually terminate an excel application using OLE Automation?
I would like to do this in some exception handling so that an excel process does not remain running if a function throws an error.
Currently I use the below code to open excel:
Variant excel = Variant::CreateObject("Excel.Application");
...
My company's main application is mostly written in C++ (with some Delphi code and components). We are upgrading from RAD Studio 2007 to 2010 for the next release, starting in about a week. What do I need to know to ensure this upgrade goes smoothly?
Points I have thought of so far are:
Unicode. This one looks really complicated. O...
Hello
It is a best practise to initialise a variable at the time of declaration.
int TMyClass::GetValue()
{
int vStatus = OK;
// A function returns a value
vStatus = DoSomeThingAndReturnErrorCode();
if(!vStatus)
//Do something
else
return(vStatus);
}
In the debug mode, a statement like this int vSt...
Can you suggest what factors can cause an C++ Builder's 2009 linker error "Unresolved external '__fastcall System::TObject::NewInstance(System::TMetaClass *)' referenced from XXX.obj"?
We have a set of Delphi files (pas) and set of C++ Builder files (hpp and obj), which was generated from these pas files.
Set of files is copied to anot...
Hi,
I have a bug somewhere that is causing my app to just vanish without an error message or something like that. The app just dissapears from the screen and it's no longer listed on the Task Manager.
The app is a C++Builder app (CBuilder2007), and I have tried everything I have think of to try to catch this error. It happens very very...
Hello,
I am required to support some software codes that were developed using C++ builder 6, and the current development environment is Codegear's C++ builder 2009. I wonder if the codegear's C++ builder 2009 is backward compatible with C++ Builder 6?
Any answer is appreciated.
Thanks in advance.
David.
...
Hello.
There is a need to pass CArray instance to an external DLL from my application written in C++ Builder. Is there a way to utilize MFC from C++ Builder? If yes, how?
Addendum: this DLL is not mine and I cannot change it.
...