Click here to Skip to main content
15,905,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can get selected item in list box???? Pin
Hamid_RT5-Jul-06 0:22
Hamid_RT5-Jul-06 0:22 
QuestionC++ project HELP Pin
Nirmal Khatri5-Jul-06 0:04
Nirmal Khatri5-Jul-06 0:04 
AnswerRe: C++ project HELP Pin
_AnsHUMAN_ 5-Jul-06 0:10
_AnsHUMAN_ 5-Jul-06 0:10 
AnswerRe: C++ project HELP Pin
Hamid_RT5-Jul-06 0:11
Hamid_RT5-Jul-06 0:11 
Questionwi-fi development Pin
everything_sux4-Jul-06 23:43
everything_sux4-Jul-06 23:43 
AnswerRe: wi-fi development Pin
earl5-Jul-06 4:30
earl5-Jul-06 4:30 
GeneralRe: wi-fi development Pin
everything_sux5-Jul-06 4:36
everything_sux5-Jul-06 4:36 
GeneralRe: wi-fi development Pin
earl5-Jul-06 4:39
earl5-Jul-06 4:39 
GeneralRe: wi-fi development Pin
everything_sux5-Jul-06 4:43
everything_sux5-Jul-06 4:43 
GeneralRe: wi-fi development Pin
earl5-Jul-06 4:46
earl5-Jul-06 4:46 
QuestionHow to add strings to combobox Pin
vc++_fragrance4-Jul-06 23:17
vc++_fragrance4-Jul-06 23:17 
AnswerRe: How to add strings to combobox [modified] Pin
voorugonda prashanth4-Jul-06 23:20
voorugonda prashanth4-Jul-06 23:20 
AnswerRe: How to add strings to combobox Pin
Weiye Chen4-Jul-06 23:36
Weiye Chen4-Jul-06 23:36 
GeneralRe: How to add strings to combobox Pin
Hamid_RT4-Jul-06 23:38
Hamid_RT4-Jul-06 23:38 
GeneralRe: How to add strings to combobox Pin
voorugonda prashanth4-Jul-06 23:42
voorugonda prashanth4-Jul-06 23:42 
JokeRe: How to add strings to combobox Pin
Sarath C5-Jul-06 0:06
Sarath C5-Jul-06 0:06 
GeneralRe: How to add strings to combobox Pin
vc++_fragrance5-Jul-06 0:31
vc++_fragrance5-Jul-06 0:31 
AnswerRe: How to add strings to combobox Pin
_AnsHUMAN_ 5-Jul-06 0:01
_AnsHUMAN_ 5-Jul-06 0:01 
AnswerRe: How to add strings to combobox Pin
Sarath C5-Jul-06 0:10
Sarath C5-Jul-06 0:10 
QuestionHow we change the shape of the Button Pin
muravi4-Jul-06 23:14
muravi4-Jul-06 23:14 
AnswerRe: How we change the shape of the Button Pin
Hamid_RT4-Jul-06 23:28
Hamid_RT4-Jul-06 23:28 
GeneralRe: How we change the shape of the Button Pin
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:12
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:12 
The question is slightly deviated but related to buttons and dynamic control, so hope i get some clue.
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.
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]

QuestionDevice Context. Pin
voorugonda prashanth4-Jul-06 23:11
voorugonda prashanth4-Jul-06 23:11 
AnswerRe: Device Context. Pin
Sarath C4-Jul-06 23:34
Sarath C4-Jul-06 23:34 
GeneralRe: Device Context. Pin
voorugonda prashanth4-Jul-06 23:40
voorugonda prashanth4-Jul-06 23:40 

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.