Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Read/write summary tab info Pin
David Crow20-Jun-06 4:33
David Crow20-Jun-06 4:33 
GeneralRe: Read/write summary tab info [modified] Pin
petergggg20-Jun-06 23:00
petergggg20-Jun-06 23:00 
GeneralRe: Read/write summary tab info Pin
David Crow21-Jun-06 2:36
David Crow21-Jun-06 2:36 
Questioncontrol color Pin
yogendra kaushik20-Jun-06 4:15
yogendra kaushik20-Jun-06 4:15 
AnswerRe: control color Pin
see me20-Jun-06 4:25
see me20-Jun-06 4:25 
AnswerRe: control color Pin
Laxman Auti20-Jun-06 5:45
Laxman Auti20-Jun-06 5:45 
AnswerRe: control color Pin
Hamid_RT20-Jun-06 18:57
Hamid_RT20-Jun-06 18:57 
GeneralRe: control color Pin
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:08
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:08 
I like to autosize the owner draw button depending upon the text that it load dynamically based on localization strings. so some strings are large than others. Keeping this I override DrawItem in the inherited class from CButton. (In below i tried unconditionally to increase the size at runtime, once it is achived, i think i can go ahead for resize code)
The sample code is below

void CMyGraphicButton::DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CString cs;
CString cslong;
ASSERT(lpDrawItemStruct->CtlType == ODT_BUTTON);
LPCTSTR lpszText = (LPCTSTR) lpDrawItemStruct->itemData;
if (!lpszText || lpszText == (LPCTSTR)-1)
{
GetWindowText (cs);
}
else
cs = lpszText;

// now i m trying to resize , so let try to increase the size of button unconditioally
// I get
//lpDrawItemStruct>rcItem.left =0
//lpDrawItemStruct>rcItem.right =75
//lpDrawItemStruct>rcItem.top = 0
//lpDrawItemStruct>rcItem.bottom = 25
//As my button is on extreme right side of dialog so i tried to extend/increase the size of
// button of the left side as follows

lpDrawItemStruct>rcItem.left -= 25 ;

// but the above causes the text to be moved on right side insead of resize/increase the
//button size.

Any idea or help is appriciated.

Thanks
Anil


}

[AKS]

Questionhow can i write a C++ code in BREW. Pin
nitinjdalal20-Jun-06 4:09
nitinjdalal20-Jun-06 4:09 
AnswerRe: how can i write a C++ code in BREW. Pin
toxcct20-Jun-06 4:34
toxcct20-Jun-06 4:34 
GeneralRe: how can i write a C++ code in BREW. Pin
Michael Dunn20-Jun-06 9:15
sitebuilderMichael Dunn20-Jun-06 9:15 
AnswerRe: how can i write a C++ code in BREW. Pin
Stephen Hewitt20-Jun-06 16:18
Stephen Hewitt20-Jun-06 16:18 
AnswerRe: how can i write a C++ code in BREW. Pin
Hamid_RT20-Jun-06 18:56
Hamid_RT20-Jun-06 18:56 
AnswerRe: how can i write a C++ code in BREW. Pin
kakan20-Jun-06 20:12
professionalkakan20-Jun-06 20:12 
Questionprarameter mismatch in SMPP Pin
johnalek20-Jun-06 4:01
johnalek20-Jun-06 4:01 
Questionhow we can use strechblt Pin
vasusree20-Jun-06 3:19
vasusree20-Jun-06 3:19 
AnswerRe: how we can use strechblt Pin
Hamid_RT20-Jun-06 3:31
Hamid_RT20-Jun-06 3:31 
GeneralRe: how we can use strechblt Pin
Stephen Hewitt20-Jun-06 3:34
Stephen Hewitt20-Jun-06 3:34 
GeneralRe: how we can use strechblt Pin
Hamid_RT20-Jun-06 3:39
Hamid_RT20-Jun-06 3:39 
Questiondebug assertion failed [modified] Pin
yogendra kaushik20-Jun-06 3:19
yogendra kaushik20-Jun-06 3:19 
QuestionRe: debug assertion failed Pin
David Crow20-Jun-06 3:25
David Crow20-Jun-06 3:25 
AnswerRe: debug assertion failed Pin
Cedric Moonen20-Jun-06 3:29
Cedric Moonen20-Jun-06 3:29 
AnswerRe: debug assertion failed Pin
Viorel.20-Jun-06 3:31
Viorel.20-Jun-06 3:31 
GeneralRe: debug assertion failed Pin
yogendra kaushik20-Jun-06 3:36
yogendra kaushik20-Jun-06 3:36 
GeneralRe: debug assertion failed Pin
Viorel.20-Jun-06 3:42
Viorel.20-Jun-06 3:42 

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.