|
hi,
How to install .ttf file through program in windows.I have an application that uses different font.so, i need that fonts to be installed for appearing on my application..
How can i do that ??? any other idea to do this ?????
Thanku
verma
|
|
|
|
|
Click Here ->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Thanks....
it works great!!!!!!!
But some fonts are unable to uninstall.... why?
Regards
verma
|
|
|
|
|
Please Debug it properly may be the extension of file name is different.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi every one
Can Any one guide me how to proceed with developing a ActiveX component in VC++?
Regards,
S.Lakshmigeetha.
lgatcodeproject
|
|
|
|
|
Please follow the step that is given in this article Click here->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hello,
Thanks for the Link. I have question regarding the article. I followed the steps dictated in the link. In step 3 (Adding a property to the Control)the article says the prototypes of get & set functions are created int polyCtl.h and empty functions are created in polyCtl.cpp.
But when I tried the same, say added a propery named Sides, the get and set functions did not get created in the .h and .cpp file. But as they said the propget,propput god added in the polygon.idl.
Can you say that this behaviour is common?
Regards,
LG
lgatcodeproject
|
|
|
|
|
kindly excuse the typo errors
".... got god"
lgatcodeproject
|
|
|
|
|
Did you recompile the IDL?
This should generate the functions for you
codito ergo sum
|
|
|
|
|
Hello,
I Rebuild the application after adding the property. This build would compile the idl for me is it?
Regards,
LG
lgatcodeproject
|
|
|
|
|
Normally it should,
nevertheless could you try to compile the .IDL yourself?
codito ergo sum
|
|
|
|
|
Hi,
I compiled the .IDL but it did't happen so I added the function declaration on the .h file and the definitions in the .cpp file. And proceeded further, and I got the desired output.
Thanks for the link.
Regards,
LG.
lgatcodeproject
|
|
|
|
|
|
Hi!
Thanks for the link. It was quite informative.
Regards,
LG
lgatcodeproject
|
|
|
|
|
I glad it was helpful for you.
|
|
|
|
|
Hi,
I am using the API CStatic::SetIcon to associate the icon with the static control. I have placed this control on CDialog , (Dialog background is gradient painted). I want this CStatic control to be transparent (so that the background of CStatic would be gradient, which is of Dialogs background color). However, icon image is transparent. How could I do this ?
Any help would be highly appreciated.
Thanks,
Paresh.
|
|
|
|
|
|
Hi Hamid,
I have seen this article and this does not serve my purpose.
Regards,
Paresh.
|
|
|
|
|
I think you need to paint alpha blended explicitly, AlphaBlend[^] and make sure you handled OnEraseBkgnd so that Static control doesnot painted its own background
have a look at Using the AlphaBlend function[^]
|
|
|
|
|
Thanks Rajkumar,
AlphaBlend works for bitmaps.
I have to use icons.
Regards
Paresh
|
|
|
|
|
before that, I would like to know what is the result when you tried with your code.
|
|
|
|
|
class CMyDialog : public CDialog<br />
{<br />
........<br />
CStatic m_StaticIcon;<br />
........<br />
}<br />
<br />
HBRUSH CMyDialog:OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) <br />
{<br />
HBRUSH hbr = CDialog:OnCtlColor(pDC, pWnd, nCtlColor);<br />
<br />
switch(nCtlColor)<br />
{<br />
case CTLCOLOR_STATIC:<br />
if (pWnd->m_hWnd == m_StaticIcon.m_hWnd)<br />
{<br />
pDC->SetBkMode(TRANSPARENT);<br />
return (HBRUSH)(GetStockObject(NULL_BRUSH));<br />
}<br />
break;<br />
}<br />
return hbr;<br />
}<br />
<br />
<br />
BOOL CMyDialog:OnInitDialog() <br />
{<br />
.........<br />
m_StaticIcon.Create(_T(""), WS_CHILD | WS_VISIBLE | SS_ICON, <br />
CRect(0, 0, 0, 0), this);<br />
<br />
HICON hIcon = ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(ICON_ID));<br />
m_StaticIcon.SetIcon(hIcon);<br />
.........<br />
}
In CMyDialog:OnPaint(), I have painted a region of CDialog with GradientFill(...), and on this area I want a static icon, which needs to be transparent. So that I can see the background of CStatic icon as gradient. But this icon has been painted with background of rest of dialog and not the region, which I have painted with GradientFill.
I hope I have mentioned the problem correctly.
Regards,
Paresh.
|
|
|
|
|
I would suggest very simple approach as you want to display only the icon, use DrawIcon, inplace of doing a lot of stuff over CStatic.
1) add the icon as member variable.
class CMyDialog : public CDialog
{
........
HICON m_hStaticIcon;
........
}
2) load the icon
BOOL CMyDialog:OnInitDialog()
{
.........
m_hStaticIcon = ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(ICON_ID));
.........
}
Paresh Chitte wrote: In CMyDialog:OnPaint(), I have painted a region of CDialog with GradientFill(...), and on this area I want a static icon,
3) Now you draw the icon over the painted region.
void CMyDialog::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this);
.....
.....
}
else
{
CDialog::OnPaint();
CClientDC dc(this);
dc.DrawIcon(100, 100, m_hStaticIcon);
}
}
|
|
|
|
|
Hi Rajkumar,
The solution you have provided is perfectly working for me.
Thank you very much for your kind help.
Regards,
Paresh.
|
|
|
|
|
Hi,
The below code is not working:
ExitWindowsEx(EWX_REBOOT|EWX_FORCE,0);
In which condition it may fail?
|
|
|
|