Search:
Type: Posts; User: 0xC0000005
Search:
Search took 0.42 seconds.
-
September 7th, 2011, 05:39 AM
Although you have posted in the Windows API forum, the sample code you reference is for .net c++/clr and it will compile fine if you set the clr switch in your project. The syntax is different - but...
-
September 1st, 2011, 05:55 AM
You can't simply use a file name if you expect to find a file in the virtual store folder. This assumes that your current directory is already set to the virtual store folder which is probably not a...
-
You might try L"Hello World!" which should be a PCWSTR (pointer to constant wide-character string).
-
I have a COM Automation class that impelents a dispatch interface and coclass, and this project generates an ODL file that, in turn, generates a .tlb file (TypeLib). In the ODL file, I see something...
-
You can use Run-Time-Type-Information. MFC implements RTTI via MACROS and the CRuntimeClass structure.
Inside your CEditColor class definition (.h file), add this if it isn't already there:
...
-
I have a COM Automation object based on the MFC CCmdTarget class and one of its properties is a date/time stamp. Internally, the application acquires date and time via the SYSTEMTIME structure and a...
-
No, it does not make sense. What you have done here is stumble upon a solution that just happens to work. You should never use code like this in a project. What you need to do is address the real...
-
April 25th, 2011, 07:57 PM
You might want to try FileDlg.GetPathName() instead of FileDlg.GetFileName().
-
April 22nd, 2011, 10:11 AM
I had a few minutes and decided I needed the programming exercise, so...
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
const double PI = 4 * atan(1.0);
-
March 25th, 2011, 09:13 AM
With all due respect to your outstanding reputation here, it all boils down to whether or not you agree that 1/40 of a second is a long time to access a database record from a local C program, do...
-
March 25th, 2011, 05:54 AM
I am by no means an expert on databases, but if it really does take three days to do 10 million updates then that works out to about 38.58 calculations per second - or 25.92 ms per calculation -...
-
March 22nd, 2011, 06:11 AM
Just a few of the errors with your code:
(1) CFile::typeText | CFile::typeBinary - Conflicting types, besides being irrelevant for CStdioFile which always uses CFile::typeText regrardless of what...
-
January 4th, 2011, 10:15 AM
Two threads walk into a loop. Thread 1 says to Thread 2: "Who was that critical section I saw you enter last night?" Thread 2 says: "That was no critical section, that was my mutex!" bada booom!
-
January 2nd, 2011, 07:44 PM
No C++ help from me... am I the only one who wants to hear the punchline to the subject?
-
December 29th, 2010, 08:57 AM
You are not understanding the suggestion to debug it. You need to step into the MFC source code and determine exactly where the call is failing. MFC uses various time-related functions (time(),...
-
December 18th, 2010, 06:45 AM
There is nothing wrong with the conversion in your code. The problem is in reading the text file. I suspect that you are using a basic text editor that assumes ASCII characters and can't correctly...
-
December 17th, 2010, 09:03 AM
In an MFC project I want to add a wrapper class for an external COM object so I use "Add class from type library" and it generates an MFC class based on COleDispatchDriver. How do I do the...
-
November 29th, 2010, 10:37 AM
I suspect that the file contains UNICODE text.
// Assuming drwFile contains "ABC" or { 'A', 'B', 'C', 0 };
char charr[1000];
drwFile.Read(charr,500);
// str will be initialized correctly...
-
November 14th, 2010, 12:09 PM
CString has an LPCTSTR (long pointer to constant 'T' string) operator which will return a pointer to the string data. All you need to do is cast that to a const void pointer.
For example:
...
-
November 14th, 2010, 10:36 AM
Very good post by Eri523. I'd like to expand just a bit on this one statement.
One common use of the typedef / LoadLibrary() / GetProcAddress() method is to support the latest operating system...
-
November 12th, 2010, 09:25 AM
The field is an unsigned short so the range is 0-65535 subject to port availability as suggested in the list above. Note that lists like this are only a very general guideline since the majority of...
-
September 28th, 2010, 08:16 AM
If your need is to simply determine the digits in PI and not use this extended precision number in any calculations, then all you need is an algorithm. Sorry that I can't suggest one, but a Google...
-
September 27th, 2010, 09:38 AM
There's still something missing from your question. Simple loan amortization is relatively easy to calculate (for example, see http://www.hughchou.org/calc/formula.html). But using the standard...
-
September 26th, 2010, 10:15 AM
In general, yes, it is possible for UNICODE and ANSI to co-exist in a project where the application is of one type and the dll of another - it just requires a bit more care when exchanging strings...
-
September 16th, 2010, 08:34 AM
IDispatch, which is derived from IUnknown, is the basic object used for the Windows COM interface. Windows supplies an IDispatch for numerous objects and working with the IDispatch and IUnknown...
|
Click Here to Expand Forum to Full Width
|