|
As long as every DLL and the EXE links to a shared MFC DLL, then the EXE and DLL's can delete data allocated by eath other without any problems.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Both app and .dll's use MFC in a shared DLL... no joy...
|
|
|
|
|
I've contemplated using DB's but have decided not to bother becuz I like a challenge, actually I could prolly do with out that one (I don't know of any *free* db's...even mySQL requires money when used for commercial purposes) but still.
Anyways the question...
When you run a SQL insert on a database with say 100,000 records does the db engine ( at the lowest level) open the file make room in the file insert the item and perform/adjust all previous offsets to their new required values...???
This doesn't make sense...but neither does cacheing 100,000 items [1024 each] in in memory and calculating offsets as you save the file...???
Does a database keep it's records in sequential order for random access or is it more like a linked list so not a heck of alot of possible offset calculations have to be performed...???
Thanx in advance!
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
Does a database keep it's records in sequential order for random access or is it more like a linked list so not a heck of alot of possible offset calculations have to be performed...???
Database is free to keep the records in any order. It may add your records at the end of the file, it may use empty spaces from deleted records. I'm pretty sure db engines don't move records, as long as you don't defragment.
If your app requests particular order with 'ORDER BY' clause, database will use index if possible; if there's no index it'll sort records on the fly (which may take long time if there's lot of data - that's why you should use index).
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Tomasz Sowinski wrote:
Database is free to keep the records in any order. It may add your records at the end of the file, it may use empty spaces from deleted records. I'm pretty sure db engines don't move records, as long as you don't defragment.
Interesting...
Do you know of any resources where I might learn about the whole process...?
Anything but open source like mySQL...i don't wanna read 10000's of lines of code to figure how it all works...
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
|
Whaddya mean no free? Try writing some code using ADO and you'll have a free DB?
|
|
|
|
|
What about distributing DLL's or drivers and such...? Do you need permission from MS or anything first...?
I'm really looking for RDBMS source code you can just compile into your existing source...no need for third party files...
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Well I used DAO which generates MS Access style databases. The dll's or whatever is uses are all part of the Win32 API. This was succeeded by ADO which generates MS SQL style databases. I dunno if there's any newer API's that Microsoft recommends (maybe CDO ??)...databases aren't really my thing. The DAO stuff is well documented though.
|
|
|
|
|
Steven Gregg wrote:
Well I used DAO which generates MS Access style databases. The dll's or whatever is uses are all part of the Win32 API.
No, it's not.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
|
Is there a way to use images with different height in CTreeCtrl?
|
|
|
|
|
No, when they come from image list. You'd have to use custom draw.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
My application use DirectShow. I want to know that wether my app need DirectX for execute.
Thank you.
|
|
|
|
|
Didn't you answer your own question ?
To know what DLLs you need, just launch your app, and use one the tools provided along with VS : DLL dependency walker. You'll certainly see directx dlls.
DLL dependency walker is a static logger though, if you want to know dynamically which DLLs are loaded, then I recommend a far better tool : Christophe Nasarre's article on DLL hell,
And I swallow a small raisin.
|
|
|
|
|
QUESTION:
I still cant figure out what the heck is stream (System.IO.Stream) and what we need it for?
i'm a C++ user. If i need to store ANYTHING, whether it's a simple "double" or as complex as an array of CMyFunnyImage, i can always allocate a buffer:
unsigned char * pbuffer = new char [100];
i'm a bit newbie, but why do we need to serialize anything to a "stream"?? The following fragment serialize an xml document to a "MemoryStream". But i dont see why it didnt just serialize it to a "String" or a generic buffer "unsigned char"??
Sample code fragment, in VB.NET:
Dim HSBCWC As new Customer()
HSBCWC.ID = 08346
HSBCWC.FirstName = "Paul"
HSBCWC.LastName = "Bowie"
...
Dim stream As MemoryStream()
Dim serializer As New XmlSerializer( Customer.GetType() )
serializer.Serialize( stream, HSBCWC ) QUESTION 1: Why not serialize to a string as supposed to a MemoryStream? It would be much simpler rite?
...
stream.Flush() QUESTION 2: I dont understand why we need to flush? flush what from what? I thought HSBCWC has already been "flushed" to stream?
stream.Seek(0,SeekOrigin.Begin) however, I do understand why u need to Seek (rewind the stream).
...
Dim reader As New StreamReader(stream)
message.body = reader.ReadToEnd()
stream.Close()
SmptMail.Send(message)
I'm a newbie and pretty confused why we need "streams" in general. And i could find any decent explaination from MSDN (as usual).
norm
|
|
|
|
|
Hello,
I would like for my DialogBar class to update all it's values from my CDocument class. I've been told I need to add a new command ID and use WM_COMMAND. I know how to set up the DialogBar side of things, but I don't know how to send the command from the CDocument class. Any help or pointers to articles?
thanks!
JennyP
|
|
|
|
|
To send a WM_COMMAND message to your dialog bar object I think it would look something like:
// Somewhere inside CDocument
((CMainFrame*)AfxGetMainWnd())->m_MyDlgBar.SendMessage(WM_COMMAND);
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
JennyP wrote:
I've been told I need to add a new command ID and use WM_COMMAND
I don' think you need new command ID. Rather, you should provide ON_UPDATE_CMD_UI handlers for controls hosted in dialog bar using their control IDs.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
How can i hook text , when i move mouse pointer over it ?
In IE , for example (HTML - text).
And more interesting - how i can to do it in any kind of applications (MSWord, etc.) ?
Thank You !
|
|
|
|
|
Actually i think this question gets asked enough that CG suggested Mike enter it in his C++ FAQ...you might wanna check it out...
Basically and easily you can't...however you can probably get away with text capture w/ HTML documents because IE (actually the IWebBrowser2 object) supports OnMouseOver & OnMouseOut events for all elements so you could probably take control of that object some how and use IE's innerHTML property and extract the text the mouse is currently over...for that matter you could then change it by setting the property...
I'm pretty sure other other programs like MS word wouldn't allow this becuase they probably use CRichEditCtrl which doesn't support the same events as IWebBrowser2 com object.
hooking text otherwise is almost impossible requiring character recognition or something like that...
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Does anyone else pull their hair out trying to find what you're looking for using the MSDN search tool?
I usually enter a few key-words and the best 'hits' (by rank) are Q&A articles for FAQs which are 100 pages long and are ranked high because each of my key-words is used in separate sections of the FAQ---thus I don't find what I'm looking for after skimming the document--wasting 10 minutes in the process. Has anyone found a better method for quickly arriving at the spot you want?
thanks!
JennyP
|
|
|
|
|
Yup...google is your friend...
If i can't find it using the index I look to the CP or Google..
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
JennyP wrote:
Has anyone found a better method for quickly arriving at the spot you want?
Using " and " ?
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Would it be un-reasonable to have this error catching technique encapsulate(???) every function/method...???
Even if it were to make catching bugs in a distrubuted remote application a lot easier...???
Just curious...
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|