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 SkipVought 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. jnecciai

    Using Froms from Packages

    Hello all. I know (think) I've done this in the past but ... I want to put a collection of forms (TForm) into a package. Most of the forms will be created from within the package via "wrapper" functions (ex. ShowMyForm()). When I attempt to call ShowMyForm from the application...
  2. jnecciai

    Problem with ReadFloat

    I'm using the TIniFile ReadFloat mehtod. (I've used this many times before). I actually have the same call in two different projects. The first project works, the other project fails on every ReadFloat call. (The other Read... methods work fine). (They are reading the same ini file). Here is...
  3. jnecciai

    Utilizing Tag property w/ For loop?

    I'm sorry, the '57' was left over from a previous post. The code in the last post simply loops through all of the controls on the form. When it finds a TBitBtn, it gets a handle to the button and sends a windows "Click" message to it. You will still need to utilize the tag IF you...
  4. jnecciai

    Getting Directory list using API

    Hmm ... it looks like it should work. However, SHGetFileInfo may not always return the same ImageListHandle. This is because there are many different System Image Lists. You are setting handle of your ImageList1 to this returned value each time through the loop. When the ImageList Handle is...
  5. jnecciai

    Terminate External Program

    This task is easy if your application Spawned/Shelled the other application with the CreateProcess API function. If your application did NOT launch the other executable, then You need to get a Handle to the other program's main window. (This is where the WindProc resides). Once you have this...
  6. jnecciai

    Utilizing Tag property w/ For loop?

    Ok, I think I understand where you are going ... How about this: int i; HWND hwBtn; // Handle of TBitBtn AnsiString sClsName; // Loop through the controls on the form // enabling all of those whos tag contains 57 for(i=0;i<this->ControlCount;i++) {...
  7. jnecciai

    Getting Directory list using API

    I'm not sure how you're looping through the directories, but the code you have seems to work for me (with the exception that the SHGetFileInfo does not return an Image Handle). BTW, what are you doing with info.iIcon? Are you using the system image list? Just curious...
  8. jnecciai

    Utilizing Tag property w/ For loop?

    In your original question, you wrote &quot;... right now I'd have to write 80 lines of &quot;if else&quot; statements ...&quot; Could you give me an example of one of these if else statements? Maybe it will help me understand your intentions a little better. As for the example, it just loops...
  9. jnecciai

    opening a text files and adding into ListBox

    You probably want to look at the TStrings::LoadFromFile method. ex. ListBox1->Items->LoadFromFile(&quot;c:\\myfile.txt&quot;); Hope this helps.
  10. jnecciai

    Getting Directory list using API

    Did you try using the FindFirstFile and FindNextFile API functions with the dwFileAttributes member of WIN32_FIND_DATA structure set to FILE_ATTRIBUTE_NORMAL? The header file for the GetFileAttributes function is winbase.h (kernel32.lib). You can use it like this: DWORD dwType...
  11. jnecciai

    Capture specified part of a string

    This may also give you the desired result ... although, probably not optimized ... char MyStr[200]; char ResultStr[50]; char *ptr; int Pos1, Pos2; strcpy(MyStr, &quot;[Something]NameOfPerson:SomethingElse&quot;); ptr = strchr(MyStr, ']'); Pos1 = ptr-MyStr + 1...
  12. jnecciai

    System idle time

    You may also want to check our the SetPriorityClass API function. If you set the priority class of your process/thread as IDLE_PRIORITY_CLASS, it will only run when the system is idle.
  13. jnecciai

    Sample Batch files

    This link may help ... http://www.computerhope.com/batch.htm
  14. jnecciai

    How do I get the dimensions of a string?

    You can download the API documentation from http://msdn.microsoft.com. What you need to do is download the Platform SDK. (you do not have to be a subscriber). This contains all of the Windows API reference material. Hope this helps...
  15. jnecciai

    Shellexexcute again.... :(

    I was able to reproduce this. Try SW_SHOWDEFAULT (instead of 0) as the last parameter. This worked for me.
  16. jnecciai

    Utilizing Tag property w/ For loop?

    I hope this helps ... You could do something like this to &quot;filter&quot; on the tag property: // Loop through the controls on the form // enabling all of those whos tag contains 57 for(i=0;i<this->ControlCount;i++) { TControl* ctrl = this->Controls[i]...
  17. jnecciai

    TImage and TJpegImage Question

    Hi all ... I have Jpeg data in a memory buffer (it was not read from a file). I am currently using the following code to show the Jpeg image in a TImage control. ms->Clear(); ms->Write(JpgBuf, this->ulFrmDataLen); ms->Seek(0, soFromBeginning); jp->LoadFromStream(ms)...

Part and Inventory Search

Back
Top