|
LOGFONT.lfFaceName is declared as TCHAR. TCHAR will work according to your application that is, i think you don't have _UNICODE defined in your application.
If so TCHAR will act as char, wcscpy will expecting WCHAR but you passing char. normal strcpy(..) or _tcscpy(..)
Try this... hope it'll work...
Do your Duty and Don't expect the Result
|
|
|
|
|
See strcpy(m_lf.lfFaceName, "Times New Roman"); for your answer
------------
and see maybe its some helpful to you
<br />
LOGFONT m_lf;<br />
NONCLIENTMETRICS nm;<br />
nm.cbSize = sizeof (NONCLIENTMETRICS);<br />
ZeroMemory ((PVOID) &m_lf,sizeof (LOGFONT));<br />
<br />
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,nm.cbSize,&nm,0); <br />
m_lf = nm.lfMenuFont;<br />
whitesky
|
|
|
|
|
i use this code for creating tooltip what i dont get that
tell me what is the problem
m_tooltip.Create(this);//, TTS_ALWAYSTIP);
m_tooltip.Activate(TRUE);
m_tooltip.AddTool(GetDlgItem(IDC_EDIT1),("this is edit box"),NULL,0);
m_tooltip.SetToolRect(GetDlgItem(IDC_EDIT1),1,CRect(32,32,64,64));
Ashish Dogra
MCA
Noida
|
|
|
|
|
You dont need to a new thread we can see your thread and see my previous thread
whitesky
|
|
|
|
|
i read msdn but still i dont get tootip
Ashish Dogra
MCA
Noida
|
|
|
|
|
|
i do this msdn but still dont get tool tip
can u tellme
Ashish Dogra
MCA
Noida
|
|
|
|
|
See
<code>
m_Tool.Create(this);
m_Tool.AddTool(GetDlgItem(IDC_BUTTON1),"Is this a test");
m_Tool.Activate(true);
BOOL CAnswerDlg::PreTranslateMessage(MSG* pMsg)
{
if (m_Tool)
m_Tool.RelayEvent(pMsg);
return CDialog::PreTranslateMessage(pMsg);
}
</code>
whitesky
|
|
|
|
|
Hi,
I try to source for icons for programming window applications in
google, but the results are noisy and I just find one or two
icon suites. Anyone knows any good websites for software icons ?
Thanks
|
|
|
|
|
Search for iconizer. And preferably ask it such things in the lounge or even soapbox. This is the c++ programming message board.
|
|
|
|
|
www.iconbazaar.com[^]
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi i want to create a tooltip
so i use m_tool that is CToolTipCtrl member variable
then i use m_tool.Create(this,TTS_ALWAYSTIP);
m_tool.AddTool(pWnd,_T("this is window"),NULL,0);
but no tool tip is created on anything as i want to create it on window as well as any control
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
overide the PreTranslateMessage() funtion in that funtion call m_tool.RelayEvent(..) function
nave
|
|
|
|
|
THANKS FOR REPLY can u tell me pMsg is pointer what i can write
WAT CAN YOU TELL ME THAT WHAT ARE PARAMETERS OF RELAY EVENT
AND AFTER THIS I NEED TO WRITE CODE IN ONINITDIALOG FUNCTION
Ashish Dogra
MCA
Noida
-- modified at 1:57 Monday 17th July, 2006
|
|
|
|
|
Hi i saw you asking code for all the questions.
And many people told you to have a look at MSDN first.
After getting the API you need, check its parameter and the way how it can be used in MSDN.
Refer here[^]
Do your Duty and Don't expect the Result
|
|
|
|
|
Do you know, Why all the people want you to search MSDN ?
Its simple, then only you can learn MFC and also other persons help won't work all the time.
If you search by yourself it won't forget and you may come across various other API and techniques. It might not be the thing u want, but it'll be helpful in the future and to know MFC.
If you depend on other persons, you can make your thing to work but u will forget it as quickly as possible and you'll not know the working technique behind it.
'www.msdn.microsoft.com' is the msdn site and use the search facility in it.
Do your Duty and Don't expect the Result
|
|
|
|
|
|
how to close all child windows in MDI?
like the VC->windows->Close All command
|
|
|
|
|
EnumChildWindows maybe helpful.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
|
CMDIChildWnd *pMDIActive;
while( pMDIActive = MDIGetActive() )
{
pMDIActive->SendMessage(WM_CLOSE);
}
Regards,
Ram
|
|
|
|
|
yes,I did it with following code:
BOOL CALLBACK EnumChildProc(HWND hwndChild, LPARAM lParam)
{
::SendMessage(hwndChild,WM_CLOSE,0,0);
return TRUE;
}
void CMainFrame::OnWindowCloseall()
{
// TODO: 在此添加命令处理程序代码
::EnumChildWindows(m_hWndMDIClient,EnumChildProc,0);
}
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
|
thank you for your reply.
I found anoter function:
CDocTemplate* pTemplate = pDocument->GetDocTemplate();<br />
pTemplate->CloseAllDocuments(true);
though I don't know the progress of the function.
|
|
|
|
|
zeus_master wrote: pTemplate->CloseAllDocuments(true);
I'm glad you found this. I can't believe that EnumChildWindows() and SendMessage() were suggested.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In my project, I want to display some Greman or Japanese word in the list box, but me word already is unicode and it can be displayed in the static control. But it can't display in the list box....How can I solve this problem??
CListCtrl::SetItem( iIndex, iColumn, LVIF_TEXT, pszText, 0, 0, 0, 0 )
Thx
-- modified at 21:46 Sunday 16th July, 2006
|
|
|
|
|