Click here to Skip to main content
15,904,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Need help with ODBC databases interfacing with C++. Pin
Rustamyan30-Oct-05 17:10
Rustamyan30-Oct-05 17:10 
AnswerRe: Need help with ODBC databases interfacing with C++. Pin
David Crow31-Oct-05 3:34
David Crow31-Oct-05 3:34 
QuestionHelp me(Name of Window???) Pin
Member 185845029-Oct-05 21:18
Member 185845029-Oct-05 21:18 
AnswerRe: Help me(Name of Window???) Pin
Dominik Reichl30-Oct-05 2:47
Dominik Reichl30-Oct-05 2:47 
QuestionI need ur help Pin
arifusman29-Oct-05 19:18
arifusman29-Oct-05 19:18 
AnswerRe: I need ur help Pin
Arman S.30-Oct-05 10:03
Arman S.30-Oct-05 10:03 
QuestionHow to show a Icon and a string on the same pane of the status bar? Pin
Tcpip200529-Oct-05 19:54
Tcpip200529-Oct-05 19:54 
AnswerRe: How to show a Icon and a string on the same pane of the status bar? Pin
Dmitriy Yakovlev31-Oct-05 7:48
Dmitriy Yakovlev31-Oct-05 7:48 
Yes, this is possible.
You need to use the CStatusBarCtrl::SetIcon method which sets the icon for a pane in a status bar.

If you are using the Prof-UIS CExtStatusControlBar class, then you can use the following code:
<code>bool bRet = m_wndStatusBar.AddPane( IDS_PANE_TEXT, 1 );
if( !bRet )
    return;

int nIndex = m_wndStatusBar.CommandToIndex( IDS_PANE_TEXT );
m_wndStatusBar.SetPaneWidth( nIndex, 100 );

HICON hPaneIcon = NULL;
HINSTANCE hInstResource =
    AfxFindResourceHandle(
    MAKEINTRESOURCE( IDR_PANE_ICON ),
    RT_GROUP_ICON
    );
ASSERT( hInstResource != NULL );
if( hInstResource != NULL )
{
    hPaneIcon = (HICON)
        ::LoadImage(
            hInstResource,
            MAKEINTRESOURCE( IDR_PANE_ICON ),
            IMAGE_ICON,
            16,
            16,
            0
            );
    ASSERT( hPaneIcon != NULL );
}

m_wndStatusBar.GetStatusBarCtrl().SetIcon( 
    nIndex, 
    hPaneIcon 
    );

IDR_PANE_ICON is a resource identifier of the icon.

Best regards,
Dmitriy Yakovlev
Questionsyntax error '&lt;' Pin
gr8coaster32929-Oct-05 19:39
gr8coaster32929-Oct-05 19:39 
AnswerRe: syntax error '&lt;' Pin
Ghasrfakhri29-Oct-05 19:22
Ghasrfakhri29-Oct-05 19:22 
QuestionRe: syntax error '&lt;' Pin
gr8coaster32930-Oct-05 4:49
gr8coaster32930-Oct-05 4:49 
QuestionRe: syntax error '&lt;' Pin
David Crow31-Oct-05 3:37
David Crow31-Oct-05 3:37 
QuestionRe: syntax error '&amp;lt;' Pin
gr8coaster32931-Oct-05 9:26
gr8coaster32931-Oct-05 9:26 
AnswerRe: syntax error '&amp;amp;lt;' Pin
David Crow31-Oct-05 9:49
David Crow31-Oct-05 9:49 
QuestionPrinting an image Pin
DanYELL29-Oct-05 17:07
DanYELL29-Oct-05 17:07 
AnswerRe: Printing an image Pin
Christian Graus30-Oct-05 11:41
protectorChristian Graus30-Oct-05 11:41 
GeneralRe: Printing an image Pin
DanYELL30-Oct-05 16:50
DanYELL30-Oct-05 16:50 
GeneralRe: Printing an image Pin
Christian Graus30-Oct-05 16:53
protectorChristian Graus30-Oct-05 16:53 
QuestionSPDRP_FRIENDLYNAME Pin
LiYS29-Oct-05 16:41
LiYS29-Oct-05 16:41 
QuestionCListCtrl Error Pin
Allad29-Oct-05 15:05
Allad29-Oct-05 15:05 
Questionnumber picker thingie Pin
alex@zoosmart.us29-Oct-05 12:11
alex@zoosmart.us29-Oct-05 12:11 
AnswerRe: number picker thingie Pin
Joe Woodbury29-Oct-05 13:06
professionalJoe Woodbury29-Oct-05 13:06 
GeneralRe: number picker thingie Pin
alex@zoosmart.us30-Oct-05 12:05
alex@zoosmart.us30-Oct-05 12:05 
GeneralRe: number picker thingie Pin
Joe Woodbury30-Oct-05 17:19
professionalJoe Woodbury30-Oct-05 17:19 
Questionsort structures Pin
kerrywes29-Oct-05 9:57
kerrywes29-Oct-05 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.