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: *

  • Users: CMR
  • Order by date
  1. CMR

    How can I access a serial port in VC++?

    You can use ::CreateFile() to open the port and ::ReadFile() and ::WriteFile() to read from/write to the buffer. There should be some examples on the MSDN somewhere... CMR
  2. CMR

    Which control should I use?

    You can use an ordinary CEdit control for this. Look at the "styles" tab on the controls properties, check "Multi line" and "Want return" and you can use the CEdit as a multi line text control - and pressing Return won't click the default button while the edit...
  3. CMR

    command line parameters

    Check out the CCommandLineInfo class. You can create a new class that inherits from this and add specific command line handlers by overriding the "ParseParam()" member function. CMR
  4. CMR

    SQL Error in RELEASE mode only

    Thanks for the reply I managed to fix the problem - it was my silly mistake. One of the buffers I had allocated when I called SQLPrepare() was a local variable when it should have been global as I was calling SQLExecute() in a different function. It's always the simple problems like this that...
  5. CMR

    SQL Error in RELEASE mode only

    Hi all I'm executing a prepared SQL statement from within my code which is working quite happily in debug mode but fails in release mode. In my statement, I'm binding both columns and parameters then executing it repeatedly with different parameter values each time. This all work fine in debug...
  6. CMR

    Heap Error

    I don't think it's as simple as that. The problem seems to occur not when you copy the string, but when you next try to allocate memory - i.e. when you use "new" of something that dynamically allocates memory. I wasn't able to tell exactly which instruction it was falling over at (it...
  7. CMR

    Heap Error

    Found the problem: I had two CString objects, one local and one global. I was making the global one equal to the local one which waas causing problems when the local function went out of scope. Apparently, CString "=" doesn't copy each character as you might expect it to; it creates...
  8. CMR

    Heap Error

    Hello all I'm writing a Console application that supports MFC. Basically, it scans through a text file and updates a datbase with the data in the file. Pretty simple stuff - but I have a strange problem which I can only assume is related to memory management. I'm getting a heap error when I try...
  9. CMR

    User breakpoint when using CMap

    Hello all I'm having a problem using CMap with a structure. I'm mapping an ID number (long) to a pointer to a structure I've created: struct myStruct { int prop1; blah blah blah.... }; CMap<long, long&, myStruct*, myStruct*> myMap; The problem occurs when I try to use SetAt() for the first...
  10. CMR

    Hello All Is there any way I can

    Thanks for your help old bean I figured out a way of doing it using sub-reports but it isn't quite what you suggested. I used a subreport for the list and just had the totals as part of the main report (obvious, really...). Both subreport and totals were placed in the header of the report so...
  11. CMR

    Hello All Is there any way I can

    Hello All Is there any way I can divide a Crystal report vertically as well as horizontally? I Have a bunch of values which must be listed down the left of the page and various other bits of informtaion which must appear to the right (totals, etc). The values are set up in the report to be...
  12. CMR

    Image in a CHeaderCtrl

    This would be absolutely perfect - if I was using VC++6. Unfortunately I'm using VC++5 (sorry, I should have mentioned this) so the only thing I can't do here is get a pointer to my header control as CListCtrl::GetHeaderCtrl() was added in V6. If you know any other way I can get to the header...
  13. CMR

    Image in a CHeaderCtrl

    Anyone know if I can replace the text in a CHeaderCtrl above a CListCtrl with an image? Thanks CMR
  14. CMR

    Subreports and data sources

    Thanks guys I've found a bunch of functions on the CRPEJob class which should let me do what I want (GetNSubreportsInSection(), GetNthSubreportInSection(), GetSubreportInfo() and OpenSubreportJob()). Hopefully these will do the trick - I'll need to use them in much the same way as you have...
  15. CMR

    Subreports and data sources

    More information: It seems that not all the data is being retrieved from the wrong database - just that in the subreports (there are several subreports in this report - they constitute the bulk of the data). This would mean that LogOnServer() is working correctly - I'm also using...
  16. CMR

    Subreports and data sources

    Hi all. I have a report which I designed in Crystal 8 while connecting to database A. I have an application which tries to run the report on Database B. The problem is, when I run the application against database B and try the report, it is still connecting to Database A, even though I've...
  17. CMR

    CTime class

    You don't need to use a CTimeSpan object to do this, you can just use two CTime objects and get your age by using the GetYear(), GetMonth() functions etc. this example is only accurate to the month but you can modify it to be accurate to the day and it should give you an idea of what you need...
  18. CMR

    Wrapping Code

    There's no reason why you can't do it as in your example: char TaskId = array['A','B','C','D','E','F','G','H','I','J','K', 'L','M','N','O','P','Q','R','S','T','U','V', 'W','X','Y','Z']; separate elements of the array can be on different lines so the code is more readable, the compiler just...
  19. CMR

    Crystal Reports and a VC++ app?

    If you're using the CPREJob class, you could try using CRPEJob::SelectPrinter() CMR
  20. CMR

    GAH! File I/O!

    If you use CStdioFile (which inherits from CFile), you can use the functions ReadString() and WriteString() to process a text file line-by-line. CMR

Part and Inventory Search

Back
Top