Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Feature request: cue banner support Collapse All
Subject Author Date
Jase Wolfe Aug 20, 2007 - 1:37 PM

I was wondering if cue banner support was in the plans for any future version of Prof-UIS?

I know Windows XP and newer OS controls support cue banners natively, but any pre XP controls do not.

Would it be possible to add this or is it planned?

Technical Support Feb 6, 2008 - 1:32 AM

Your project is displaying the cue banner in the correct way and we have found no problems. We believe the problem may have to do with something else. We sent you the updated ExtEdit.h and ExtEdit.cpp files by email.

Jase Wolfe Feb 4, 2008 - 2:24 PM

Project was sent from my hotmail account and is named CueBanners.


Technical Support Feb 4, 2008 - 12:32 PM

Please create a smallest possible test project which reproduces the problem and send it to the support mail box at this web site.

Jase Wolfe Jan 31, 2008 - 1:52 PM

Thank you for the excellent code. It works perfectly in your sample ProfUIS-Controls sample project.

I am still, however, having problems in my own projects. I have checked all the project settings between my own project and the ProfUIS-Controls sample project, and changed my own properties to match. I am still getting the Procedure Entry point runtime errors.

I’m still quite new to C++ programming in a Windows Environment and this is a learning experience for me.

Thanks again for such a great product.

Technical Support Jan 31, 2008 - 4:19 AM

Here is the latest version of the editor. You should not have any problems with it. If you are using Visual Studio .NET/2002/2008, then please also check the compiler’s Code Generation settings of your project. The wchar_t as built-in type setting should exactly be the same as in the ProfUISDLL project’s settings. It’s possible to compile your project with the different version of this option, but this requires a special build of Prof-UIS (see this article).

Technical Support Jan 31, 2008 - 3:43 AM

Here is the final version.

Jase Wolfe Jan 30, 2008 - 8:39 AM

I switched out the ExtEdit.h and ExtEdit.cpp files in the ProfUIS.dll project with the ones in the download. I’m still getting the same errors at Runtime.

The exact error is:

The procedure entry point ?SetCueBanner@CExtEditBase@@QAEHPB_W@Z could not be located in the dynamic link library ProfUIS282ud.dll.

Also, when IntelliSense brings up the Properties list after a control reference, SetCueBanner and GetCueBanner are not listed. I’ve looked at the code in the files, and I don’t understand why those methods aren’t available in CExtEdit if it inherits from CExtEditBase.

Thanks for the assistance.

I’m building on a W2K SP4 machine.

Technical Support Jan 30, 2008 - 2:17 AM

We put your code into the CExtEditBase class and fixed the compile errors. Here are the updated source code.

Jase Wolfe Jan 28, 2008 - 10:11 AM

I’m attempting to add cue banner support to CExtEditBase by adding 3 functions to CExtEditBase including:

public BOOL SetCueBanner(LPCWSTR lpcwText);
public BOOL GetCueBanner(__out_ecount_z(cchText) LPWSTR lpwText, __in int cchText);
protected afx_msg void OnPaint();

I used the same functions in a class derived from CExtEdit and this worked extremely well. But I would like the support to be in more than just edit controls.

However, when I add these functions to CExtEditBase class, I am getting Entry Point Not Found errors for all three functions. Here is the code that was added to the CExtEditBase class declaration/implementation:

ExtEdit.h -

    LPCWSTR m_lpcwText;
    BOOL SetCueBanner( LPCWSTR lpcwText );
    BOOL GetCueBanner( __out_ecount_z(cchText) LPWSTR lpwText, __in int cchText );
    afx_msg void OnPaint();

ExtEdit.cpp -


void CExtEditBase::OnPaint()
    // Let base class do it’s thing

    // Now we can do our painting for cue banner stuff
    if (( GetWindowTextLength() > 0 ) || ( GetFocus() == this ))
        TRACE0( "Not processing CueBanner support.\n" );

    // Text drawing flags

    CPaintDC dc(this);
    CDC *pDC = &dc;

    CFont font;
    LOGFONT lf;
    memset( &lf, 0 , sizeof( LOGFONT ));
    if ( g_PaintManager->m_FontNormal.GetLogFont( &lf ))
        lf.lfItalic = TRUE;
        VERIFY( font.CreateFontIndirect( &lf ));

    CFont* def_font = pDC->SelectObject( &font );
    CRect lpRect;
    GetClientRect( lpRect );
    pDC->SetTextColor( g_PaintManager->GetColor( COLOR_GRAYTEXT ));
    pDC->DrawText( m_lpcwText, -1, lpRect, nFlags );
    pDC->SelectObject( def_font );

BOOL CExtEditBase::SetCueBanner(LPCWSTR lpcwText)
    ASSERT(lpcwText != NULL);
    m_lpcwText = lpcwText;
    //LPWSTR lpwstr = L" ";
    //wcscat(lpwstr, lpcwText);

    return TRUE;

BOOL CExtEditBase::GetCueBanner(__out_ecount_z(cchText) LPWSTR lpwText, __in int cchText)
    ASSERT(lpwText != NULL);
    //lpwText = new WCHAR[ cchText + 1 ];
    wcscpy( lpwText, m_lpcwText );

    return TRUE;

I have obviously screwed something up, but cannot figure out what.

Technical Support Aug 22, 2007 - 12:35 PM

We have added the following to our TO-DO list:

implement watermark/cue banner support in the CExtEditBase class.