Click here to Skip to main content
15,924,039 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Query abt dialog box Pin
Member 30398431-Jun-06 19:47
Member 30398431-Jun-06 19:47 
GeneralRe: Query abt dialog box Pin
Benoy Bose1-Jun-06 19:51
Benoy Bose1-Jun-06 19:51 
GeneralRe: Query abt dialog box Pin
Nibu babu thomas1-Jun-06 19:52
Nibu babu thomas1-Jun-06 19:52 
GeneralRe: Query abt dialog box Pin
Member 30398431-Jun-06 20:26
Member 30398431-Jun-06 20:26 
AnswerRe: Query abt dialog box Pin
Hamid_RT1-Jun-06 19:25
Hamid_RT1-Jun-06 19:25 
GeneralRe: Query abt dialog box Pin
Member 30398431-Jun-06 20:06
Member 30398431-Jun-06 20:06 
GeneralRe: Query abt dialog box Pin
Hamid_RT1-Jun-06 20:32
Hamid_RT1-Jun-06 20:32 
GeneralRe: Query abt dialog box Pin
Benoy Bose1-Jun-06 20:46
Benoy Bose1-Jun-06 20:46 
Hey, just reduce the code lines do as follows

void CEgAppDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);

CRect ClientRect( 0, 0, 0, 0 );
GetClientRect( ClientRect );
if( FALSE != IsWindow( m_edit.GetSafeHwnd()))
{
m_edit.MoveWindow( ClientRect );
}
}

This code is expected to work only when the Dialog is forcely resize by using Minimize, Maximize, Drag Size etc. To resize the control in Initial state you have to put some similiar code in the OnInitDialog of the dialog class like

CRect ClientRect( 0, 0, 0, 0 );
GetClientRect( ClientRect );
m_edit.MoveWindow( ClientRect );

In OnInitDialog you do not have to check the Window handle because OnInitDialog is called after the creation of the Dialog Box and it's control. But you should check the Validity of m_edit window in OnSize because it is called by the framework when the DialogBox alone is created, before the edit is created.

OK ?

Regards,
Benoy Bose
AnswerRe: Query abt dialog box Pin
ThatsAlok1-Jun-06 20:31
ThatsAlok1-Jun-06 20:31 
Questionauto finding the dir the exe is in Pin
locoone1-Jun-06 17:39
locoone1-Jun-06 17:39 
AnswerRe: auto finding the dir the exe is in Pin
Nibu babu thomas1-Jun-06 17:47
Nibu babu thomas1-Jun-06 17:47 
AnswerRe: auto finding the dir the exe is in Pin
Sarath C1-Jun-06 18:15
Sarath C1-Jun-06 18:15 
AnswerRe: auto finding the dir the exe is in Pin
Hamid_RT1-Jun-06 19:31
Hamid_RT1-Jun-06 19:31 
AnswerRe: auto finding the dir the exe is in Pin
toxcct1-Jun-06 21:42
toxcct1-Jun-06 21:42 
QuestionIs DCB setttings important if using virtual COM port? Pin
tctan1-Jun-06 17:31
tctan1-Jun-06 17:31 
AnswerRe: Is DCB setttings important if using virtual COM port? Pin
ThatsAlok1-Jun-06 20:29
ThatsAlok1-Jun-06 20:29 
GeneralRe: Is DCB setttings important if using virtual COM port? [modified] Pin
tctan1-Jun-06 22:02
tctan1-Jun-06 22:02 
AnswerRe: Is DCB setttings important if using virtual COM port? [modified] Pin
Roger Stoltz1-Jun-06 22:51
Roger Stoltz1-Jun-06 22:51 
Questionabout smtp server problem ,thanks Pin
alicqin1-Jun-06 16:34
alicqin1-Jun-06 16:34 
QuestionPointer/structure usage Pin
fourierman1-Jun-06 16:28
fourierman1-Jun-06 16:28 
QuestionCDialog DoModal doesn't work inside threads? Pin
Dennis Furlaneto1-Jun-06 16:01
Dennis Furlaneto1-Jun-06 16:01 
AnswerRe: CDialog DoModal doesn't work inside threads? Pin
Nibu babu thomas1-Jun-06 17:40
Nibu babu thomas1-Jun-06 17:40 
GeneralRe: CDialog DoModal doesn't work inside threads? Pin
Dennis Furlaneto2-Jun-06 3:35
Dennis Furlaneto2-Jun-06 3:35 
QuestionCan anyone see the problem-newbie [modified] Pin
antonaras1-Jun-06 8:34
antonaras1-Jun-06 8:34 
AnswerRe: Can anyone see the problem-newbie Pin
antonaras1-Jun-06 8:36
antonaras1-Jun-06 8:36 

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.