Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: 0xC0000005

Page 1 of 61 1 2 3 4

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    919

    Re: clipboard => string

    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...
  2. Replies
    21
    Views
    1,433

    Re: Copy to clipboard

    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...
  3. Replies
    3
    Views
    982

    Re: Unable to convert to PCWSTR

    You might try L"Hello World!" which should be a PCWSTR (pointer to constant wide-character string).
  4. Dispatch Interface name from Type Library

    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...
  5. Re: is there a way to tell what "class" a dialog item is?

    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:
    ...
  6. Millisecond resolution in date/time COM property

    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...
  7. Replies
    10
    Views
    1,229

    Re: string/wstring question

    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...
  8. Replies
    2
    Views
    825

    Re: Trouble reading file using CFile

    You might want to try FileDlg.GetPathName() instead of FileDlg.GetFileName().
  9. Re: how to calculate the points of a pentagon given the center?

    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);
  10. Replies
    10
    Views
    1,187

    Re: Interest Calculation Job

    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...
  11. Replies
    10
    Views
    1,187

    Re: Interest Calculation Job

    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 -...
  12. Re: How can read a unicode text file as character by character?

    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...
  13. Replies
    16
    Views
    1,730

    Re: Two threads walk into a loop. . .

    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!
  14. Replies
    16
    Views
    1,730

    Re: Two threads walk into a loop. . .

    No C++ help from me... am I the only one who wants to hear the punchline to the subject?
  15. Replies
    7
    Views
    922

    Re: Problem with COleDateTime Status

    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(),...
  16. View Post

    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...
  17. Equivalent of COleDispatchDriver in C++ / CLR

    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...
  18. Replies
    6
    Views
    3,436

    Re: How can convert a char array to CString?

    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...
  19. Re: How to derive const void pointer from CString?

    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:
    ...
  20. Replies
    6
    Views
    1,719

    Re: typedef a function question

    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...
  21. Re: what is valid range of port number to use sockaddr_in?

    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...
  22. Replies
    4
    Views
    1,138

    Re: Pi Calculator

    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...
  23. Replies
    5
    Views
    646

    Re: Figuring out interest

    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...
  24. Replies
    7
    Views
    668

    Re: UNICODE question and help needed

    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...
  25. Replies
    7
    Views
    999

    Re: COLeDispatchDriver class help.

    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...
Results 1 to 25 of 1510
Page 1 of 61 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center