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 Mike Lewis 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. 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
  16. gregha04756

    FTP file upload through proxy API function

    Hi RedLion, I'm no expert, but I took a quick look at the ISA webpage and noticed that there is a (free) client that you can install which evidently handles FTP through the proxy and allows applications to work as if the proxy was not there. Another thought is to try passive FTP, which I read...
  17. gregha04756

    Multiple threads in a DLL

    Hi HyperEngineer, I'm not an expert on thread synchronization, but an interested amateur. Instead of using the global member variableg_TelnetPipe->m_bStartSession = true; and the loop// Can't go anywhere until the main thread is ready. while(!(g_TelnetPipe->m_bStartSession)) // This...
  18. gregha04756

    postmessage() inside initdialog() crashing

    Lorey, The PostMessage() function is documented in the MDSN Library, at http://msdn.microsoft.com, also in the Platform SDK documentation. What arguments are you supplying to PostMessage()? Good Luck, Greg Hansen
  19. gregha04756

    Passing an array and using sizeof

    As Salem's post suggests, the argument s, in the definition of rev1, is a pointer. As such, the compiler evaluates sizeof(s) to be the size of a pointer, 32 bits or 4 octets. If you really need to know the length of the array of char's that s points to, you could use e.g. int length = (int)...
  20. gregha04756

    Add text to rich edit control

    From the Platform SDK documentation: ES_READONLY Prevents the user from typing or editing text in the edit control. Could this be the problem? Good luck, Greg Hansen

Part and Inventory Search

Back
Top