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

Search:

Type: Posts; User: TubularX

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    112

    Re: Manifest files and VS2015

    Nevertheless, since VS 2005, there have been some changes in how deployment works. You might find these links interesting:
    ...
  2. Replies
    3
    Views
    117

    Re: How to make two pointers the same?

    It's only safe if you can guarantee that the lifetime of the original object outlasts all references to it.

    When the T object is finally destroyed, there must be no invalid pointers or references...
  3. Replies
    3
    Views
    117

    Re: How to make two pointers the same?

    What is m_components? A vector with unique_ptrs?

    You must learn how to use smart pointers correctly!

    AddCompenent will move a unique component into that vector, but that's not reflected by the...
  4. Replies
    3
    Views
    113

    Re: %(LinkOutputFile)

    You can specify the name of the lib in "Linker -> Advanced -> Import Library".

    https://msdn.microsoft.com/en-us/library/67wc07b9.aspx
  5. Replies
    10
    Views
    166

    Re: CImage reverse dimension cxcy !

    OK, then there's probably some orientation metadata in your original jpg file.

    Check this out:...
  6. Replies
    10
    Views
    166

    Re: CImage reverse dimension cxcy !

    Paint also shows it as 600 x 338...

    34429
  7. Replies
    10
    Views
    166

    Re: CImage reverse dimension cxcy !

    I tried with the file "WP_20160403_15_42_25_Pro.jpg" that you shared.

    The result is as expected:
    cx: 600
    cy: 338

    However, the width is not less than the height in the image you enclosed!
    ...
  8. Replies
    10
    Views
    166

    Re: CImage reverse dimension cxcy !

    Are you sure that your image is not corrupt or incomplete? Can you share it?
  9. Replies
    3
    Views
    113

    Re: %(LinkOutputFile)

    Yes, you can have a different target name for each configuration. You find this setting in "General" in "Project Properties".

    I think %(LinkOutputFile) refers to the setting "Output file" in...
  10. Re: Gobally available Service with scoped Lifetime

    More difficult than what?



    For example, here's a solution using a scope guard instead of your Provider:



    Graphics* graphics = nullptr;
  11. Re: How to call CreateProcess and Waitforsingleobject/ MsgWaitForMultipleObjects?

    You can call WaitForSingleObject unless you have a thread that creates windows.

    To wait until the other process has finished:



    DWORD result = WaitForSingleObject( info.hProcess, INFINITE );...
  12. Re: error: ‘pointCloud’ was not declared in this scope

    No, the "pointclouds.org" site is unrelated. It's a completely different library.

    Everything you need seems to be available in the QuickHull2D github.
  13. Re: error: ‘pointCloud’ was not declared in this scope

    I looked at the github link, and the definition is inside the file QHull.cpp:



    vector<Point2D> QHull::getPointCloud()
    {
    return pointCloud;
    }
  14. Re: Gobally available Service with scoped Lifetime

    Well, I'm not convinced with the idea of "global and scoped access". Isn't it just global state in disguise? What's the benefits compared to using a global pointer with a scope guard? The performance...
  15. Re: Gobally available Service with scoped Lifetime

    static Provider *s_pInstance;


    Looks static to me.

    Don't you need the graphics renderer during the whole lifetime of the application? Then with your solution the "scoped" object is practically...
  16. Replies
    2
    Views
    154

    Re: ellipses and macro definition

    The __VA_ARGS__ identifier is supported in VS2005, according to MSDN:

    https://msdn.microsoft.com/en-us/library/ms177415(v=vs.80).aspx



    #define PRINT_MSG(fmt, ...) printf(fmt, ##__VA_ARGS__)
  17. Replies
    9
    Views
    285

    Re: code is getting two errors.

    It should work if the file "account.h" is added to your project (possibly you need to specify a relative path).

    If it's not supposed to be, you may need to add the path to the configuration...
  18. Replies
    3
    Views
    206

    Re: Inheritance and array allocation issue

    Do you have any virtual method?

    It's missing in your posted code, but dynamic_cast requires that the base class has a virtual method.
  19. Re: MFC CObArray implemetation question

    The problem is that you call delete too early. The CPersona object is destroyed, and then the pointer that was added to m_arr points to a destroyed object.

    You should only call delete when the...
  20. Re: How to decrease the memory footprint of 3 different representations of data?

    I'm not sure what you mean in the third case "accessed by a 3D vector".

    But if you need to access by a specific index, then it means that the order of the elements matters to you?

    A hash key on...
  21. Re: Save function pointer in class member function

    You can consider using std::function.
  22. Re: How to put something by val in vector into a set by ref?

    Here's one way:



    std::vector<QuadNode>& walkables = GetLevel2Walkables();

    std::set<std::reference_wrapper<QuadNode>> setOfQuadNodes;

    for( size_t i = 0; i < walkables.size(); ++i )
    {
  23. Replies
    7
    Views
    389

    Re: backlashes in source code

    If you're new to macros, note that they are considered evil. For example, they are not type safe and can surprise you with incorrect conversions.

    There are better alternatives in C++. In your...
  24. Re: How to pass an array of objects as vector of shared_ptr or just a shared_ptr?

    Before you use shared_ptr you should understand its purpose and when it's appropiate to use it.

    It's typically used to manage the lifetime of a dynamically allocated object. By default it will...
  25. Re: Strange issue with shared_ptr in debug mode

    The DEBUG_NEW macro is often used in MFC applications to detect and track memory leaks. Then you need to include <afx.h> in the beginning of every cpp file. It's not related to shared_ptr, but any...
Results 1 to 25 of 187
Page 1 of 8 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


HTML5 Development Center