Click here to Skip to main content
15,891,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Didn't explain myself good Pin
Nelek19-Sep-07 2:08
protectorNelek19-Sep-07 2:08 
QuestionRe: don't understand MSDN explanations. Can someone explain this? Pin
David Crow19-Sep-07 3:04
David Crow19-Sep-07 3:04 
AnswerRe: don't understand MSDN explanations. Can someone explain this? Pin
Nelek19-Sep-07 20:28
protectorNelek19-Sep-07 20:28 
GeneralRe: don't understand MSDN explanations. Can someone explain this? Pin
David Crow20-Sep-07 2:42
David Crow20-Sep-07 2:42 
GeneralRe: don't understand MSDN explanations. Can someone explain this? Pin
Nelek20-Sep-07 4:12
protectorNelek20-Sep-07 4:12 
GeneralRe: don't understand MSDN explanations. Can someone explain this? Pin
David Crow20-Sep-07 4:30
David Crow20-Sep-07 4:30 
JokeRe: don't understand MSDN explanations. Can someone explain this? Pin
Nelek21-Sep-07 1:47
protectorNelek21-Sep-07 1:47 
QuestionFonts Pin
Waldermort18-Sep-07 22:57
Waldermort18-Sep-07 22:57 
I have created a custom control which contains two buttons. I want these buttons to display the same arraows which are displayed on a scrollbars buttons. So, I create a font using the Marlett face name and instruct the button to use this font via WM_SETFONT. I also set the buttons text to "3" 4, 5 or 6 ( which maps to the arrows ). But the button still displays the number instead of the arrow. The marlett font doesn't contain any ASCII characters, it's all pictographs!

I have verified that the button is using the font via WM_GETFONT. Everything appears to be correct except that the arrows are not being displayed. Any clue as to what's gone wrong?

HFONT hFont = NULL;
    
hFont = (HFONT)SendMessage( m_hButtonUp, WM_GETFONT, 0, 0 );
if ( ! hFont )
    hFont = (HFONT)GetStockObject( DEFAULT_GUI_FONT );
if ( ! hFont )
    hFont = (HFONT)GetStockObject( ANSI_VAR_FONT );
    
if ( hFont )
{
    LOGFONT lf;
    GetObject( hFont, sizeof( LOGFONT ), &lf );
    
    _tcscpy_s( lf.lfFaceName, LF_FACESIZE, _T("Marlett") );
    
    hFont = CreateFontIndirect( &lf );
    
    SendMessage( m_hButtonUp,	WM_SETFONT, (WPARAM)hFont, TRUE );
    SendMessage( m_hButtonDown, WM_SETFONT, (WPARAM)hFont, TRUE );
    
    SendMessage( m_hButtonUp,	WM_SETTEXT, 0, (LPARAM)_T("3") );
    SendMessage( m_hButtonDown,	WM_SETTEXT, 0, (LPARAM)_T("4") );
}


Waldermort

AnswerRe: Fonts Pin
KarstenK18-Sep-07 23:05
mveKarstenK18-Sep-07 23:05 
AnswerRe: Fonts Pin
nbugalia18-Sep-07 23:14
nbugalia18-Sep-07 23:14 
AnswerRe: Fonts Pin
Waldermort19-Sep-07 0:46
Waldermort19-Sep-07 0:46 
QuestionEM_GETSELTEXT Message Doesn't retrive the Text Pin
GauranG Shah18-Sep-07 22:37
GauranG Shah18-Sep-07 22:37 
AnswerRe: EM_GETSELTEXT Message Doesn't retrive the Text Pin
nbugalia18-Sep-07 23:23
nbugalia18-Sep-07 23:23 
GeneralRe: EM_GETSELTEXT Message Doesn't retrive the Text Pin
GauranG Shah18-Sep-07 23:30
GauranG Shah18-Sep-07 23:30 
QuestionRe: EM_GETSELTEXT Message Doesn't retrive the Text Pin
David Crow19-Sep-07 3:24
David Crow19-Sep-07 3:24 
AnswerRe: EM_GETSELTEXT Message Doesn't retrive the Text Pin
GauranG Shah19-Sep-07 21:14
GauranG Shah19-Sep-07 21:14 
QuestionRe: EM_GETSELTEXT Message Doesn't retrive the Text Pin
David Crow20-Sep-07 2:27
David Crow20-Sep-07 2:27 
QuestionHow to convert *.tif to *.bmp? Pin
TooShy2Talk18-Sep-07 22:34
TooShy2Talk18-Sep-07 22:34 
AnswerRe: How to convert *.tif to *.bmp? Pin
KarstenK18-Sep-07 22:58
mveKarstenK18-Sep-07 22:58 
GeneralRe: How to convert *.tif to *.bmp? Pin
TooShy2Talk18-Sep-07 23:20
TooShy2Talk18-Sep-07 23:20 
GeneralRe: How to convert *.tif to *.bmp? Pin
KarstenK18-Sep-07 23:42
mveKarstenK18-Sep-07 23:42 
AnswerRe: How to convert *.tif to *.bmp? Pin
Mark Salsbery19-Sep-07 5:48
Mark Salsbery19-Sep-07 5:48 
Questionreading simple excel sheet without using odbc Pin
neha.agarwal2718-Sep-07 21:58
neha.agarwal2718-Sep-07 21:58 
AnswerRe: reading simple excel sheet without using odbc Pin
KarstenK18-Sep-07 22:59
mveKarstenK18-Sep-07 22:59 
GeneralRe: reading simple excel sheet without using odbc Pin
neha.agarwal2718-Sep-07 23:09
neha.agarwal2718-Sep-07 23:09 

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.