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

Search:

Type: Posts; User: links

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,639

    Re: COM/OLE Automation - Excel

    Thanks for your reply. First time I've heard of ISAM! Sounds like something I need so I can create formatted XLS files.

    Is there documentation available for this ISAM driver for Excel?
  2. Replies
    3
    Views
    1,639

    COM/OLE Automation - Excel

    Access 2003 can export a table to Excel (newer versions can probably do the same).

    How do they do it? Do they use COM Automation?
  3. Replies
    2
    Views
    1,526

    Pass-by-value vs pass-by-reference

    From a multithreaded and multi-processor/core perspective, what would be safer, pass-by-value or pass-by-reference?

    I know there's no hard and fast rules, but what would you consider as a general...
  4. Thread: Design Pattern

    by links
    Replies
    3
    Views
    868

    Re: Design Pattern

    Thank you both for your replies, especially JVene for taking the time to highlight all the issues. I agree with you in that it will be best for me to learn a framework or two and take it from there....
  5. Thread: Design Pattern

    by links
    Replies
    3
    Views
    868

    Design Pattern

    I am working my way through Charles Petzold's Programming Windows. As all of you probably know his code samples are written in C.

    My problem is the layout of my programs. As my own test programs...
  6. Thread: Class design

    by links
    Replies
    14
    Views
    1,359

    Re: Class design

    Excellent and very useful responses. Thank you everyone, especially JVene for taking the time to write all that.
  7. Thread: Class design

    by links
    Replies
    14
    Views
    1,359

    Class design

    I understand the is-a relationship is implemeted in C++ via inheritence and that the has-a relationship is created by composition.

    With both of the above you end up with a more complex, single...
  8. Replies
    0
    Views
    857

    Visual Studio macros

    I want to ask a few questions about some of the macros Visual Studio 2008 defines.

    I see that VS always defines _WIN32. I can't find it anywhere in my project settings. Where is this defined?
    ...
  9. Thread: DLL issues

    by links
    Replies
    1
    Views
    554

    DLL issues

    I have just started out with DLLs and I am not sure about a couple of issues.

    I have read that one should preferably export functions using extern "C" so that other languages can call the...
  10. Replies
    3
    Views
    5,774

    WM_ERASEBKGND mania

    Maybe I'm missing something small but WM_ERASEBKGND is driving me mad.

    If I set
    wndClass.hbrBackground = (HBRUSH)::GetStockObject(BLACK_BRUSH); my main window opens normally and the background...
  11. Thread: Copy constructor

    by links
    Replies
    9
    Views
    1,048

    Re: Copy constructor

    Yes Zaccheus, that is (was) the idea. The newly created object gets the value of copy's _hService first and then copy's _hService is set to null.

    I rethought my class and made a few...
  12. Thread: Copy constructor

    by links
    Replies
    9
    Views
    1,048

    Re: Copy constructor

    Thanks for the replies.

    The reason that I do not declare the copy constructor as const is that I want my class to work like std::auto_ptr where only one object can hold the resource and others get...
  13. Thread: Copy constructor

    by links
    Replies
    9
    Views
    1,048

    Copy constructor

    My compiler is giving me the following error and I can't figure out why.

    rror C2558: class 'Service_handle' : no copy constructor available or copy constructor is declared 'explicit'
    ...
  14. Replies
    9
    Views
    4,785

    Re: Function call in initialization list

    Thanks for the link laserlight. Very insightful.
  15. Replies
    9
    Views
    4,785

    Re: Function call in initialization list

    If I understand you guys correctly I need to handle the possible throw from a function in the initializer list as follows:


    class C
    {
    public:
    C()
    try
    : a (10), b(20)
    {
  16. Replies
    9
    Views
    4,785

    Function call in initialization list

    Is it acceptable to call a function in a class initialization list?

    Consider:


    class Resource_handle
    {
    public:
    Resource_handle(HSOMETHING hSomething)
    : _resource(hSomething)
  17. Replies
    11
    Views
    4,796

    Re: CreateCompatibleBitmap

    Thanks for all the replies. You guys are really helpful.
  18. Replies
    11
    Views
    4,796

    Re: CreateCompatibleBitmap

    Isn't there a bitmap that is associated with a DC? If so, is there a way for me to access it so that I can get the width and height of the bitmap?
  19. Replies
    11
    Views
    4,796

    CreateCompatibleBitmap

    Is there a way to obtain the width and height (in pixels) of a DC?

    If you take the following code for example:


    HDC memDC = CreateCompatibleDC ( hDC );
    HBITMAP memBM = CreateCompatibleBitmap...
  20. Replies
    1
    Views
    491

    Function call operator

    Will someone please take the time to explain the exact difference between the following:


    int operator()() {return _num;}
    operator int() {return _num;}

    From what I read overloading operator...
  21. Thread: Error handling

    by links
    Replies
    5
    Views
    679

    Re: Error handling

    I have a further question about exceptions and classes.

    Is it best to handle exceptions in the class or outside it? (Or perhaps it depends on the circumstances and what you want to achieve?)

    To...
  22. Thread: Error handling

    by links
    Replies
    5
    Views
    679

    Re: Error handling

    Thanks for the link to the article. Unfortunately the article only discusses how exceptions work and doesn't answer my questions.
  23. Thread: Error handling

    by links
    Replies
    5
    Views
    679

    Error handling

    Since the Win API mostly use return codes and GetLastError(), what is the best way to do error handling when working with the API?

    Do I use exceptions? Something like:


    BOOL success =...
  24. Replies
    1
    Views
    1,506

    Function return value

    I'm having a problem with the DeviceIoControl() function in relation to batteries. I query the system's battery through different calls to DeviceIoControl() as detailed here -...
  25. Replies
    6
    Views
    542

    Re: Need Array Help Please

    As the above posters stated you should use a vector.

    You can try something like this. Just enter a non-numerical character to end the loop (e.g k)


    #include <iostream>
    #include <vector>
    ...
Results 1 to 25 of 87
Page 1 of 4 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)