Click here to Skip to main content
15,894,313 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to detect a CView closing? Pin
Ravi Bhavnani24-Oct-02 11:19
professionalRavi Bhavnani24-Oct-02 11:19 
AnswerRe: How to detect a CView closing? Pin
Ravi Bhavnani24-Oct-02 11:20
professionalRavi Bhavnani24-Oct-02 11:20 
GeneralRe: How to detect a CView closing? Pin
Neville Franks24-Oct-02 12:00
Neville Franks24-Oct-02 12:00 
GeneralRe: How to detect a CView closing? Pin
Ravi Bhavnani25-Oct-02 1:42
professionalRavi Bhavnani25-Oct-02 1:42 
GeneralMenu in a dialog Pin
sikrip24-Oct-02 11:14
sikrip24-Oct-02 11:14 
GeneralRe: Menu in a dialog Pin
Ravi Bhavnani24-Oct-02 11:21
professionalRavi Bhavnani24-Oct-02 11:21 
GeneralRe: Menu in a dialog Pin
Anonymous24-Oct-02 18:35
Anonymous24-Oct-02 18:35 
Generalchange dialog font Pin
lucy24-Oct-02 10:54
lucy24-Oct-02 10:54 
I have a dialog template. I create a CPropertyPage class on it, and add it to my property sheet.

On this dialog, I have a combo box as a drop list. My question is: the combo box content is added at run-time. Its string format is as follows:
%2d: %-35s %02d

The problem is: using the default font, the string part will have variable length. I tried to overwrite the OnSetFont() as:
// use another font instead of the default one
if ( HFONT(myFont) ) // my font is created in the constructor and deleted in destructor, declared as a member variable
{
    pFont->DeleteObject();
    pFont = &myFont;
}

CPropertyPage::OnSetFont(pFont);


I have tried to use different font, "Arial", "Courier", "System", "Times New Roman", but all of them gave me a big bold ugly font displayed on the dialog. Confused | :confused: Mad | :mad:

what's the correct way to do it?

Thank you a lot!
GeneralRe: change dialog font Pin
alex.barylski24-Oct-02 13:24
alex.barylski24-Oct-02 13:24 
GeneralCList and sockaddr_in Pin
User 665824-Oct-02 9:47
User 665824-Oct-02 9:47 
GeneralRe: CList and sockaddr_in Pin
valikac24-Oct-02 9:59
valikac24-Oct-02 9:59 
GeneralRe: CList and sockaddr_in Pin
User 665824-Oct-02 10:19
User 665824-Oct-02 10:19 
GeneralRe: CList and sockaddr_in Pin
valikac24-Oct-02 10:50
valikac24-Oct-02 10:50 
GeneralRe: CList and sockaddr_in Pin
Rickard Andersson2024-Oct-02 11:27
Rickard Andersson2024-Oct-02 11:27 
GeneralCombo box + spin control Pin
User 988524-Oct-02 8:15
User 988524-Oct-02 8:15 
GeneralRe: Combo box + spin control Pin
alex.barylski24-Oct-02 13:08
alex.barylski24-Oct-02 13:08 
GeneralRe: Combo box + spin control Pin
User 988524-Oct-02 13:58
User 988524-Oct-02 13:58 
GeneralRe: Combo box + spin control Pin
alex.barylski24-Oct-02 14:42
alex.barylski24-Oct-02 14:42 
QuestionDirectMusic8: What is MUSIC_TIME? Pin
acozz24-Oct-02 7:41
acozz24-Oct-02 7:41 
AnswerRe: DirectMusic8: What is MUSIC_TIME? Pin
fxindoor22-Feb-03 7:17
sussfxindoor22-Feb-03 7:17 
AnswerRe: DirectMusic8: What is MUSIC_TIME? Pin
fx-indoor22-Feb-03 7:18
sussfx-indoor22-Feb-03 7:18 
GeneralEdit Control for reading very large files Pin
Yehuda24-Oct-02 6:32
Yehuda24-Oct-02 6:32 
GeneralRe: Edit Control for reading very large files Pin
l a u r e n24-Oct-02 7:35
l a u r e n24-Oct-02 7:35 
GeneralRe: Edit Control for reading very large files Pin
valikac24-Oct-02 9:46
valikac24-Oct-02 9:46 
GeneralThe copy and paste fundtion Pin
Jeason Zhao24-Oct-02 6:17
Jeason Zhao24-Oct-02 6:17 

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.