Click here to Skip to main content
15,890,690 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help in VC code Pin
ThatsAlok16-Oct-05 22:18
ThatsAlok16-Oct-05 22:18 
GeneralRe: help in VC code Pin
Cedric Moonen17-Oct-05 3:26
Cedric Moonen17-Oct-05 3:26 
GeneralRe: help in VC code Pin
Eytukan17-Oct-05 3:53
Eytukan17-Oct-05 3:53 
AnswerRe: help in VC code Pin
ThatsAlok16-Oct-05 22:41
ThatsAlok16-Oct-05 22:41 
AnswerRe: help in VC code Pin
Iain Clarke, Warrior Programmer17-Oct-05 0:20
Iain Clarke, Warrior Programmer17-Oct-05 0:20 
Questionvc++ ado xml mssql 2000 problem - only reurns the first 2033 characters of my xml Pin
compoundeye16-Oct-05 21:41
compoundeye16-Oct-05 21:41 
Answersolved my own problem Pin
compoundeye17-Oct-05 11:26
compoundeye17-Oct-05 11:26 
Questionmoving controls on a dialog dynamically Pin
caykahve16-Oct-05 21:23
caykahve16-Oct-05 21:23 
Hi,
I have a dialog based application on which I have a tab control made of dialogs. On the tab pages I have some controls. I want to move some of these controls dynamically.

The control's start coordinates seen from the resource view are (7,3), which should be seen as left:7,top:3 from a CRect type. I see some strange behaviour with the below codes (called from CTab1Dlg class member functions):

Test 1:
CRect rect;<br />
GetDlgItem(IDC_STAT1)->GetClientRect(&rect); // start point is (0,0) here<br />
GetDlgItem(IDC_STAT1)->MoveWindow(&rect);<br />
UpdateData(false);

afterwards the control moves to the left and upwards.

Test 2:
If I put this line before MoveWindow() line above, then the control still moves to left and upwards, but this time a little.
rect.OffsetRect(7,3);

Test 3:
If I change the inputs to (11,5), then the position does not change:
rect.OffsetRect(11,5);

Test 4:
If I try to get the coordinates of the tab's dialog then I get an access violation when i try to reach its members:
GetDlgItem(IDD_TAB1)->GetClientRect(&rect);
I want to shift the controls upwards and downwards dynamically. How can I get the correct initial coordinates?

thanks in advance
AnswerRe: moving controls on a dialog dynamically Pin
Iain Clarke, Warrior Programmer17-Oct-05 0:17
Iain Clarke, Warrior Programmer17-Oct-05 0:17 
GeneralRe: moving controls on a dialog dynamically Pin
caykahve17-Oct-05 2:12
caykahve17-Oct-05 2:12 
AnswerRe: moving controls on a dialog dynamically Pin
David Crow17-Oct-05 2:42
David Crow17-Oct-05 2:42 
GeneralRe: moving controls on a dialog dynamically Pin
Eytukan17-Oct-05 4:24
Eytukan17-Oct-05 4:24 
QuestionHow to create assembly file Pin
Ritu Kwatra16-Oct-05 21:04
Ritu Kwatra16-Oct-05 21:04 
AnswerRe: How to create assembly file Pin
ThatsAlok16-Oct-05 21:45
ThatsAlok16-Oct-05 21:45 
AnswerRe: How to create assembly file Pin
Rage16-Oct-05 23:36
professionalRage16-Oct-05 23:36 
QuestionHow to create assembly file Pin
Ritu Kwatra16-Oct-05 21:04
Ritu Kwatra16-Oct-05 21:04 
QuestionChecking Windows Version in installation Pin
Anonymous16-Oct-05 20:38
Anonymous16-Oct-05 20:38 
QuestionLine Profiling Pin
ashwath200516-Oct-05 20:31
ashwath200516-Oct-05 20:31 
QuestionInstallation for VC++ project Pin
Anonymous16-Oct-05 20:28
Anonymous16-Oct-05 20:28 
Questionhelp! why the compiler kept modifying my source file? Pin
ewighell16-Oct-05 19:29
ewighell16-Oct-05 19:29 
AnswerRe: help! why the compiler kept modifying my source file? Pin
Rage16-Oct-05 23:39
professionalRage16-Oct-05 23:39 
GeneralRe: help! why the compiler kept modifying my source file? Pin
ewighell17-Oct-05 1:00
ewighell17-Oct-05 1:00 
QuestionHow to find data encoding of received buffer with WSARecv Pin
Member 168985516-Oct-05 19:00
Member 168985516-Oct-05 19:00 
AnswerRe: How to find data encoding of received buffer with WSARecv Pin
ThatsAlok16-Oct-05 21:43
ThatsAlok16-Oct-05 21:43 
Questionunable to get all Messages from Clients using IOCP Pin
Member 168985516-Oct-05 18:58
Member 168985516-Oct-05 18:58 

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.