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!

Recent content by gregha04756

  1. gregha04756

    How to use PostThreadMessage to close internet explore

    Try using TerminateProcess() instead of PostThreadMessage(). Good Luck, Greg
  2. gregha04756

    Problem reading from the serial port.

    Admittedly I have only limited experience programming with the COM port, so I hope I'm not wasting your time. That being said, would using the SetCommTimeouts() function have any impact? Setting the ReadTotalTimeoutConstant and ReadTotalTimeoutMultiplier may cause the overlapped event to become...
  3. gregha04756

    Problem reading from the serial port.

    In your call to CreateEvent(), the second parameter is "true" which creates a manual reset event. I think you have to explicitly call ResetEvent( hEvent ) right after CreateEvent() to set the event to non-signaled, otherwise WaitForSingleObject() just returns immediately. At least, I am quite...
  4. gregha04756

    C / Excel interface in Windows

    I'm not a database programming expert, but if you have full-blown Visual Studio with MFC, you can use CDatabase and CRecordset classes to create objects to read and write to an ODBC data source based on an Excel spreadsheet. At least, I recall doing this once upon a time. As for examples, I have...
  5. gregha04756

    C / Excel interface in Windows

    Why not just write an Excel macro in Visual Basic for Applications (VBA)? Does the application have to exist external from Excel? As xwb points out, you'll have to have Excel anyway.
  6. gregha04756

    Subclassing problem

    Oops, sorry, forgot, it's MFC...
  7. gregha04756

    Subclassing problem

    Doesn't GetDlgItem() require 2 arguments, the dialog handle and the item ID? e.g. HWND hDlgItem = GetDlgItem( hDlg, nIDDlgItem );
  8. gregha04756

    Plotting arcs in 3D space

    Also you might consider looking at the following: http://mathworld.wolfram.com/CubicSpline.html http://mathworld.wolfram.com/BezierCurve.html
  9. gregha04756

    Plotting arcs in 3D space

    Have you Googled "spline", or "NURBS" (Nonuniform rational B-spline)? Good Luck, Greg
  10. gregha04756

    WaitForMultipleObjects is not waiting

    Dumb question: have you tried using WaitForSingleObject on the individual handles? Good Luck, Greg
  11. gregha04756

    making a string from a double

    Yes, a much quicker way to get there...
  12. gregha04756

    making a string from a double

    From any page, Browse Forums, then Programmers, then Languages. C is 7th from the top in the right-hand column. Good Luck, Greg
  13. gregha04756

    structure that contains a pointer to a char

    I think all the statement ptrRecord = (struct Records *) malloc(2 * sizeof(struct Records)); does is allocate storage for the elements of the structure. It doesn't allocate any storage for the char array that comment is supposed to point to. You need to subsequently initialize comment...
  14. gregha04756

    Writing to Serial ports

    Hi Dandy1903, In addition to the references suggested by monkhandle, you may want to review the Communications reference section on MSDN at http://msdn2.microsoft.com/en-us/library/aa363194(VS.85).aspx You might need to use some of the fuctions described there, such as SetCommState(), if you...
  15. gregha04756

    Writing to Serial ports

    Hi Dandy1903, Sorry, don't know anything about Code::Blocks, but you could use Win32 API calls to talk to the serial ports. The CreateFile(), ReadFile() and WriteFile() functions would be the primary ones. Is the program intended to be GUI or console? Good Luck, Greg

Part and Inventory Search

Back
Top