Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Supernat03

  1. Supernat03

    Ansistrings FileRead

    c_str() is a function and can't be assigned a value. You can cast the character pointer to an ansistring though. char CharBuf[100]; AnsiString Value; FileRead(FilePtr, &CharBuf, 99); CharBuf[100] = NULL; Value = (AnsiString)CharBuf; I can't remember, but I don't think you even need the...
  2. Supernat03

    _matherr doesn't catch the exception

    Could you post more code? Like where are you using the try/catch block? Who's throwing the exception? etc... Chris
  3. Supernat03

    Question about 16-bit waveform audio data

    Can you post the code? Instead of using memcpy, you could also bitwise OR them. int x=0; x = (int)((unsigned short int)byte1 | (((unsigned short int)byte2) << 8)); This produces a word from two bytes, then casts it to an int. Chris
  4. Supernat03

    MouseWheel event not fired with TImage

    You said it works okay on windows 98 if you compile under version 6.0? It sounds like a compiler version issue, but it could be an MFC version issue. Maybe contact Borland with this info and they can look into it. Chris
  5. Supernat03

    how to read/write binary data from/to files

    You can create a header structure in the file that contains information about what's in the file. i.e. you might store how many sound clips are in the file, the sizes of each clip, and properties of each clip. Then use the header information to access items in the file. Chris
  6. Supernat03

    spliting files into many parts

    It depends largely on the file type. You could split it as long as it's a raw format and as long as you place the correct header data in the new file. If it is compressed, it becomes much more difficult, but still do-able. I agree with Totte. It would be better time spent to find a program...
  7. Supernat03

    inserting into the middle of a file

    I'm no database expert either, but I think that some of them put the database into memory, and changes must be committed (i.e. saved to file) before they get saved. That way, moving things in memory is fast. I could be wrong though, just seems like I read that somewhere. Chris
  8. Supernat03

    creating folders/sub directories

    AnsiString CurDir = GetCurrentDir(); AnsiString NewDir = CurDir + "\\NewDirectory"; CreateDir(NewDir); Chris
  9. Supernat03

    Task bar Messages ?

    I would check out the MSDN pages at Microsoft. I don't think Borland has that capability inherently (at least not up to version 6.0). You'll have to call a Microsoft MFC function or something out of an SDK they might have for download. Chris
  10. Supernat03

    AfterScroll Event in a derived class

    As a simple example: MyClass.h file class MyClass : TObject { private: TNotifyEvent FOnSomething; public: __published: __property TNotifyEvent OnSomething = {read=FOnSomething, write=FOnSomething}; }; MainForm.h file class TMainForm : TForm { //usual stuff here... MyClass...
  11. Supernat03

    Terminate a thread?

    This is a little tricky. It depends on how you use the thread. If you are going to create the thread many times in a program instance, you need to be careful. If you just create the thread when the program starts up and destroy the thread when the program ends, you can just call Terminate()...
  12. Supernat03

    Self-deleting

    I would think you could write a simple bit of executable code that's only job is to delete another set of files when you're done with them, copy that executable into memory and run it from there. This is what some viruses do. Chris
  13. Supernat03

    Using an image list for animation (or something better?)

    Not off the top of my head, but if you check out tucows or download.com, you will be sure to find something. Chris
  14. Supernat03

    Crash on main form close

    Maybe you should be performing some actions. Generally, a crash like that would be some object, class, or COM that was not correctly destroyed. Do you have anything dynamic that you're creating or threads that are executing?
  15. Supernat03

    Using an image list for animation (or something better?)

    Make them an AVI in another program. Then load them into a TAnimation object.

Part and Inventory Search

Back
Top