Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to add animation CWaitCursor Pin
ptr_Electron25-May-09 1:39
ptr_Electron25-May-09 1:39 
AnswerRe: how to add animation CWaitCursor Pin
Cedric Moonen25-May-09 1:41
Cedric Moonen25-May-09 1:41 
GeneralRe: how to add animation CWaitCursor Pin
ptr_Electron25-May-09 1:47
ptr_Electron25-May-09 1:47 
GeneralRe: how to add animation CWaitCursor Pin
Nibu babu thomas25-May-09 2:05
Nibu babu thomas25-May-09 2:05 
QuestionRe: how to add animation CWaitCursor Pin
David Crow25-May-09 8:42
David Crow25-May-09 8:42 
AnswerRe: how to add animation CWaitCursor [modified] Pin
ptr_Electron25-May-09 21:02
ptr_Electron25-May-09 21:02 
QuestionRe: how to add animation CWaitCursor Pin
David Crow26-May-09 3:03
David Crow26-May-09 3:03 
QuestionWriteProfileString() Pin
susanne125-May-09 1:27
susanne125-May-09 1:27 
after choosing and closing the Font Dialog in an SDI appliction, the last choosen Fon must be saved via WriteProfileString() and by the next call
it should be loaded sot that the Font is automatically selected via GetProfileString().

I have the following code:

CString strFaceName;
CString strFontSize;
CString strFontStyle;
CString strFontValue;

CFont *m_cfont = (CFont*) new CFont();

LOGFONTA *m_lf = new LOGFONTA();

int m_nFontSize = 0;

CWinApp* pApp = AfxGetApp();

m_cfdlg.GetCurrentFont(m_lf);

strFaceName = m_cfdlg.GetFaceName();

m_nFontSize = m_cfdlg.GetSize() ;

m_cfont->CreateFont(m_nFontSize, m_lf->lfWidth,m_lf->lfEscapement,m_lf->lfOrientation,
m_lf->lfWeight,m_lf->lfItalic,false,0,1,OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH | FF_SWISS,strFaceName);

itoa(m_nFontSize,(char*)strFontSize.GetString (),10);



pApp->WriteProfileString(strFaceName, strFontSize, strFontStyle);


strFontValue = pApp->GetProfileString(strFaceName, strFontSize, strFontStyle);

as i know WriteProfileString, write in the registry, but this code needs something more to work properly?
AnswerRe: WriteProfileString() Pin
Garth J Lancaster25-May-09 2:06
professionalGarth J Lancaster25-May-09 2:06 
Questionsaving file Pin
trioum24-May-09 23:54
trioum24-May-09 23:54 
AnswerRe: saving file Pin
CPallini25-May-09 0:08
mveCPallini25-May-09 0:08 
GeneralRe: saving file (thread hijack) Pin
Garth J Lancaster25-May-09 0:16
professionalGarth J Lancaster25-May-09 0:16 
GeneralRe: saving file (thread hijack) Pin
CPallini25-May-09 0:24
mveCPallini25-May-09 0:24 
GeneralRe: saving file Pin
trioum25-May-09 0:24
trioum25-May-09 0:24 
GeneralRe: saving file Pin
Rajesh R Subramanian25-May-09 0:39
professionalRajesh R Subramanian25-May-09 0:39 
GeneralRe: saving file Pin
trioum25-May-09 0:50
trioum25-May-09 0:50 
GeneralRe: saving file Pin
Rajesh R Subramanian25-May-09 1:02
professionalRajesh R Subramanian25-May-09 1:02 
GeneralRe: saving file Pin
trioum25-May-09 1:07
trioum25-May-09 1:07 
GeneralRe: saving file Pin
Rajesh R Subramanian25-May-09 1:23
professionalRajesh R Subramanian25-May-09 1:23 
AnswerRe: saving file Pin
Garth J Lancaster25-May-09 0:10
professionalGarth J Lancaster25-May-09 0:10 
AnswerRe: saving file Pin
Hamid_RT25-May-09 0:59
Hamid_RT25-May-09 0:59 
GeneralRe: saving file [modified] Pin
trioum25-May-09 1:02
trioum25-May-09 1:02 
GeneralRe: saving file Pin
killabyte25-May-09 20:34
killabyte25-May-09 20:34 
QuestionRe: saving file Pin
Maximilien25-May-09 4:56
Maximilien25-May-09 4:56 
QuestionANSI to UTF-8 Pin
Souldrift24-May-09 23:15
Souldrift24-May-09 23:15 

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.