Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to increate network transfer speed? Pin
Charles Oppermann26-Aug-11 10:40
Charles Oppermann26-Aug-11 10:40 
QuestionCFormView control sizing Pin
Manmohan2924-Aug-11 21:33
Manmohan2924-Aug-11 21:33 
AnswerRe: CFormView control sizing [modified] Pin
xrg_soft@163.com24-Aug-11 21:52
xrg_soft@163.com24-Aug-11 21:52 
GeneralRe: CFormView control sizing Pin
Manmohan2924-Aug-11 22:33
Manmohan2924-Aug-11 22:33 
GeneralRe: CFormView control sizing [modified] Pin
xrg_soft@163.com25-Aug-11 4:10
xrg_soft@163.com25-Aug-11 4:10 
GeneralRe: CFormView control sizing Pin
Manmohan2925-Aug-11 19:42
Manmohan2925-Aug-11 19:42 
GeneralRe: CFormView control sizing Pin
Rage24-Aug-11 22:17
professionalRage24-Aug-11 22:17 
GeneralRe: CFormView control sizing Pin
Manmohan2924-Aug-11 22:31
Manmohan2924-Aug-11 22:31 
This is working fine :-
C++
void CMainView::OnInitialUpdate()                  // CMainView is my application's default view
{
	CFormView::OnInitialUpdate();
	
	initialized = TRUE;
	CWnd *pGridCtrl = GetDlgItem(IDC_SALEPURCHASEGRIDCTRL);
	CRect rect,grid_rect;
	
	CWnd *pWnd = this->GetOwner();
	pWnd->GetClientRect(rect);
	

	pGridCtrl->GetWindowRect(grid_rect);     // works fine here
	grid_rect = rect;
	grid_rect.left += 16;
	grid_rect.top += 150;
	grid_rect.bottom -= 300;
	grid_rect.right -= 16;

	pGridCtrl->MoveWindow(grid_rect);        // GridCtrl is resized properly
.
.
.


This is not working properly:-
C++
void CMembersView::OnInitialUpdate()
{
	
	CFormView::OnInitialUpdate();
	
	initialized = TRUE;
	CWnd *pGridCtrl = this->GetDlgItem(IDC_MEMBERSGRID);
	ASSERT(pGridCtrl);		// Must exist

	CRect rect,grid_rect;
	
	CWnd *pWnd = this->GetOwner();
	pWnd->GetClientRect(rect);                // Also tried with &rect
	
	pGridCtrl->GetWindowRect(grid_rect); // problem is here. no grid_rect coordinates.   Also tried with &grid_rect
	grid_rect = rect;
	grid_rect.left += 16;
	grid_rect.top += 150;
	grid_rect.bottom -= 300;
	grid_rect.right -= 16;

	pGridCtrl->MoveWindow(&grid_rect);
.
.
.

---------------------------------------------
" Future Lies in Present "Manmohan Bishnoi


GeneralRe: CFormView control sizing Pin
Rage24-Aug-11 23:31
professionalRage24-Aug-11 23:31 
GeneralRe: CFormView control sizing Pin
Manmohan2924-Aug-11 23:33
Manmohan2924-Aug-11 23:33 
GeneralRe: CFormView control sizing Pin
Rage24-Aug-11 23:39
professionalRage24-Aug-11 23:39 
GeneralRe: CFormView control sizing Pin
Manmohan2925-Aug-11 0:05
Manmohan2925-Aug-11 0:05 
GeneralRe: CFormView control sizing Pin
Rage25-Aug-11 0:11
professionalRage25-Aug-11 0:11 
QuestionAmbiguity of 'this' and 'member function' [modified] Pin
Dean Seo24-Aug-11 15:12
Dean Seo24-Aug-11 15:12 
AnswerRe: Ambiguity of 'this' and 'member function' Pin
xrg_soft@163.com24-Aug-11 19:32
xrg_soft@163.com24-Aug-11 19:32 
GeneralRe: Ambiguity of 'this' and 'member function' Pin
Dean Seo24-Aug-11 20:53
Dean Seo24-Aug-11 20:53 
GeneralRe: Ambiguity of 'this' and 'member function' Pin
xrg_soft@163.com24-Aug-11 21:42
xrg_soft@163.com24-Aug-11 21:42 
GeneralRe: Ambiguity of 'this' and 'member function' Pin
Dean Seo24-Aug-11 22:36
Dean Seo24-Aug-11 22:36 
AnswerRe: Ambiguity of 'this' and 'member function' Pin
CPallini24-Aug-11 21:34
mveCPallini24-Aug-11 21:34 
GeneralRe: Ambiguity of 'this' and 'member function' Pin
Dean Seo24-Aug-11 22:37
Dean Seo24-Aug-11 22:37 
Questionfind task manager process Pin
trioum24-Aug-11 7:02
trioum24-Aug-11 7:02 
AnswerRe: find task manager process Pin
Code-o-mat24-Aug-11 7:19
Code-o-mat24-Aug-11 7:19 
GeneralRe: find task manager process Pin
Rage24-Aug-11 22:24
professionalRage24-Aug-11 22:24 
QuestionLens blur effect Pin
Dusan Paulovic24-Aug-11 6:07
Dusan Paulovic24-Aug-11 6:07 
AnswerRe: Lens blur effect Pin
enhzflep24-Aug-11 21:09
enhzflep24-Aug-11 21:09 

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.