Click here to Skip to main content
15,910,872 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEdit the Enum Section of the registry Pin
tareqsiraj18-Apr-04 3:43
tareqsiraj18-Apr-04 3:43 
GeneralRe: Edit the Enum Section of the registry Pin
Antti Keskinen18-Apr-04 6:26
Antti Keskinen18-Apr-04 6:26 
GeneralRe: Edit the Enum Section of the registry Pin
tareqsiraj20-Apr-04 0:09
tareqsiraj20-Apr-04 0:09 
GeneralRe: Edit the Enum Section of the registry Pin
tareqsiraj21-Apr-04 5:39
tareqsiraj21-Apr-04 5:39 
Generalerror C2440 Pin
ketil b18-Apr-04 3:36
ketil b18-Apr-04 3:36 
GeneralRe: error C2440 Pin
Michael Dunn18-Apr-04 3:58
sitebuilderMichael Dunn18-Apr-04 3:58 
GeneralRe: error C2440 Pin
ketil b18-Apr-04 4:17
ketil b18-Apr-04 4:17 
GeneralGetting the coordinate of a child window Pin
Alton Williams18-Apr-04 3:15
Alton Williams18-Apr-04 3:15 
I having a problem with a control (say an edit box) on a Dialogue or FormView.
in my resource script is as follows
    EDITTEXT        IDC_EDIT1,34,50,26,14,ES_AUTOHSCROLL | NOT WS_BORDER<br />
   PUSHBUTTON      "&Size Info",IDC_SIZE_INFO,69,91,56,26<br />
<br />

I've a handler for the button
as follows:
  1. <br />
    void CMyDialog::OnSizeInfo()<br />
    {<br />
    CRect ButtonRect, EditRect;<br />
    CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
    CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
    pEdit->GetClientRect(EditRect);<br />
    pButton->GetClientRect(ButtonRect);<br />
    }<br />

  2. <br />
    void CMyDialog::OnSizeInfo()<br />
    {<br />
    CRect ButtonRect, EditRect;<br />
    CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
    CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
    pEdit->GetWindowRect(EditRect);<br />
    pButton->GetWindowRect(ButtonRect);<br />
    }<br />

  3. <br />
    void CMyDialog::OnSizeInfo()<br />
    {<br />
    CRect ButtonRect, EditRect;<br />
    CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
    CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
    ::GetClientRect(pEdit,EditRect);<br />
    ::GetClientRect(pButton,ButtonRect);<br />
    }<br />

  4. <br />
    void CMyDialog::OnSizeInfo()<br />
    {<br />
    CRect ButtonRect, EditRect;<br />
    CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
    CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
    ::GetWindowRect(pEdit,EditRect);<br />
    ::GetWindowRect(pButton,ButtonRect);<br />
    }<br />



in all cases the top and left properties are 0 and 0 and not 34 and 50 (EditRect) or 69 and 91 (ButtonRect). How I get this programatically.

Many thanks
Alton
GeneralRe: Getting the coordinate of a child window Pin
ohadp18-Apr-04 4:53
ohadp18-Apr-04 4:53 
Generalurgent help required about LAP link Pin
amir_iiui17-Apr-04 22:21
amir_iiui17-Apr-04 22:21 
Generalinheritance problem Pin
kfaday17-Apr-04 16:28
kfaday17-Apr-04 16:28 
GeneralRe: inheritance problem Pin
Ravi Bhavnani17-Apr-04 17:36
professionalRavi Bhavnani17-Apr-04 17:36 
GeneralRe: inheritance problem Pin
monrobot1317-Apr-04 18:16
monrobot1317-Apr-04 18:16 
GeneralRe: inheritance problem Pin
markkuk18-Apr-04 0:19
markkuk18-Apr-04 0:19 
QuestionHow do you add coloring to text... Pin
Snyp17-Apr-04 15:38
Snyp17-Apr-04 15:38 
AnswerRe: How do you add coloring to text... Pin
Dominik Reichl17-Apr-04 22:43
Dominik Reichl17-Apr-04 22:43 
QuestionHow do you clear recent documents... Pin
Snyp17-Apr-04 15:35
Snyp17-Apr-04 15:35 
AnswerRe: How do you clear recent documents... Pin
Mike Dimmick18-Apr-04 1:47
Mike Dimmick18-Apr-04 1:47 
GeneralMultiple dialogs Pin
Ashman17-Apr-04 14:18
Ashman17-Apr-04 14:18 
GeneralRe: Multiple dialogs Pin
Maximilien17-Apr-04 14:37
Maximilien17-Apr-04 14:37 
GeneralRe: Multiple dialogs Pin
Ashman17-Apr-04 14:39
Ashman17-Apr-04 14:39 
GeneralRe: Multiple dialogs Pin
Ashman17-Apr-04 14:50
Ashman17-Apr-04 14:50 
GeneralRe: Multiple dialogs Pin
Ravi Bhavnani17-Apr-04 16:02
professionalRavi Bhavnani17-Apr-04 16:02 
Generalabout reflact message on ComboBox!! Pin
GreenXML17-Apr-04 14:09
GreenXML17-Apr-04 14:09 
GeneralRe: about reflact message on ComboBox!! Pin
Ravi Bhavnani17-Apr-04 17:49
professionalRavi Bhavnani17-Apr-04 17:49 

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.