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

Search:

Type: Posts; User: Arianax

Page 1 of 3 1 2 3

Search: Search took 0.02 seconds.

  1. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    Referring BACK to my post where I simplified the code for you as an example (So you don't need to scroll around too much)...:

    Here is the code I'm working from now:



    char32_t tester = U'ฐ';...
  2. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    Weird... It is returning as value 224 (e0 in Hex).

    That translates to the character Ã* which is certainly not ฐ...

    I think the problem is that mbtowc() seems to be assuming the character it is...
  3. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    My guess is mbtowc() is either only reading the FIRST byte of the second argument output and then translating that into the WRONG character OR it's returning (null) when I do printf().

    What is the...
  4. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    Thank you for your reply @2kaud

    Unfortunately, even when I replace 'MB_LEN_MAX' with 'returned' I STILL get the results I described in my previous post (size of the wchar returned by mbtowc() is 1...
  5. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    I got confused so I started OVER with more SIMPLE CODE.

    Here is what I got so far:




    char32_t tester = U'ฐ';

    int returned = NULL;
  6. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    @2kaud



    I'm doing the following, but I get anomalous results and nothing prints to the console from printf("%C", wcResult ).



    wchar_t wcResult;
    int length2;
  7. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    @VictorN
    I'm giving MultiByteToWideChar a try right now. I'm just not sure how to output the result to the console, and if I'm supplying the char* to the MultiByte string correctly and so on.


    ...
  8. Re: mbtowc() - How do I convert it and how do I output the result to a wchar_t variab

    Thank you for your reply @2kaud. :)

    I have suspected that the current locale may not be correct.

    I'm not sure how to set it for windows. When I do
    setlocale(LC_ALL, ".utf8") I don't think it...
  9. mbtowc() - How do I convert it and how do I output the result to a wchar_t variable?

    Hi all,

    I converted a char32_t character with c32rtomb() into a char[sizeof(char32_t)] array.

    The converted character was a THAI LANGUAGE character with the U prefix before it.

    I'm not sure...
  10. PlgBlt() function is showing ghosted image of bitmap mask..?

    Hi all,

    Using the PlgBlt() function to draw rotated bitmap of a sprite to the screen.

    https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-plgblt

    I'm specifically using the...
  11. Replies
    1
    Views
    5,017

    Re: How to Rotate a Bitmap in WinAPI?

    Ok, so I've tried some mathematical transforms on the three (X, Y) coords required by the PlgBlt() function instead...

    Problem is, the origin of rotation seems to be stuck to (0,0) (The Upper-left...
  12. Replies
    1
    Views
    5,017

    How to Rotate a Bitmap in WinAPI?

    Hi all,

    This is all way over my head...

    Any ideas how to rotate a bitmap by a specified angle in WinAPI?

    I was told to use SetWorldTransform() and an xForm structure.

    However, I'm not...
  13. Replies
    1
    Views
    6,811

    Cross-Platform Keyboard Input - How To?

    I'm coding a program that, ideally, will work on Windows AND Linux. I would also, as a bonus, like it to work on Android.

    I need a way to wait for keyboard presses from the user. Not using 'cin'...
  14. Re: Resizing WinAPI Windows Console without text rearranging?

    SOLUTION


    The solution appears to be correct use of the function SetConsoleWindowInfo().

    By setting the dimensions of the console to the exact size of the buffer you don't trigger text...
  15. Re: Resizing WinAPI Windows Console without text rearranging?

    Yes, I followed this guide. It's quite effective.

    I also didnt know you could use
    ~WS_STYLENAME in the SetWindowLongA function to REMOVE WS_STYLE messages...

    Unfortunately, if the user...
  16. Re: Resizing WinAPI Windows Console without text rearranging?

    I'm a beginner.

    What do you mean by "subclass the console"?
  17. Re: Resizing WinAPI Windows Console without text rearranging?

    I write to the console as follows:

    I have an wchar_t* array of 3600 characters.

    The console has 120 characters per line and 30 lines (so that's 120 * 30 = 3600).

    I fill the character array...
  18. Resizing WinAPI Windows Console without text rearranging?

    Is there a way to prevent the text displayed in the Windows Console from rearranging when you resize the window?

    When you resize the window the text reformats itself to accommodate the new size.
    ...
  19. Exception Errors when doing 'Process Walking' with EnumServicesStatusEx...

    I'm getting a ton of seemingly random Exception Errors when doing Process Walking with Process32Next() and when enumerating Services associated with the process SvcHost.exe (found during Process...
  20. Re: [RESOLVED] EnumServicesStatusEx and Process Walking - How to allocate and free me

    The code is still triggering a range of Exception Errors if it is run more than once during the same execution...

    When I close the window that outputs the data from GetProcessNext() and...
  21. Re: EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    Found a fairly comprehensive set of functions() to do the requested operations now... especially thanks to your input @VictorN and @IgorVartanov :



    if(handleName != INVALID_HANDLE_VALUE &&...
  22. Re: EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    Yes, I know.


    EnumServicesStatusEx(SCM, SC_ENUM_PROCESS_INFO, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0, &pcbBytesNeeded, &lpServicesReturned, &lpResumeHandle, NULL);

    if(GetLastError() ==...
  23. Re: [RESOLVED] CreateToolHelp32Snapshot and listing Services under Svchost.exe... How

    Could you provide sample allocation code?

    I think I might be getting it wrong since I use the name of my LPENUM_SERVICE_STATUS_PROCESS struct as the handle to the memory allocation:

    ...
  24. EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    This is in C/C++:

    I'm doing Process Walking ( https://docs.microsoft.com/en-us/windows/win32/toolhelp/process-walking ) through a PROCESSENTRY32 struct made with...
  25. [RESOLVED] EnumServicesStatusEx and Process Walking - How to allocate and free memory?

    Got another question:

    About Memory Management in EnumServicesStatusEx().

    What's the best way to capture the amount of memory needed from the first call to EnumServicesStatusEx() (where the 5th...
Results 1 to 25 of 55
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured