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

Search:

Type: Posts; User: John E

Page 1 of 80 1 2 3 4

Search: Search took 0.64 seconds; generated 10 minute(s) ago.

  1. Re: Checking characters in Glib::ustring

    Good suggestion Victor. I found a function called g_utf16_to_utf8()


    std::wstring infin = L"\u221e"; // Initialises to an infinity sign
    gchar* winCompatibleInfin = g_utf16_to_utf8...
  2. Re: Checking characters in Glib::ustring

    Thanks Victor - this won't compile (gives me error C2440: 'initializing': cannot convert from 'Glib::ustring' to 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>')

    ...
  3. Re: Checking characters in Glib::ustring

    Something just occurred to me... Glib::locale_from_utf8() returns std::string - so maybe std::string only supports simple strings - i.e. strings which can be represented by single characters?

    And...
  4. Re: Checking characters in Glib::ustring

    Sorry to resurrect an ancient thread but this is vaguely connected....


    Glib::ustring infin = _("\u221e"); // Should display an infinity sign

    The above code displays an infinity sign when...
  5. Re: Does #define change things that come before it?

    So presumably... #define isn't (strictly speaking) a preprocessor directive - because definitions can change within the scope of a file (so they'd need to get interpreted at compiler time??)
  6. Re: Does #define change things that come before it?

    The small one.[/QUOTE]

    Hmm... so what prevents it from being re-defined to GStructLarge? (apart from my typo !! )
  7. Re: Does #define change things that come before it?

    Wow, I didn't even know preprocessed output was available. Thanks.

    Although I'd guess it might be different for different compilers!!
  8. Re: Does #define change things that come before it?

    Sorry, that's just a typo...
  9. Does #define change things that come before it?

    Does #define change things that came before it? I'd always assumed it did because it's a preprocessor directive but I just found this code in a header file:-


    typedef struct _stat GStructLarge;
    ...
  10. Replies
    2
    Views
    931

    Re: Building a DPI aware app in VS2019

    After a bit more experimenting and measuring this morning, I realised that my old 4x3 monitor had a setting of 100 DPI whereas my super duper 4K monitor is only slightly higher (because it's a...
  11. Replies
    2
    Views
    931

    Re: Building a DPI aware app in VS2019

    An idea occurred to me... the above article mentions multiple monitors. So maybe if a user has monitors with different DPI settings, a DPI aware app will try to launch at the same size, regardless of...
  12. Replies
    2
    Views
    931

    Building a DPI aware app in VS2019

    Configuration Properties->Manifest Flle->DPI Awareness can be set to 3 x different values. Let's forget the Per Monitor setting for the moment 'cos that one's a bit complicated. So basically, the...
  13. Replies
    5
    Views
    897

    Re: wcscpy_s problem

    That's great, guys - thanks !!
  14. Replies
    5
    Views
    897

    Re: wcscpy_s problem

    So after all that... here's the problem I was trying to solve in the first place !!


    LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);

    IDS_APP_TITLE retrieves a value from my...
  15. Replies
    5
    Views
    897

    wcscpy_s problem

    What am I doing wrong here..?


    // Needed for wcscpy_s
    #include <string.h>

    // Later in the code
    wcscpy_s (some_destination, L"Hello World");

    The above code gives me error C2660:...
  16. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    You just beat me to it Victor! The good news is that /Zc:__cplusplus doesn't seem to be connected to the problem. basetsd.h defines SSIZE_T like this:-


    typedef LONG_PTR SSIZE_T, *PSSIZE_T;

    So...
  17. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    A quick question... if ssize_t was now a C++ type, should it show in the same colour as types like int / void etc? In my case int and void both show in a bright blue colour whereas ssize_t is a much...
  18. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    Thanks 2kaud. In my case, __cplusplus is showing up as 210402 so I'm a bit baffled at the moment.
  19. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    How strange... it does seem to be there so I'll need to figure out why it's not getting found any more :cry:
  20. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    The only problem I found in a more complex project is that one of its libs uses an internal variable called ssize_t which it defines like this:-


    #ifdef _MSC_VER
    typedef SSIZE_T ssize_t;
    #endif...
  21. Replies
    1
    Views
    1,425

    Something analagous to exp2f()

    I'm building a program with VS2019 but the main devs like it to be buildable with a wide range of compilers so I periodically check the build with VS2008.

    Recently, someone's added a call to...
  22. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    Looks promising Richard - thanks! I've only tried a simple project to experiment with but it did seem to work... I'll try something a bit more complex tomorrow :thumb:
  23. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    So somehow... I'd need to be able to add command line arguments in a .props file - in the same way that I can add Include directories / Library directories etc. I don't know if that's possible but...
  24. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    Thanks Victor - is MSBuild the same compiler that Visual Studio uses internally? I always thought it was a separate command-line utility. I remember that the VS linker is called clink.exe and the...
  25. Replies
    22
    Views
    3,253

    Re: __cplusplus number

    An idea just occurred to me... what about the .props file? Most of my projects share a common properties file so could something get added there that would have the same effect as /Zc:__cplusplus :)
Results 1 to 25 of 1998
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)