|
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.
|
|
|
|
|
Regards,
Mushq
|
|
|
|
|
Hi,
I am using VS 2008, VC++, MFC.
I am trying to draw the groupbox with a custom color and also choose my own color for the text displayed.
I would greatly appreciate if you could help me with this.
Thanks.
-A
|
|
|
|
|
See WM_CTLCOLOR* on the MSDN.
|
|
|
|
|
Hello dear friends,
I am creating the toolbar in VC 6.0.
I want to show the menu when the button of the toolbar will be clicked.
But when I use the LoadMenu for loading the menu from the resource i get
0 as the return value and GetLastError() returns the description
"The specified resource type can not be found in the image file."
I really don't understand the problem.The code snippest is as shown below.
void CMFToolbar::PopupFileMenu()<br />
{<br />
<br />
try<br />
{<br />
CMenu mnu;<br />
CMenu *submnu;<br />
RECT rectSubmitButton;<br />
if(!GetItemRect(CommandToIndex(IDB_FILE),&rectSubmitButton))<br />
{MessageBox("Fail1",_T("QpOffice Toolbar"),MB_ICONERROR); return;}<br />
if(!MapWindowPoints(HWND_DESKTOP,(POINT*)&rectSubmitButton,2))<br />
{MessageBox("Fail2",_T("QpOffice Toolbar"),MB_ICONERROR); return;}<br />
if(mnu.LoadMenu(IDR_FILE_MENU))<br />
{<br />
MessageBox("1",_T("QpOffice Toolbar"),MB_ICONERROR);<br />
}<br />
else<br />
{<br />
char buf[MAX_PATH];<br />
strcpy(buf,ErrorDescription(GetLastError()));<br />
MessageBox(buf);<br />
}<br />
}<br />
catch(...)<br />
{<br />
MessageBox("Exception",_T("QpOffice Toolbar"),MB_ICONERROR);<br />
}
Thanks in advance to all of you.
ritz1234
|
|
|
|
|
Is the menu resource in the module you're calling LoadMenu() from?
If so, is its id == IDR_FILE_MENU? If so, is it the same IDR_FILE_MENU
you use in the code?
Is this code in a DLL or an EXE?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|