|
Hi, does anyone know where sources for B/B+ tree implementation can be found?
The main requirements are:
- fast access to an element by index
- fast writing to a file
|
|
|
|
|
alikalik wrote: Hi, does anyone know where sources for B/B+ tree implementation can be found?
See here[^].
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Nobody knows about, even Wikipedia [^], [^] (and you surely won't find links to C/C++ implementations at the bottom of the pages).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi
I have a MDI application. I don't want to use MDI default "ID_FILE_NEW". How can I manually implement this?
(1) What classes should I instance and create?
(2) The steps to do this?
Best regards,
|
|
|
|
|
transoft wrote: How can I manually implement this?
Implement what?
transoft wrote: (1) What classes should I instance and create?
To do what?
transoft wrote: (2) The steps to do this?
Steps for what?
Notice a theme here?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
I don't want to use MDI default "File-New" to instance a Child Window. I want to create Child Window myself. I need to do special processing during "File-New" process.
My question is: How can I implement the "File-New" operation without using MDI defaults? I don't want to use "Sending message "ID_File_New" message to Client window to get a Child Window. What is other way to do it (Instancing a new Child Window)?
Thanks,
|
|
|
|
|
Look in your app's BEGIN_MESSAGE_MAP() . See ID_FILE_NEW ? Just change the associated handler.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
That is what I don't want to do. I want to get rid of "ID_FILE_NEW". But I want to mimic the what "ID_FILE_NEW" does.
Do I need to instance and create "CSplitfrm", "CmyView, and "CMyDoc" class? How can I do it? what is sequence?
Thanks,
|
|
|
|
|
transoft wrote: I want to get rid of "ID_FILE_NEW".
Are you talking about the #define directive in afxres.h ?
transoft wrote: But I want to mimic the what "ID_FILE_NEW" does.
Have you looked at CWinApp::OnFileNew() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
It is so hard to explain what I want to do.
I want to totally forget ID_FILE_NEw. Just like there is no such "ID_FILE_NEW".
But I need to implement the same function (same with ID_FILE_NEW).
I know I have to do something with "CSplitfrm, CMyView, and CMyDoc" and set them up.
I want to know how to set all these up.
Thanks,
|
|
|
|
|
transoft wrote: I need to get rid of ID_FILE_NEW. Total forget it. Just like there is no such "ID_FILE_NEW".
Can't you just remove it (New) from the File menu?
transoft wrote: But I need to implement the same function (same with ID_FILE_NEW).
Which is why I suggested looking at CWinApp::OnFileNew()
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I want to instance CSplitfrm, view and doc classes to implement this new Child window function.
I can not find "CWinApp::OnFileNew()" implementation.
Thanks,
|
|
|
|
|
transoft wrote: I can not find "CWinApp::OnFileNew()" implementation.
Did you look in appdlg.cpp ? It just calls the document manager's OnFileNew() method. Look in docmgr.cpp for that implementation.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
It is complicate. Is there an easier way?
Thanks,
|
|
|
|
|
OS Windows XP and Vista. I would like to work with virtual port USB of the printer through CreateFile, ReadFile, WriteFile (for data transfer in the printer to give the command on the print, to clear the printer buffer, to receive its status, to give Printer Page Description and Markup Languages commands, etc.). For me virtual printer port HP LaserJet 1020 in system is designated as USB001. I tried to use the port name in CreateFile (\. \\USB001), it has turned out nothing. Prompt how to work, please, with the virtual printer port. In the Internet has found nothing, only concerning virtual COM ports. Then it would be desirable to understand with virtual port of the scanner.
Alex Tumanov
|
|
|
|
|
tumanovalex wrote: For me virtual printer port HP LaserJet 1020 in system is designated as USB001. I tried to use the port name in CreateFile (\. \\USB001), it has turned out nothing.
No, you don't open a USB port directly. What you will need to do is get a handle to the driver for that device. So, you have to know the driver symbolic name and use this one instead.
But, what are you trying to achieve exactly ? Because if you need to print something, there's probably a much better way to do that than to access the printer driver directly...
|
|
|
|
|
And how it is possible to define symbolic link of necessary driver USB of the printer? And how it is possible to access the printer driver directly? Me these two ways interest.
Alex Tumanov
|
|
|
|
|
Hi,
How can i populate system font names in combobox...
|
|
|
|
|
|
if possible please let me know how can i use in MFC dialog based project ..as im anew bie..
|
|
|
|
|
MFC does not have any special functions for this purpose. You can use this, I suppose:
int CALLBACK EnumFontFamExProc(
ENUMLOGFONTEX *lpelfe,
NEWTEXTMETRICEX *lpntme,
DWORD FontType,
LPARAM lParam
)
{
OutputDebugString(lpelfe->elfFullName);
return true;
}
CTestDlg::OnOK()
{
LOGFONT logFont;
logFont.lfCharSet = 0;
_tcscpy(logFont.lfFaceName, _T("\0"));
logFont.lfPitchAndFamily = 0;
EnumFontFamiliesEx(*GetDC(), &logFont, (FONTENUMPROC)EnumFontFamExProc, 0, 0);
}
Watch your debugger output window to see the results printed into it from the callback function.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Oh great, now he's gonna ask how to take the output from the debugger window and add it to a combobox.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Stop giving him hints, won't you?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I have a dialog based application. The dialog has a list control, few buttons, static text, edit box on it
I should be able to re size the dialog after the application is executing So when I re size the dialog, the controls in the dialog should also get re sized according to the size of the dialog, Can I know how to handle this.
Thanks..
|
|
|
|
|
See CResizableDialog[^].
Also, I don't think it is a good idea to resize each and every control. For instance, enlarging something like a checkbox along with the growing size of a dialog doesn't make sense. Things like static text and edit controls can be resized though... The article I pointed you to does pretty much does that and you might want to take a look at the code or use CResizableDialog directly in your project.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|