Vista "glossy text" effect

Windows specific questions.
bojan.dosen
Posts: 166
Joined: May 14, 2007 12:20
Location: Zagreb, Croatia

Vista "glossy text" effect

Postby bojan.dosen » Sep 16, 2008 15:04

Hi,
I'm searching on the Internet how to draw glossy text (text effect like in window title bar in Vista) in window with DrawThemeText or DrawThemeTextEx but I don't understand! It's for C++: <link>. Can you help me?
Thanks!
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Sep 16, 2008 15:18

Yeah, I can't stand the CodeProject, they do everything within their own little format.

Here is a short C tutorial from the original documentation.
http://msdn.microsoft.com/en-us/library/bb688195(VS.85).aspx

The WinAPI is a pain in the butt, ain't it.
bojan.dosen
Posts: 166
Joined: May 14, 2007 12:20
Location: Zagreb, Croatia

Postby bojan.dosen » Sep 24, 2008 19:43

I don't understand this part:

Code: Select all

if ((message == WM_NCCALCSIZE) && (wParam == TRUE))
    {
        // Calculate new NCCALCSIZE_PARAMS based on custom NCA inset.
        NCCALCSIZE_PARAMS *pncsp = reinterpret_cast<NCCALCSIZE_PARAMS*>(lParam);

        pncsp->rgrc[0].left   = pncsp->rgrc[0].left   + 0;
        pncsp->rgrc[0].top    = pncsp->rgrc[0].top    + 0;
        pncsp->rgrc[0].right  = pncsp->rgrc[0].right  - 0;
        pncsp->rgrc[0].bottom = pncsp->rgrc[0].bottom - 0;

        lRet = 0;
        // No need to pass message on to the DefWindowProc.
        fCallDWP = false;
    }

Can someone explain?
jofers
Posts: 1525
Joined: May 27, 2005 17:18
Contact:

Postby jofers » Sep 25, 2008 13:32

It doesn't appear to do anything, but if you're wondering what "reinterpret_cast" is, it's just an unsafe cast. If you use CPtr(NCCALCSIZE_PARAMS Ptr, lParam), you'll have the same effect.

Return to “Windows”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests