Click here to Skip to main content
15,896,118 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Device Context. Pin
Hamid_RT4-Jul-06 23:53
Hamid_RT4-Jul-06 23:53 
QuestionButton problem Pin
ashish dogra4-Jul-06 22:46
ashish dogra4-Jul-06 22:46 
AnswerRe: Button problem Pin
Hamid_RT4-Jul-06 22:50
Hamid_RT4-Jul-06 22:50 
GeneralRe: Button problem Pin
ashish dogra4-Jul-06 22:55
ashish dogra4-Jul-06 22:55 
GeneralRe: Button problem Pin
Hamid_RT4-Jul-06 23:05
Hamid_RT4-Jul-06 23:05 
GeneralRe: Button problem Pin
ashish dogra4-Jul-06 23:25
ashish dogra4-Jul-06 23:25 
GeneralRe: Button problem Pin
ashish dogra4-Jul-06 23:47
ashish dogra4-Jul-06 23:47 
GeneralRe: Button problem Pin
Hamid_RT5-Jul-06 0:00
Hamid_RT5-Jul-06 0:00 
GeneralRe: Button problem [modified] Pin
ashish dogra5-Jul-06 0:38
ashish dogra5-Jul-06 0:38 
GeneralRe: Button problem Pin
Hamid_RT5-Jul-06 1:55
Hamid_RT5-Jul-06 1:55 
GeneralRe: Button problem Pin
ashish dogra5-Jul-06 2:17
ashish dogra5-Jul-06 2:17 
GeneralRe: Button problem Pin
Hamid_RT5-Jul-06 2:59
Hamid_RT5-Jul-06 2:59 
AnswerRe: Button problem Pin
_AnsHUMAN_ 4-Jul-06 23:06
_AnsHUMAN_ 4-Jul-06 23:06 
Questionwhat it mean in C++-> TCHAR Pin
Nirmal Khatri4-Jul-06 22:39
Nirmal Khatri4-Jul-06 22:39 

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.