Click here to Skip to main content
15,913,685 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: resolve ip to hostname Pin
particle2k10-Feb-03 1:39
particle2k10-Feb-03 1:39 
GeneralRe: resolve ip to hostname Pin
Ted Ferenc10-Feb-03 3:09
Ted Ferenc10-Feb-03 3:09 
Generalpretty print Pin
Andreas Fabri9-Feb-03 23:21
Andreas Fabri9-Feb-03 23:21 
GeneralRe: pretty print Pin
Mike Nordell10-Feb-03 2:25
Mike Nordell10-Feb-03 2:25 
GeneralCButton DrawItem problem Pin
Brian van der Beek9-Feb-03 23:08
Brian van der Beek9-Feb-03 23:08 
GeneralRe: CButton DrawItem problem Pin
HENDRIK R9-Feb-03 23:15
HENDRIK R9-Feb-03 23:15 
GeneralRe: CButton DrawItem problem Pin
Brian van der Beek9-Feb-03 23:39
Brian van der Beek9-Feb-03 23:39 
GeneralRe: CButton DrawItem problem Pin
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:15
ANIL KUMAR SHARMA (INDIA)14-Jul-09 19:15 
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.

other code here...

Any idea or help is appriciated.

Thanks
Anil

[AKS]

GeneralPlease Help ...ADSI SetPassword failes without any error code Pin
prasadkmadam9-Feb-03 22:47
prasadkmadam9-Feb-03 22:47 
GeneralRe: Please Help ...ADSI SetPassword failes without any error code Pin
AlexO10-Feb-03 2:43
AlexO10-Feb-03 2:43 
GeneralRe: Please Help ...ADSI SetPassword failes without any error code Pin
prasadkmadam11-Feb-03 1:15
prasadkmadam11-Feb-03 1:15 
GeneralProblem with CStatic control Pin
Didaa9-Feb-03 22:26
Didaa9-Feb-03 22:26 
GeneralRe: Problem with CStatic control Pin
HENDRIK R9-Feb-03 23:05
HENDRIK R9-Feb-03 23:05 
GeneralRe: Problem with CStatic control Pin
KaЯl9-Feb-03 23:30
KaЯl9-Feb-03 23:30 
GeneralRe: Problem with CStatic control Pin
Didaa10-Feb-03 19:39
Didaa10-Feb-03 19:39 
GeneralMAPISendDocuments on Win2K functioned not, with a CreateProcess call by a Printer PortMonitor Pin
Karl Bauer9-Feb-03 22:22
Karl Bauer9-Feb-03 22:22 
GeneralChange the IP Pin
Sonu Kapoor9-Feb-03 22:16
Sonu Kapoor9-Feb-03 22:16 
GeneralRe: Change the IP Pin
jhwurmbach9-Feb-03 23:23
jhwurmbach9-Feb-03 23:23 
GeneralTVM_GETISEARCHSTRING Pin
Tibor Blazko9-Feb-03 21:37
Tibor Blazko9-Feb-03 21:37 
Generalstd::sort(....) -> error C2039: 'sort' : is not a member of 'std' Pin
whofmans9-Feb-03 20:50
whofmans9-Feb-03 20:50 
GeneralRe: std::sort(....) -> error C2039: 'sort' : is not a member of 'std' Pin
Chris Losinger9-Feb-03 20:54
professionalChris Losinger9-Feb-03 20:54 
GeneralRe: std::sort(....) -> error C2039: 'sort' : is not a member of 'std' Pin
whofmans9-Feb-03 21:11
whofmans9-Feb-03 21:11 
GeneralThreading related question Pin
Shah Shehpori9-Feb-03 20:23
sussShah Shehpori9-Feb-03 20:23 
GeneralRe: Threading related question Pin
Arjan Schouten9-Feb-03 21:20
Arjan Schouten9-Feb-03 21:20 
GeneralRe: Threading related question Pin
Sparticus9-Feb-03 21:24
Sparticus9-Feb-03 21:24 

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.