|
Hi David,
Thanks for the inputs, this works.
On secound thoughts I was wondering, can we do this ?
ncm.cbSize = sizeof(LOGFONT);
Will this be more correct?
Also, why was the previous code working in the XP targetted OS, but not in Vista targetted OS?
Thanks,
Saleem
|
|
|
|
|
Md Saleem Navalur wrote:
Will this be more correct?
You failed to mention which of my recommendations you decided to use.
If you are using the SPI_GETNONCLIENTMETRICS action then set both the cbSize member and the uiParam function parameter to sizeof(NONCLIENTMETRICS)
If you are using the SPI_GETICONTITLELOGFONT action uiParam function parameter specifies the size of a LOGFONT structure.
Md Saleem Navalur wrote:
Also, why was the previous code working in the XP targetted OS, but not in Vista targetted OS?
Apparently when WINVER is <= 0x0500 SystemParametersInfo does not check the size of the buffer you pass in the uiParam parameter.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi, I need to know how can i select all rows in a list control .So can you help me ?
|
|
|
|
|
SetItemState( -1, LVIS_SELECTED , LVIS_SELECTED );
|
|
|
|
|
thank you for your help brother 
|
|
|
|
|
During long search operation in MFC applicaton how to add animation CWaitCursor
|
|
|
|
|
Everything is clearly explained (with an example and everything) in the documentation[^]. Basically, you just create an instance of the class at the begining of your lenghty function and it will be destroyed when the function exits.
|
|
|
|
|
Yes true, But I dont want the normal hour glass, but instead I need some other animation, so...
|
|
|
|
|
ptr_Electron wrote: Yes true, But I dont want the normal hour glass, but instead I need some other animation, so...
If you've globally set an animated wait cursor then I guess that will be displayed instead of the hour glass. Also you can try LoadCursorFromFile .
|
|
|
|
|
Can you respond to the WM_SETCURSOR message?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I wrote this code in the button click event, but no change in the run time
I get normal pointer cursor. please advice, I want to display animated cursor.
HCURSOR hcur;
hcur = ::LoadCursorFromFile((LPCWSTR)"C:\\eglobe.ani");
::SetSystemCursor(hcur,OCR_NORMAL);
when I add watch for "hcur" it is null and unused
modified on Tuesday, May 26, 2009 5:36 AM
|
|
|
|
|
Does hcur have global scope?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
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?
|
|
|
|
|
you could look at this - Im sure he has a save method in his CFontHelper class ...
CFontHelper[^]
'g'
|
|
|
|
|
how to save any file
Trioum
modified on Friday, June 12, 2009 2:26 AM
|
|
|
|
|
Please elaborate.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hah - you got there before me Carlo ...
come stai ? (e suo famiglio ?) (thats wrong I know, hope you know what I mean ..)
|
|
|
|
|
Garth J Lancaster wrote: come stai ? (e suo famiglio ?) (thats wrong I know, hope you know what I mean ..)
Actually it's pretty good (correct sentence:"Come stai? (E la tua famiglia?)").
BTW: Fine, thanks.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i want to save the data at every instance.
Trioum
|
|
|
|
|
Your post is confusing, unclear and clueless ALL at the same time. Anyone attempting to answer you will have a tendency to jab a needle into their eye.
However, to answer your post: If the other application has opened the file in exclusive access mode, you will not be able to even read it. Again, if you do have access to the file, it is not clear from your post if you want to save updates to the same file (depends on if the application that created the file is allowing other applications to perform a write operation on it).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
so
I want to auto save the file.
Trioum
modified on Friday, June 12, 2009 2:28 AM
|
|
|
|
|
WHAT SAVE BUTTON? Where is it? In your app or in the third party app?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
in the file
Trioum
modified on Friday, June 12, 2009 2:31 AM
|
|
|
|
|
My question was: Where is the save button?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
not sure what you mean - if its some sort of program you've written, then its quite easy to keep a 'dirty'/'has-been-modified' flag, set that when ever data is changed, inspect it periodically and save the data if it has been set.
If you mean controlling some sort of other program not written by you then you'll have to supply more information
'g'
|
|
|
|