Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSparse Tables Pin
nyteryder7919-Sep-06 19:46
nyteryder7919-Sep-06 19:46 
AnswerRe: Sparse Tables Pin
_AnsHUMAN_ 19-Sep-06 20:00
_AnsHUMAN_ 19-Sep-06 20:00 
QuestionHow to display data in controls for the second time Pin
vc++_fragrance19-Sep-06 19:09
vc++_fragrance19-Sep-06 19:09 
QuestionMFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
skyapie19-Sep-06 18:27
skyapie19-Sep-06 18:27 
AnswerRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Rinu_Raj19-Sep-06 18:33
Rinu_Raj19-Sep-06 18:33 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Stephen Hewitt19-Sep-06 18:57
Stephen Hewitt19-Sep-06 18:57 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Rinu_Raj19-Sep-06 19:01
Rinu_Raj19-Sep-06 19:01 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:17
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:17 
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]

AnswerRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Naveen19-Sep-06 18:48
Naveen19-Sep-06 18:48 
AnswerRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Stephen Hewitt19-Sep-06 18:51
Stephen Hewitt19-Sep-06 18:51 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
skyapie19-Sep-06 23:34
skyapie19-Sep-06 23:34 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
skyapie21-Sep-06 1:11
skyapie21-Sep-06 1:11 
GeneralRe: MFC Question - How can I tell if a button has been pressed, not a specific button, but just the event of a button press? Pin
Stephen Hewitt21-Sep-06 13:49
Stephen Hewitt21-Sep-06 13:49 
Questionsubclass a button, how let it know CLICK event Pin
HOW WHAT19-Sep-06 16:47
HOW WHAT19-Sep-06 16:47 
AnswerRe: subclass a button, how let it know CLICK event Pin
Naveen19-Sep-06 17:13
Naveen19-Sep-06 17:13 
GeneralRe: subclass a button, how let it know CLICK event Pin
HOW WHAT19-Sep-06 18:21
HOW WHAT19-Sep-06 18:21 
GeneralRe: subclass a button, how let it know CLICK event Pin
Naveen19-Sep-06 19:14
Naveen19-Sep-06 19:14 
AnswerRe: subclass a button, how let it know CLICK event Pin
Stephen Hewitt19-Sep-06 18:07
Stephen Hewitt19-Sep-06 18:07 
QuestionHow Do I Incorporate mySQL into my web CGI app made in C++ Pin
S0uthy19-Sep-06 16:01
S0uthy19-Sep-06 16:01 
AnswerRe: How Do I Incorporate mySQL into my web CGI app made in C++ Pin
Christian Graus19-Sep-06 16:07
protectorChristian Graus19-Sep-06 16:07 
GeneralRe: How Do I Incorporate mySQL into my web CGI app made in C++ Pin
Stephen Hewitt19-Sep-06 16:10
Stephen Hewitt19-Sep-06 16:10 
GeneralRe: How Do I Incorporate mySQL into my web CGI app made in C++ Pin
S0uthy20-Sep-06 13:54
S0uthy20-Sep-06 13:54 
GeneralRe: How Do I Incorporate mySQL into my web CGI app made in C++ Pin
Christian Graus20-Sep-06 13:59
protectorChristian Graus20-Sep-06 13:59 
QuestionNetwork communication programming problem Pin
zouchao111219-Sep-06 14:22
zouchao111219-Sep-06 14:22 
QuestionCPP Calling Syntax of Member functions. Pin
Bram van Kampen19-Sep-06 13:55
Bram van Kampen19-Sep-06 13:55 

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.