BOOL CTemplateWizardDialog::OnInitDialog() 
{
	TEMPLATE_WIZARD_DIALOG::OnInitDialog();
	
	// Set the icon for this dialog.
	HICON hIcon = AfxGetApp()->LoadIcon(IDI_WWHIZ);
	SetIcon(hIcon, TRUE);			// Set big icon
	SetIcon(hIcon, FALSE);		// Set small icon

	CRect dlgClient;
	GetClientRect(dlgClient);
	ClientToScreen(dlgClient);

	CRect rectClient;
	GetDlgItem(IDC_TW_HTML)->GetWindowRect(rectClient);
	rectClient.OffsetRect(-dlgClient.left, -dlgClient.top);
	GetDlgItem(IDC_TW_HTML)->DestroyWindow();
	
	m_wndBrowser.SetWindowPos(NULL, rectClient.left, rectClient.top,
		rectClient.Width(), rectClient.Height(), SWP_NOZORDER);

	// Resizing stuff.
	AddSzControl(*GetDlgItem(IDCANCEL),				mdRepos,	mdRepos);
	AddSzControl(*GetDlgItem(IDC_TW_PREVIOUS),		mdRepos,	mdRepos);
	AddSzControl(*GetDlgItem(IDC_TW_NEXT),			mdRepos,	mdRepos);

	AddSzControl(m_wndBrowser,						mdResize,	mdResize);

	Render();
	
	return FALSE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Example #2
0
BOOL CCallStackDlg::OnInitDialog() 
{
	cdxCDynamicBarDlg::OnInitDialog();
	
	AddSzControl(m_list, mdResize, mdResize);
	m_list.InsertColumn(0, _T("Function"), LVCFMT_LEFT, 300);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CVariablesBar::OnInitDialog() 
{
	cdxCDynamicBarDlg::OnInitDialog();
	
	m_grid.CreateGrid(this, IDC_VB_GRID);
	AddSzControl(m_grid, mdResize, mdResize);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
void CDebuggerView::OnInitialUpdate()
{
    cdxCDynamicFormView::OnInitialUpdate();

    static bool firstTime = true;

    if (firstTime)
    {
        theApp.GetMainFrame()->Init();
        CWnd* tempWnd = GetDlgItem(IDC_DB_EDITOR);
        CRect editorRect;
        tempWnd->GetWindowRect(editorRect);

        CRect dialogRect;
        GetClientRect(dialogRect);
        ClientToScreen(dialogRect);

        editorRect.OffsetRect(-dialogRect.TopLeft());

        m_editor.Create(GetSafeHwnd(), editorRect);

//jj		m_localsGrid.CreateGrid(this, IDC_DB_LOCALS);
//jj		m_localsGrid.Init();
//jj		m_watchGrid.CreateGrid(this, IDC_DB_WATCH);
//jj		m_watchGrid.Init();
//jj		m_watchGrid.BuildWatch("Locals");

///////////		theApp.GetMainFrame()->GetWatchBar().GetGrid().BuildWatch("Locals");

//jj		AddSzControl(m_localsGrid, 100, 0, 100, 50);
//jj		AddSzControl(m_watchGrid, 100, 50, 100, 100);
//jj		AddSzControl(IDC_DB_LOCALSSTATIC, 100, 0, 100, 0);
//jj		AddSzControl(IDC_DB_WATCHSTATIC, 100, 50, 100, 50);
//		AddSzControl(m_actionList, 0, 0, 0, 50);
//		AddSzControl(m_generatedActionList, 0, 50, 0, 100);
        AddSzControl(m_editor.GetWindowHandle(), mdResize, mdResize);
//		AddSzControl(m_actionGrid->GetSafeHwnd(), mdResize, mdResize);

//		m_actionList.SetExtendedStyle(m_actionList.GetExtendedStyle() | LVS_EX_FULLROWSELECT);
//		m_actionList.InsertColumn(0, "Actions", LVCFMT_LEFT, 200);
//		m_generatedActionList.SetExtendedStyle(m_generatedActionList.GetExtendedStyle() | LVS_EX_FULLROWSELECT);
//		m_generatedActionList.InsertColumn(0, "Generated Actions", LVCFMT_LEFT, 200);

        firstTime = false;

//		m_gridActive = true;
//		::ShowWindow(m_editor.GetWindowHandle(), SW_HIDE);

        tempWnd->DestroyWindow();

        m_editor.SendEditor(SCI_SETFOCUS, 1);
    }
}
void cdxCDynamicControlsManager::DoInitWindow(CWnd & rWnd, Freedom fd, bool bSizeIcon, const CSize * pBaseClientSize)
{
	ASSERT(m_pWnd == NULL);					// you MUST NOT call this function twice !
	ASSERT(::IsWindow(rWnd.m_hWnd));		// rWnd MUST already exist !!

	m_pWnd		=	&rWnd;
	m_Freedom	=	fd;

	//
	// get current's window size
	//

	CRect			rect;
	m_pWnd->GetWindowRect(&rect);
	CRect			rectClient;
	m_pWnd->GetClientRect(&rectClient);

	if(!pBaseClientSize)
	{
		m_szClientRelative.cx	=	rectClient.Width();
		m_szClientRelative.cy	=	rectClient.Height();

		m_szMin.cx	=	rect.Width();
		m_szMin.cy	=	rect.Height();
	}
	else
	{
		ASSERT((pBaseClientSize->cx > 0) && (pBaseClientSize->cy > 0));

		m_szClientRelative	=	*pBaseClientSize;
		m_szMin.cx				=	m_szClientRelative.cx + (rect.Width() - rectClient.Width());
		m_szMin.cy				=	m_szClientRelative.cy + (rect.Height() - rectClient.Height());
	}

	m_szMax.cx	=	0;
	m_szMax.cy	=	0;

	//
	// set up icon if wanted
	//

	if(bSizeIcon)
	{
		VERIFY( m_pWndSizeIcon = new cdxCSizeIconCtrl );
		VERIFY( m_pWndSizeIcon->Create(m_pWnd,m_idSizeIcon) );	// creates my control; id is SIZE_CONTROL_ID

		AddSzControl(*m_pWndSizeIcon,mdRepos,mdRepos);
		m_pWndSizeIcon->ShowWindow(SW_SHOW);		// finally - show it
	}
}
Example #6
0
void cdxCDynamicWnd::AllControls(const SBYTES & bytes, bool bOverwrite, bool bReposNow)
{
	if(!IsWindow())
	{
		ASSERT(false);
		return;
	}

	Position	pos;
	UINT		nCnt	=	0;

	for(HWND hwnd = ::GetWindow(m_pWnd->m_hWnd,GW_CHILD); hwnd; hwnd = ::GetNextWindow(hwnd,GW_HWNDNEXT))
	{
		if(bOverwrite || !m_Map.Lookup(hwnd,pos))
			if(AddSzControl(hwnd,bytes,false))
				++nCnt;
	}

	if(nCnt && bReposNow)
		Layout();
}
Example #7
0
BOOL CTimeEv::OnInitDialog() 
{
	cdxCSizingDialog::OnInitDialog();
	RestoreWindowPosition(_T("Main\\TimeWindow")); 	

	AddSzControl( m_wndScrollTime, mdResize, mdRepos); 
	AddSzControl( m_wndListArenaCl, mdNone, mdRepos); 
	AddSzControl( m_wndListRoomCl, mdNone, mdRepos); 
	AddSzControl( m_wndCmbArena, mdNone, mdRepos); 
	AddSzControl( m_wndCmbRoom, mdNone, mdRepos); 

	AddSzControl( m_wndCmbOrigNew, mdRepos, mdRepos); 
	AddSzControl( m_wndSpinTime, mdRepos, mdRepos); 
	AddSzControl( m_wndEditTime, mdRepos, mdRepos);
	AddSzControl( m_wndCheckRaster, mdRepos, mdRepos);
	AddSzControl( m_wndCheckSpike, mdRepos, mdRepos);
	AddSzControl( m_wndPlay, mdRepos, mdRepos); 
	AddSzControl( m_wndClear, mdRepos, mdRepos); 
	AddSzControl( m_wndPlaySpeed, mdRepos, mdRepos);
	AddSzControl( m_wndSpinPlaySpeed, mdRepos, mdRepos);
	AddSzControl( m_wndSetEEGGains, mdRepos, mdRepos);
	AddSzControl( m_wndVideo, mdRepos, mdRepos);
	AddSzControl( m_wndSetTime, mdRepos, mdRepos);
	AddSzControl( m_wndEditSetTime, mdRepos, mdRepos);
	AddSzControl( m_wndMax, mdRepos, mdRepos); 
	
	AddSzControl( m_wndTakePict, mdRepos, mdRepos); 
	AddSzControl( m_wndOK, mdRepos, mdRepos); 
	AddSzControl( m_wndCancel, mdRepos, mdRepos); 

	AddSzControl( m_wndListScale, mdRepos, mdResize); 
	AddSzControl( m_wndListSpikeCl, mdRepos, mdRepos); 

	m_wndCheckSpike.SetCheck(0);
	m_wndCheckRaster.SetCheck(1);
	m_wndCmbOrigNew.AddString(TEXT("Your new cl."));
	m_wndCmbOrigNew.AddString(TEXT("Original cl."));
	m_wndCmbArena.AddString(TEXT("points"));
	m_wndCmbArena.AddString(TEXT("circles"));
	m_wndCmbArena.AddString(TEXT("vectors"));
	m_wndCmbRoom.AddString(TEXT("points"));
	m_wndCmbRoom.AddString(TEXT("circles"));
	m_wndCmbRoom.AddString(TEXT("vectors"));
	m_wndCmbArena.SetCurSel(0);
	m_wndCmbRoom.SetCurSel(0);
	mPrepareFlag = 0;

	m_HCross = AfxGetApp()->LoadStandardCursor(IDC_CROSS);

	GetClientRect(m_MainRect);
	m_videoRect = m_MainRect;
	m_videoRect.left += 11;
	m_videoRect.bottom -= 15; //45
	m_videoRect.top = m_videoRect.bottom - 130; 
	m_videoRect.right = m_videoRect.left + 130;
	m_videoRect.left += 1;
	m_videoRect.top += 1;
	m_videoRect.right -= 1;
	m_videoRect.bottom -= 1;
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Example #8
0
void cdxCDynamicWnd::DoInitWindow(CWnd & rWnd, const CSize & szInitial)
{
	ASSERT(::IsWindow(rWnd.m_hWnd) && szInitial.cx && szInitial.cy);	// ensure the window exists ...

	m_iDisabled		=	0;
	m_pWnd		=	&rWnd;
	m_szInitial	=	szInitial;
	m_szMin		=	szInitial;

	/*
	 * this window will flicker somewhat deadly if you do not have the
	 * WS_CLIPCHILDREN style set for you window.
	 * You may like to use the following line anywhere
	 * to apply it:
	 
		  CWnd::ModifyStyle(0,WS_CLIPCHILDREN);

    */

#ifdef _DEBUG
	if(!(rWnd.GetStyle() & WS_CLIPCHILDREN) && !(m_nFlags & flSWPCopyBits))
	{
		TRACE(_T("***\n"
					"*** cdxCDynamicWnd class note: If your window flickers too much, add the WS_CLIPCHILDREN style to it\n"
					"***                            or try to set the flSWPCopyBits flags !!!\n"
					"***\n"));
	}
#endif

	//
	// now, if a DYNAMIC MAP is been defined,
	// we start working with it
	//

	const __dynEntry	*pEntry,*pLast	=	NULL;
	UINT					nInitCnt	=	GetCtrlCount();

	if(pLast = __getDynMap(pLast))
	{
		HWND		hwnd;
		SBYTES	bytes;

		for(pEntry = pLast; pEntry->type != __end; ++pEntry)
		{
			if((pEntry->id != DYNAMIC_MAP_DEFAULT_ID)
				&& !( hwnd = ::GetDlgItem(m_pWnd->m_hWnd,pEntry->id) ))
			{
				TRACE(_T("*** NOTE[cdxCDynamicWnd::DoInitWindow()]: Dynamic map initialization: There's no control with the id 0x%lx !\n"),pEntry->id);
				continue;
			}

			switch(pEntry->type)
			{
				case	__bytes:

					bytes[X1]	=	pEntry->b1;
					bytes[Y1]	=	pEntry->b2;
					bytes[X2]	=	pEntry->b3;
					bytes[Y2]	=	pEntry->b4;
					break;

				case	__modes:
					
					_translate((Mode)pEntry->b1,bytes[X1],bytes[X2]);
					_translate((Mode)pEntry->b2,bytes[Y1],bytes[Y2]);
					break;

				default:

					ASSERT(false);		// never come here !!!!!
					break;
			}

			if(pEntry->id == DYNAMIC_MAP_DEFAULT_ID)
				AllControls(bytes,false,false);
			else
				AddSzControl(hwnd,bytes,M_szNull,false);
		}
	}

	//
	// handle creation flags
	//

	if(m_nFlags & flSizeIcon)
	{
		m_pSizeIcon	=	WNEW cdxCSizeIconCtrl;
		VERIFY( m_pSizeIcon->Create(m_pWnd) );

		AddSzControl(m_pSizeIcon->m_hWnd,BotRight,M_szNull,false);
		m_pSizeIcon->ShowWindow(SW_SHOW);
	}

	m_bIsAntiFlickering	=	false;
	m_nMyTimerID			=	DEFAULT_TIMER_ID;
	m_dwClassStyle			=	::GetClassLong(*m_pWnd,GCL_STYLE) & (CS_VREDRAW|CS_HREDRAW);

	OnInitialized();

	if(nInitCnt < GetCtrlCount())
		Layout();
}