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

Search:

Type: Posts; User: 2kaud

Page 1 of 80 1 2 3 4

Search: Search took 0.30 seconds.

  1. Replies
    2
    Views
    108

    Re: split string function

    string_split is splitting a string at ' ' into a vector. The marked code removes duplicate spaces (makes multiple ones into just 1). It uses the std:: duplicate() function with a lambda. The result...
  2. Replies
    6
    Views
    1,198

    Re: Capture mouse position

    ScreenToClient() see https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-screentoclient
  3. Re: Obtaining LogonDomain for logged on Windows Active Directory user

    Possibly - but it's a bit a long shot. Use Sysinternals Process Monitor to monitor the registry activity for Sysinternals BGInfo. You might find where BGInfo is getting its info.

    Mark knows more...
  4. Re: Do header files with implementation work in a precompiled header?

    Have you got the headers that you want to be pre-compiled included in the right header file set up for pre-compilation? What option for pre-compilation are you using - create or use? Don't put these...
  5. Re: Obtaining LogonDomain for logged on Windows Active Directory user

    This is a c# replacement for BGInfo - but there is source available so you might discover how its done.

    See https://github.com/zodiacon/BgInfo
  6. Re: Obtaining LogonDomain for logged on Windows Active Directory user

    See https://stackoverflow.com/questions/2825385/wtsquerysessioninformation-returning-empty-strings
  7. Re: Where is the list for MRU projects in VS2019 ?

    Ah so..... See https://social.msdn.microsoft.com/Forums/en-US/f636ee47-1eb7-45ed-ae2a-674cbabb8b2c/clear-mru-list-in-visual-studio-2017

    Since VS2017, it uses a private hive. Doh! So you have to...
  8. Re: Where is the list for MRU projects in VS2019 ?

    No - but just do a full registry search for the name required. Use regedit then edit/find then findnext
  9. Re: Do header files with implementation work in a precompiled header?

    Pre-compiled headers are for header files that don't change very much. If you are still making changes to pre-compiled header files, don't include them for compiled headers - just use them as normal....
  10. Re: Obtaining LogonDomain for logged on Windows Active Directory user

    Have you tried the ASCII version (WTSQuerySessionInformationA)
  11. Re: Obtaining LogonDomain for logged on Windows Active Directory user

    Are you compiling as ASCII or Unicode? If as Unicode then LogonUserName is a wide which would display as blank using ASCII.
  12. Re: [RESOLVED] Filter a txt file based on an Excel data sheet

    :wave: :thumb:
  13. Re: Code abstraction using the preprocessor vs interfaces?

    I've done very little x-platform coding, but where I have I've used include file(s) for each specific platform code and then used #ifdefs. eg



    #ifdef Windows
    #include winclass.cpp
    #endif
    ...
  14. Replies
    2
    Views
    418

    Re: template deduction

    SetIllegalValue<unsigned char>(pRaster, 0);
    ...
    template<typename RastType> void PredictionRaster::SetIllegalValue(AIBaseRaster *pRaster, RastType illegalValue)


    When SetIllegalValue is used,...
  15. Re: Filter a txt file based on an Excel data sheet

    Is the original provided vba code working as expected? If yes, please attach the original .xlsm vba code that I used for the conversion, and the converted C++ code and I'll have a look. If the...
  16. Re: Casting references VS Casting the mem address of that reference?

    read the documentation at the given link.
  17. Re: Casting references VS Casting the mem address of that reference?

    Neither should be used. In C++ you would use a dynamic_cast for a downcast - not a 'c' style cast.



    Subclass &myref = dynamic_cast<Subclass&>(base_class_object_ref);


    For an upcast, you...
  18. Re: Filter a txt file based on an Excel data sheet

    To to be able to choose the input file (file to purge), consider for the last program from post #11:



    #import "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE14\\mso.dll" \...
  19. Re: Filter a txt file based on an Excel data sheet

    Do you mean the input file name - or the xlsm filter file name?
  20. Re: Filter a txt file based on an Excel data sheet

    Windows WIN32 APIs provide a control for selecting files via a window - although I haven't programmed with WIN32 for many, many years, I'll see what I can do.

    There is also MFC which is geared to...
  21. Re: Why does this simple file read method does not work?

    When I saw NULL I wondered if you had programmed in C. Unless using C-type functions, NULL isn't used in C++. nullptr is used to indicate that a pointer is 'null' - not NULL. But 'raw pointers'...
  22. Re: Why does this simple file read method does not work?

    Yes. An access violation for fail/bad is only thrown if so configured. Otherwise you need to test the status bits. By default, if the open didn't work then the status wouldn't be good and so the file...
  23. Re: Why does this simple file read method does not work?

    Instead of:


    return NULL;


    try:


    return "";
  24. Re: Why does this simple file read method does not work?

    The catch clause should be by ref:



    catch (std::ifstream::failure& e)
  25. Replies
    4
    Views
    629

    Re: Java NetBeans Related Project

    Beginner projects?????
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)