Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "SB_GETTEXT" in [All]

user32

.
Summary
I started trying to figure out how to use SB_GETTEXT many years ago when I was still new to C#. pInvoke in particular was always pretty confusing to me back then because of all the different C++ types. When does it matter whether I use int, uint, IntPtr, etc when they all seem to work?! Well I know now but that's another story... I was looking through my code archive and noticed my unfinished SB_GETTEXT code so I took another look and decided that it wasn't so confusing anymore (5 years later). I was never able to find good C# examples of SB_GETTEXT so I thought I'd share mine. Have fun!
.

     (UINT) SB_GETTEXT,   // message ID

.

    private const uint SB_GETTEXTLENGTH = WM_USER + 12;

.

    private const uint SB_GETTEXT       = WM_USER + 13;

.

        uint length = (uint)SendMessage(this._handle, SB_GETTEXTLENGTH, index, 0);

.

            // SB_GETTEXT tells the remote process to write out text to the remote memory we allocated.

.

            StatusBar.SendMessage(this._handle, SB_GETTEXT, (IntPtr)index, allocated);

.
Documentation
[SB_GETTEXT] on MSDN

 
Access PInvoke.net directly from VS: