Click here to Skip to main content
13,768,679 members

C / C++ / MFC

 
GeneralRe: Extending the C using preprocessor and other goodies - how do they interact? Pin
Vaclav_1-May-13 10:03
memberVaclav_1-May-13 10:03 
GeneralRe: Extending the C using preprocessor and other goodies - how do they interact? Pin
jschell2-May-13 9:03
memberjschell2-May-13 9:03 
GeneralRe: Extending the C using preprocessor and other goodies - how do they interact? Pin
Stefan_Lang1-May-13 22:54
memberStefan_Lang1-May-13 22:54 
GeneralRe: Extending the C using preprocessor and other goodies - how do they interact? Pin
Vaclav_4-May-13 6:34
memberVaclav_4-May-13 6:34 
GeneralRe: Extending the C using preprocessor and other goodies - how do they interact? Pin
Stefan_Lang6-May-13 0:39
memberStefan_Lang6-May-13 0:39 
QuestionOwner Draw MenuItem Displaying large in Size in Debug but in release it is Ok Pin
002comp30-Apr-13 22:14
member002comp30-Apr-13 22:14 
AnswerRe: Owner Draw MenuItem Displaying large in Size in Debug but in release it is Ok Pin
Richard MacCutchan30-Apr-13 22:34
protectorRichard MacCutchan30-Apr-13 22:34 
GeneralRe: Owner Draw MenuItem Displaying large in Size in Debug but in release it is Ok Pin
002comp1-May-13 1:25
member002comp1-May-13 1:25 
hello Sir
I know that I didn't Post any Code and asking for Ideas. am Sorry for that.
But I found tht in Fn Onmeasureitem ,we are using drawText to get height of Text which is returning wrong [>1] in debug build and 1 in rlease build.

CWindowDC dc(NULL);  // screen DC--I won't actually draw on it
         CRect rcText(0,0,0,0);
         CFont* pOldFont = dc.SelectObject(GetMenuFont());
         dc.DrawText(pmd->text, rcText, DT_MYSTANDARD|DT_CALCRECT);
         CSize size = dc.GetTextExtent(pmd->text);
         dc.SelectObject(pOldFont);

         // height of item is just height of a standard menu item
         lpms->itemHeight= max(GetSystemMetrics(SM_CYMENU), rcText.Height()+1);

         // width is width of text plus a bunch of stuff
         int cx = rcText.Width();   // text width
         cx += CXTEXTMARGIN<<1;     // L/R margin for readability
         cx += CXGAP;               // space between button and menu text
         cx += m_szButton.cx<<1;    // button width (L=button; R=empty margin)

         // whatever value I return in lpms->itemWidth, Windows will add the
         // width of a menu checkmark, so I must subtract to defeat Windows. Argh.
         //
         cx -= GetSystemMetrics(SM_CXMENUCHECK)-1;
         lpms->itemWidth = cx;      // done deal


Now, Any Ideas. m compiling it on VS 2010.

Regards
Y
SuggestionRe: Owner Draw MenuItem Displaying large in Size in Debug but in release it is Ok Pin
Richard MacCutchan1-May-13 2:49
protectorRichard MacCutchan1-May-13 2:49 
QuestionDetect specific finger tip in convexhull Pin
Dilan Shaminda30-Apr-13 20:34
professionalDilan Shaminda30-Apr-13 20:34 
SuggestionRe: Detect specific finger tip in convexhull Pin
Vaclav_1-May-13 6:46
memberVaclav_1-May-13 6:46 
GeneralRe: Detect specific finger tip in convexhull Pin
Dilan Shaminda1-May-13 21:16
professionalDilan Shaminda1-May-13 21:16 
GeneralRe: Detect specific finger tip in convexhull Pin
Dilan Shaminda1-May-13 21:16
professionalDilan Shaminda1-May-13 21:16 
QuestionThe "hide_gui" key in the regedit , i want to know how does it works? Pin
ITboy_Lemon30-Apr-13 17:42
professionalITboy_Lemon30-Apr-13 17:42 
AnswerRe: The "hide_gui" key in the regedit , i want to know how does it works? Pin
Richard MacCutchan30-Apr-13 22:31
protectorRichard MacCutchan30-Apr-13 22:31 
QuestionAccess structure variable value using string representing variable's name in C++. Pin
shanmugarajaa30-Apr-13 2:43
membershanmugarajaa30-Apr-13 2:43 
AnswerRe: Access structure variable value using string representing variable's name in C++. Pin
Sivaraman Dhamodharan30-Apr-13 3:10
memberSivaraman Dhamodharan30-Apr-13 3:10 
AnswerRe: Access structure variable value using string representing variable's name in C++. Pin
Chris Losinger30-Apr-13 5:07
professionalChris Losinger30-Apr-13 5:07 
AnswerRe: Access structure variable value using string representing variable's name in C++. Pin
Newbie0030-Apr-13 8:43
memberNewbie0030-Apr-13 8:43 
AnswerRe: Access structure variable value using string representing variable's name in C++. Pin
jschell30-Apr-13 10:47
memberjschell30-Apr-13 10:47 
AnswerRe: Access structure variable value using string representing variable's name in C++. Pin
Stefan_Lang1-May-13 23:09
memberStefan_Lang1-May-13 23:09 
QuestionCatch OnKeyDown in CDialog Pin
_Flaviu30-Apr-13 0:52
member_Flaviu30-Apr-13 0:52 
AnswerRe: Catch OnKeyDown in CDialog Pin
Chris Losinger30-Apr-13 2:52
professionalChris Losinger30-Apr-13 2:52 
GeneralRe: Catch OnKeyDown in CDialog Pin
_Flaviu30-Apr-13 3:11
member_Flaviu30-Apr-13 3:11 
QuestionReadfile to read parent process console buffer Pin
ForNow29-Apr-13 16:51
memberForNow29-Apr-13 16:51 

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.


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.181116.1 | Last Updated 18 Nov 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid