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.01 seconds.

  1. 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...
  2. Replies
    1
    Views
    550

    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...
  3. Replies
    1
    Views
    550

    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...
  4. Replies
    1
    Views
    4,179

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

    I'm a beginner.

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

    ...
  15. 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...
  16. [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...
  17. 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...
  18. 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...
  19. 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...
  20. [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...
  21. 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...
  22. Re: SetFocusRect with CheckBox (no .rc file). How to?

    Answering my own question here, heheh:



    Use GetDC(the Checkbox's HWND);
  23. [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?...
  24. 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)
    {
  25. 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.
Results 1 to 25 of 46
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured