Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralApplication fails in Release mode.... Pin
Jagadeesh VN12-Jan-05 23:27
Jagadeesh VN12-Jan-05 23:27 
GeneralRe: Application fails in Release mode.... Pin
PJ Arends13-Jan-05 6:55
professionalPJ Arends13-Jan-05 6:55 
GeneralThanks Blake Miller: CreateProcess and process groups (2) Pin
ionzarate12-Jan-05 23:16
ionzarate12-Jan-05 23:16 
GeneralGet Sector!! !! Pin
LiYS12-Jan-05 22:57
LiYS12-Jan-05 22:57 
GeneralRe: Get Sector!! !! Pin
Selvam R12-Jan-05 23:06
professionalSelvam R12-Jan-05 23:06 
GeneralRe: Get Sector!! !! Pin
LiYS12-Jan-05 23:13
LiYS12-Jan-05 23:13 
GeneralRe: Get Sector!! !! Pin
Anonymous12-Jan-05 23:32
Anonymous12-Jan-05 23:32 
Generalrequest to all Pin
Anonymous12-Jan-05 22:11
Anonymous12-Jan-05 22:11 
void MyDialog::m_SetFont( )
{
if(0 == strcmp(g_szCurrLang, "English"))
{
m_stfontObj= (HFONT)GetFont();
}
else
{
/* curFont+=*g_szCurrLang;
curFont+=*g_szCurrKbd;*/
curFont+="UrduPhonetic";//name of the phont
}
if(m_stfontObj!=NULL)// || (0 == strcmp(g_szCurrLang, "English")))
{

}
else
{
CString strName_Font;
strName_Font=" "+curFont;//TO CONCATENATE THE Font name with the format
m_stfontObj = CreateFont(-40, 0, 0, 0, FW_DONTCARE,
FALSE, FALSE, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH|FF_DONTCARE, LPCTSTR(curFont)); //strName_Font
CFont* my_pCurFont = CFont::FromHandle(m_stfontObj);
this->SetFont(my_pCurFont,TRUE);
CFont * my_fetchedfont =this->GetFont();
}
}
this is my fuction to get the font by name UrduPhonetic and then want to display the characters on the buttons with the font
and in my button class
i am writing as
void MybutCls::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
{
short b_caps=GetKeyState(VK_Caps);
short b_shift=0;//GetKeyState(16);
MyDialog *puclmydialogRef=NULL;
puclmydialogRef=(MyDialog*)GetParent();
SelectObject( lpDrawItemStruct->hDC,(((MyDialog*)GetParent())->GetFont())->m_hObject);//set the font handler to drawitem handler
//draws a frame control of the specified type and style.
::DrawFrameControl(lpDrawItemStruct->hDC, &lpDrawItemStruct->rcItem,DFC_BUTTON,DFCS_BUTTONPUSH|BS_DEFPUSHBUTTON);
if((0x8000 ==(0x8000 & GetKeyState(16))&& !b_caps))//||(0x8000 !=(0x8000 & GetKeyState(16))&& caps))
{
if(lpDrawItemStruct->CtlID==IDC_BUTTON49)
::DrawText(lpDrawItemStruct->hDC,"!",1,&lpDrawItemStruct->rcItem,DT_SINGLELINE|DT_VCENTER|DT_CENTER);
if(lpDrawItemStruct->CtlID==IDC_BUTTON45)
::DrawText(lpDrawItemStruct->hDC,"_",1,&lpDrawItemStruct->rcItem,DT_SINGLELINE|DT_VCENTER|DT_CENTER);
}
but its not displaying the symbol from the obtained font on my ownerdraw buttons but its jst displaying thestring which i give in the "" such as "!"
can any one help me
Its very urgent
GeneralRe: request to all Pin
ThatsAlok13-Jan-05 0:30
ThatsAlok13-Jan-05 0:30 
Generalto alok Pin
Anonymous13-Jan-05 1:39
Anonymous13-Jan-05 1:39 
GeneralRe: to alok Pin
ThatsAlok13-Jan-05 2:17
ThatsAlok13-Jan-05 2:17 
GeneralRe: request to all Pin
David Crow13-Jan-05 3:55
David Crow13-Jan-05 3:55 
GeneralGUI capturing Pin
kedar.dave12-Jan-05 22:01
kedar.dave12-Jan-05 22:01 
GeneralRe: GUI capturing Pin
Selvam R12-Jan-05 23:02
professionalSelvam R12-Jan-05 23:02 
GeneralRe: GUI capturing Pin
kedar.dave13-Jan-05 17:27
kedar.dave13-Jan-05 17:27 
GeneralRevision Control System and Tools Pin
George Ionescu12-Jan-05 21:40
George Ionescu12-Jan-05 21:40 
QuestionFilesss.... Help? Pin
nutkase12-Jan-05 21:25
nutkase12-Jan-05 21:25 
AnswerRe: Filesss.... Help? Pin
David Crow13-Jan-05 3:57
David Crow13-Jan-05 3:57 
QuestionCopy Folder? Pin
Larsson12-Jan-05 21:14
Larsson12-Jan-05 21:14 
AnswerRe: Copy Folder? Pin
namaskaaram12-Jan-05 21:47
namaskaaram12-Jan-05 21:47 
GeneralRe: Copy Folder? Pin
Larsson12-Jan-05 23:13
Larsson12-Jan-05 23:13 
GeneralRe: Copy Folder? Pin
ThatsAlok13-Jan-05 0:57
ThatsAlok13-Jan-05 0:57 
GeneralRe: Copy Folder? Pin
Larsson13-Jan-05 1:15
Larsson13-Jan-05 1:15 
GeneralShellExecute Pin
T i T i12-Jan-05 21:13
T i T i12-Jan-05 21:13 
GeneralRe: ShellExecute Pin
Antony M Kancidrowski12-Jan-05 23:44
Antony M Kancidrowski12-Jan-05 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.