|
ThatsMe. wrote: i m converting the integer value in String and set string in EditBox,
What and where is the code you are using to do that?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
<code>
COleDateTimeSpan daydiff=(COleDateTime m_date1-COleDateTime m_date2);
int noofday=(int)daydiff.GetTotalDays();
noofday++;
CString nday,m_no_ofday;
nday.Format("%d",noofday);
//m_no_ofday CString type variable of Edit Box.
//nday gives calculated no of days.
m_no_ofday.SetString(nday);
</code>
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
ThatsMe. wrote: /m_no_ofday CString type variable of Edit Box.
By that I'm assuming you mean m_no_ofday is a CString attached to the edit
control through the MFC DDX system....
If that's the case, you could just convert the int to that string and call UpdateData()
to move the string contents to the edit control:
COleDateTimeSpan daydiff=(COleDateTime m_date1-COleDateTime m_date2);
int noofday=(int)daydiff.GetTotalDays();
noofday++;
m_no_ofday.Format("%d",noofday);
UpdateData(FALSE);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I think it would be more useful if you post your not-working code.
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
|
|
|
|
|
Hi,
How can i Install TTF font through program in RunTime.???
Thanks
|
|
|
|
|
Click Here ->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi.....
I have gone through that program..In that it was added as resourse. but the requirement as follwos
1)Display all ".ttf" files in the current folder
2)If u select one then it need to be installed.
So, help me in this Regard...support me in the material.
Thanku
|
|
|
|
|
You can use of CFont::Create and use of SetFont for your work and you need to copy your file to Windows/Fonts and use of Install New Font.
|
|
|
|
|
Thanks...
but i want to install new font through program.....not manually copying.....
anyway thanks!!!
|
|
|
|
|
Hi,
How can i Install TTF font through program in RunTime.???
Thanks
|
|
|
|
|
TCHAR chFontPath[MAX_PATH] = { 0 };<br />
ExpandEnvironmentStrings( _T( "%windir%\\fonts\\"), chFontPath, MAX_PATH);<br />
if( S_OK == StringCchCat( chFontPath, MAX_PATH, _T("samplefont.ttf")))<br />
{<br />
CopyFile( _T("path_samplefont.ttf"),chFontPath, TRUE );<br />
}
You may need administrator permission to do this operation
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
When i am debugging the application the WindowFromDC is returning a valid handle. But on execting the application it is returning null when application is in background.
Any help is appreciated
Regards
|
|
|
|
|
|
if (!::IsWindow(*phWnd)) {
*phWnd = ::WindowFromDC(hDC);
}
|
|
|
|
|
|
it was passed to this function from another function.
When i am debugging i am getting the handle. When i am executing i am getting error
|
|
|
|
|
I think problem is of hDC,are you sure its valid?
|
|
|
|
|
|
But did you see MSDN
"If no window is associated with the specified DC, the return value is NULL." and I guess it returns a null hwnd and when you want to use of this handle you get an error.
|
|
|
|
|
Its a valid DC.. Initially I am retreiving DC by using window handle and at later pointer .. I pass only DC to a function and then now I want to retreive window handle using this DC. This call is getting failed.
|
|
|
|
|
|
Is there any way to find VC++ redistributables version installed on a system, Does there any "registry key" or win32 API exists to find that?
Thanks,
Mushq
|
|
|
|
|
|
Hamid. wrote: See here[^].
Please check who started that thread, it's me and I haven't got any suitable answer from that, so have asked it here.
Regards,
Mushq
|
|
|
|
|
I saw your name on the codeguru but I forgot to see your name on the MSDN.
|
|
|
|