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
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...
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
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.