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

Search:

Type: Posts; User: Arianax

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    1,632

    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'...
  2. 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...
  3. 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...
  4. Re: Resizing WinAPI Windows Console without text rearranging?

    I'm a beginner.

    What do you mean by "subclass the console"?
  5. 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...
  6. 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.
    ...
  7. 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...
  8. 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...
  9. 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 &&...
  10. 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() ==...
  11. 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:

    ...
  12. 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...
  13. [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...
  14. Re: CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    It seems it's far more simple to iterate through the LPENUM_SERVICE_STATUS_PROCESS struct than I previously guessed or grasped...

    I used this code, supplied for those who might also encounter this...
  15. Re: CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    The documentation advises against using that function because it changes with updates to the OS so its functionality cannot be guaranteed.

    I was thinking more along the lines of finding out a...
  16. Re: CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    Yes, of course.

    I'm aiming to try to list the Services hosted by each instance of 'SvcHost.exe'. I iterate through each process using Process32First and then Process32Next (called 'Process...
  17. [RESOLVED] CreateToolHelp32Snapshot and listing Services under Svchost.exe... How to?

    I have created a SnapShot of all the processes running by using CreateToolHelp32Snapshot.

    I then iterate through all the processes by using Process32First and Process32Next as detailed in the...
  18. Re: SetFocusRect with CheckBox (no .rc file). How to?

    Aaaaaand, it turns out the Checkbox automatically draws a focus rect when clicked on or when highlighted with tab.

    I just had a background that made it impossible to see the focus rect...

    For...
  19. Re: SetFocusRect with CheckBox (no .rc file). How to?

    Answering my own question here, heheh:



    Use GetDC(the Checkbox's HWND);
  20. [RESOLVED] SetFocusRect with CheckBox (no .rc file). How to?

    Can't seem to infer how to get a focusrect (dotted-line rectangle) around a WinAPI checkbox.

    Have tried DrawFocusRect() and also SendMessage() using SET_FOCUS. Maybe I got some parameters wrong?...
  21. Re: CreateDialog() without using Resource.h and '.rc' file..?

    Oh I found the error...

    I was forgetting to call DefWindowProc(hWnd, msg, WP, LP); in my AboutProc message handler:




    LRESULT CALLBACK AboutProc(HWND hWnd, MSG msg, WPARAM WP, LPARAM LP)
    {
  22. Re: CreateDialog() without using Resource.h and '.rc' file..?

    The dialog box doesn't appear.

    Main window becomes inactive when I call CreateWindow() but no Dialog Box appears.
  23. Re: CreateDialog() without using Resource.h and '.rc' file..?

    Oh... I found THIS:

    https://www.codeproject.com/articles/13330/using-dialog-templates-to-create-an-inputbox-in-c

    Let me know if there's anything else to add... :wave:
  24. CreateDialog() without using Resource.h and '.rc' file..?

    Trying to create a Modeless Dialog Box in WinAPI but without using a predefined Resource file.

    How would I go about doing that with CreateDialog()?

    Documentation states for the second...
  25. Re: Changing the Small and Big icons of a window using LoadImage... How to?

    IT WORKS!!!

    It turned out that I needed to convert the standard 24-Bit BMP file into a .ico file using a specialized Icon Converter piece of software.

    The only strange thing is:

    I still...
Results 1 to 25 of 43
Page 1 of 2 1 2


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)