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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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.
  16. Supernat03

    link mailto

    You can drop a web browser component, like one of the Indy components I think (I know there's one somewhere with BCB6). Then just set the data for the web component to be fixed text you define elsewhere or in a file, then when they see the web browser component, it will parse the html like you...
  17. Supernat03

    Open a file by dropping it over the form

    You can have any component that has a HANDLE (or Handle in Borland) parameter accept dragged files. To do this, call the Microsoft function DragAcceptFiles(Handle, true). To disable, set true to false. You can find more on this information in the Microsoft help files Win32 Programmer's...
  18. Supernat03

    dropping a file on programs icon or shortcut & opening

    I'm sorry, I wasn't very clear. The command line string returned is not just the parameters. It is the entire command line. You must then parse it with your own code. You should just parse it by spaces. Then check to see how many different strings were returned. The first string will...
  19. Supernat03

    OpenDialog : Get the adress (WORD *) of a file

    I don't understand what you mean by address. You want the memory address of the character pointer? You say *Addr = something before you ever assign Addr to a location. See, when you created Addr: WORD *Addr; It has no data, because it's not pointing to a WORD yet. So if you dereference it...
  20. Supernat03

    Active X controls help

    Yes, that should be possible. Do you have Build with Runtime Packages unchecked in the options menu? How did you integrate the activeX control into borland? Through the "Install ActiveX Control" menu? Chris

Part and Inventory Search

Back
Top