Visual C++ :: Child Dialog Shadow Remains?

Oct 5, 2012

i open child dialog from a dialog( which is launched from a toolbar of a window) after editing i close the child dialog, after closing child dialog shadow is retained on window but not on the parent dialog. Later when i close the parent dialog the child dialog shadow disappears. (issue exist only when i edit in child dialog)

View 14 Replies


ADVERTISEMENT

Visual C++ :: Parent To Child Dialog Data Transfer And Vice Versa

Nov 28, 2012

I transferred data from parent to child. Problem occurred while send data from child to parent dialog.

Find the attachment....

void CChildDlg::OnBnClickedCancel() {
child1ctrl.GetWindowText(parObj.parentval);
::AfxMessageBox(parObj.parentval);
//parObj.parentctrl.SetWindowText(child1val);

[Code] ....

View 8 Replies View Related

C# :: Editing A Parent Dialog Box Without Closing The Child

Sep 30, 2014

I'm using windows forms and I have a parent dialog box that consists of a text box and a drop-down that launches a child dialog box. The child takes user input and then prints dialog to the text box in the parent. However, the output does not appear in the text box until I close the child.

Now my question is, how do I get the text to appear without closing the child? I hit a button to send the info to the text box, but it still doesn't appear until the child closes. I also need to set up a button to suspend the child so that the user can click/copy/etc the parent.

View 7 Replies View Related

C++ :: Shadow Mapping Using DirectX

May 27, 2013

I have a problem with implementing Shadow Mapping into a project I am working on. I am very much new to shaders and I have been given a Shadow Mapping shader to implement and understand. I have mostly got my head round the concept and the code but I can't figure out why its not working.

As I understand it the main steps to follow are;

1) Render the scene from the POV of the light - this is done in ShadowMap::SetUpDepthRender where the view and projection matrices are passed to the shader.

2) Render all objects in the scene - this creates a shadowmap (depth map) via the shader.

3) Reset the view and projection matrices to that of the camera - done in ShadowMap::SetUpSceneRender.

4) Render the scene objects once more appling the depth map to them via the second pass of the shader.

The problem Im having is that I have a stripe of light running diagonally across the screen. It passes through the point of the spotlight that I am mapping for. I believe this is the shadowmap being applied to the scene however I could be wrong?

Below is the code in the ShadowMap class used for setting the fx file.

LPDIRECT3DSURFACE9 oldDepthSurface = NULL;
LPDIRECT3DSURFACE9 oldRenderTarget = NULL;
ShadowMap::ShadowMap(void) {
//Create our Light
Vector3D lightPosition(20.0f, 2.9f, 10.0f);
Vector3D lightDirection;

[Code] .....

View 2 Replies View Related

Visual C++ :: How To Create MDI Child With Borders

Jan 7, 2013

How can I create MS Word 'print layout' like interface. The attached picture says it all. Basically I want a shaded area around my document just like word so it gives a feel of the 'page'.

I was hoping I can override some function somewhere and along that lines tried playing around with below but that didn't work.

Code:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) {
if( !CFrameWndEx::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.cx = 250; // just playing around with size
cs.cy = 250;
return TRUE;
}

How can I do that?

View 6 Replies View Related

Visual C++ :: Child Window On Top Of Control

Nov 30, 2014

I have a child window above an edit control.

When the position of the control in the parent in the child on top of it is clicked the control gets topmost. Is there any way to prevent this?

View 3 Replies View Related

Visual C++ :: MFC Child Windows Application

Nov 9, 2013

I am new in Visual C++ and I have to make an MFC application with "child" windows. Here is what i need to achieve - [URL] ..... As you can observe when you click on the cross of popup window or child window 2 both are closing.

View 2 Replies View Related

Visual C++ :: MFC MDI Tabbed Child Window Positioning

Jul 18, 2013

Is it possible to specify the size/position of tabs in an MFC MDI tabbed application?

I am trying to save the open tabs when exiting the program and restoring them when the application is relaunched. I have come up with a method of saving and reloading the tabs, but I cannot restore their position.

I have seen SaveMDIState and LoadMDIState but I can't make it do anything and I'm also not sure if it's what I need.

View 3 Replies View Related

Visual C++ :: Splitting Child Window In MFC MDI Program?

Dec 4, 2012

how to split a child window in an MFC MDI program.

Splitting Child Window in MFC MDI Program

[URL]

For my purposes, this achievement is practically useless because I cannot find a way to pass text from one CRichEditView window to another.

Given two CRichEditView windows, CInputViewView and COutputView as child windows in an MFC MDI app, my goal is to capture text in the former and print that text in the later using a button click.

Using what appeared to me to be a logical way to proceed, I tried variations of the following code:

Code:
void CMainFrame::DoSomething() {
//MessageBox(_T("Like What ?"), _T("Do Something"));
//CInputViewView * pin = (CInputViewView*) GetActiveView();
CInputViewView * pin = (CInputViewView*)m_wndSplitter.GetPane(0,0);
pin->GetWindowTextW(m_csDisplay);

[Code] ....

None of this works and even the attempt to access the pane results in an app crash in winsplit.cpp.

Code:
#ifdef _DEBUG
void CSplitterWnd::AssertValid() const {
CWnd::AssertValid();
>ASSERT(m_nMaxRows >= 1);
//..

View 4 Replies View Related

Visual C++ :: Passing DDX Control Variables Between Dialogs (Parent->Child)

Jul 19, 2013

I have a main dialog which has (DDX?) controls for the user. eg a slider, and a combo box.

Previously, an image adjusted by these controls was in the same dialog.

I need to put this image in a New, separate dialog but it still must be controlled by the slider and combo box on the main dialog.

My question is how can I pass the control's variables between the dialogs? I have, say,

Code:
//MainDlg.cpp
DDX_Control(pDX, IDC_ComboBrightness, m_Brightness
I was told that I could do something like:

Code:
//ImageDlg.h
public:
ImageDlg(CWnd* pParent = NULL, CComboBox m_Brightness); // standard constructor

But I get errors including: Missing default parameter for parameter 2

I also need to pass the image array, is that perhaps the same method?

View 6 Replies View Related

Visual C++ :: CEdit Control As A Child In A CListCtrl For Making Each Column Editable

Jul 8, 2013

I am using a CEdit control as a child in a CListCtrl for purpose of making each column editable. The application is a dialog based app. My problem is... I have overwritten OnOK and OnCancel in the main dialog so the edit control never receives notifications for Escape or Enter whether in OnChar or PreTranslateMessage and I would like to delete the CEdit control after updating the CListCtrl on Enter. What can I do? I have rewritten this code many many times over the past 4 days and nothing is working.

View 4 Replies View Related

Visual C++ :: How To Set The Parent Dialog

Apr 17, 2013

I've created a modeless dialog from my main dialog as follows:

Code:
m_pContainerDlg = new CDlgContainer(NULL, this);
m_pContainerDlg->Create(CDlgContainer::IDD, GetDesktopWindow());
m_pContainerDlg ->ShowWindow(SW_SHOW);

This container dialog creates a child dialog which I show inside the container

Code:
BOOL CDlgContainer::OnInitDialog(){
// Create the child dialog and show it
m_pChildDlg = new CChildDlg(this);
m_pChildDlg->Create(IDD_DIRECTORY_DIALOG, this);
return FALSE;
}

From my child dialog I then create a modal dialog when a user clicks on a button

Code:
CChildDlg:: CChildDlg (CWnd* pParent /*=NULL*/) :
m_pParent((CDlgContainer*)pParent), {
} void CChildDlg::OnBnClickedBtn() {
CMyDlg MyDlg;
INT_PTR iResult = MyDlg.DoModal(pParent);
}

My problem is that the CMyDlg is modal but to the main dialog and not to the container or the child dialog.

View 3 Replies View Related

Visual C++ :: Catching A Dialog Box?

Dec 9, 2013

What I want is simple: I want to catch a dialog box!

The dialog box pops very frequently in a website. We have to put a username and password and press OK. I checked with spy++. It doesn't have any child windows. So catching the dialog box with windows API is ruled out. It must be a HTML dialog. I have to get DOM COM interfaces of the dialog.

Another option may be to make an add-on to get the interface to IWebBrowser2 and get the events fired. The title of the dialog box is "Authentication Required". If the events will be fired for that dialog box, I can check the title using IHTMLDocument2::get_Title.But will the events be fired for HTML dialog box? How to catch that desturbing dialog box.

View 2 Replies View Related

Visual C++ :: How To Create A Dialog As DLL

Feb 13, 2014

How can I create a dialog as a DLL ? I have a SDI MFC app (CView is based on CFormView) and from a button I want to load a modal dialog, but that dialog must be developed as DLL ... I didn't find something that fit my needs on internet ... P.S. I have only VC6 !

View 14 Replies View Related

Visual C++ :: FTP With Progress Dialog

Nov 13, 2012

For a project I'm working on, I need to be able to download a file from an FTP server and store it to a predetermined location with a predetermined name. No user interaction should be needed. Because the file is rather large, and I need the main program to remain responsive, this is going to need a progress dialog.

I could write all this myself and use the MFC wininet wrappers (CInternetSession et al) to do the downloading, but... Explorer already has this, and IE has such a dialog also. It doesn't seem unreasonable to assume those dialogs are available via some API.

Is a "FTP download with dialog" available as a windows API, or do I really need to write all this myself ?

View 2 Replies View Related

Visual C++ :: How Many Items Exist In A Dialog Box

Sep 11, 2013

I was wondering how can we know how many items exist in a dialogbox? If there any way that i can get the items ID in a dialogbox by having just the dialogbox's object or handler? Or any way that we can get a dialogbox content by coding.

View 6 Replies View Related

Visual C++ :: MFC Dialog Clipping Off In Low Resolution

Mar 25, 2013

I have an mfc dialog of size 1280 X 1024 and when i change the resolution to 800 X 600, after adding scroll bar, it don't show the entire dialog contents, Seems like it clips the 800 X 600 portion.

I have handled VScroll and HScroll. It works fine for higher resolutions!

View 1 Replies View Related

Visual C++ :: How To Reposition Menu Bar For Dialog Box

Dec 23, 2013

Normally, menu bar resides below the title bar. See attachment MenuBarOriginal.JPG

Is there a way that we can position the menu bar? For example,place it on the side or anywhere on the dialog box?

MenuBarModified.JPG is some sample of menu bar positions that I want to place.

I want to do this on a dialog box.

View 6 Replies View Related

Visual C++ :: Pass Parameter In Dialog Box

Feb 12, 2014

I need to pass a variable to a dialog box.

Code:
Doc* pDoc;
Dialog dlg;
int input = dlg.DoModal();

When I call dlg.DoModal() I need to somehow pass the pDoc into the dialog box. Everything I need the variable for is taking place inside the oninitdialog function. Is there anyway to pass the variable to that function?

View 2 Replies View Related

Visual C++ :: How To Know When Mouse Over A Control In A Dialog

Jul 10, 2013

I forget how to know when mouse is over controls in dialog.. I want to show a message in status bar when mouse over each control...

View 1 Replies View Related

Visual C++ :: CListCtrl On Dialog - Row Selection?

Aug 22, 2014

I have a ListCtrl on my dailog. It has a report view. In my case I have selected first row with left click of mouse and entire row is displayed in blue color as selection (as per expected) and when I right click the second row of the listctrl it displays the menu which I have added to it and the selection remains with the first row.(as expected). I have already overridden the ListCtrl class.

I want that on the right click of second row the selection should remain with the first row but this second row also should be displayed with dotted line border.

View 1 Replies View Related

Visual C++ :: How To Pass A Struct To A Dialog (WinAPI)

Feb 28, 2013

I want to pass some parameters to a dialog. I am trying to pass a struct as LPARAM in CreateDialogParam. How to access this structure from ONOK for example?

Code:
struct DlgParam{
std::wstring IEDllPath;
CString folderName;
};

[Code] .....

View 7 Replies View Related

Visual C++ :: Slider Not Working Properly In A Dialog MFC?

Jul 3, 2013

I have a slider control on a dialog box. I am playing a video file and slider moves according to the video elapsed. Suppose I have set the slider range to 100. Now till some point say 90, the slider moves to the point wherever I click the mouse. but at the last point in between some range say 90 - 100 (to the end of the slider), if I click the mouse button anywhere, slider jumps to the end.

I am using a TimeLine control where user can add more than 1 video (1, 2, 4, 8, 10 , 50 etc......), If I use only one video, slider moves as per the video progression.....Issue arises when I add more than 1 video and click on the start button, slider starts moving....Now when I drag the slider to any position or I click the mouse button anywhere on the slider control, slider thumb moves to that position and immediately jumps back to some other position. This is the Issue, I am facing.

share some sample code where slider is moving with the video showing the progress of the video.

I want to implement a functionality similar to VLC player. Wherever user clicks the mouse, slider moves to that point.

View 13 Replies View Related

Visual C++ :: Intercept Messages Sent To Controls On A Dialog

Apr 8, 2013

If it is possible, I'd like to know how to intercept messages sent to controls on a dialog. I'm working on a large application with a large number of dialogs, each with a number of controls on the dialog. I need to be able to intercept messages sent to these controls so that I can determine if the controls really need to take action on these messages. I could subclass each control and override the specific event handlers but due to the volume of controls in the application this could take a very long time, will introduce risk if controls are missed, and will increase maintenance costs. What I want to do is create a class which is derived from CDialog and each of the dialogs in the application would then be derived from this new dialog class. The new dialog class would intercept messages sent to any control on the dialog and if the dialog decides that the control should do something then the dialog will pass the message on to the control.

example:
CExistingDialog is derived from CNewDialog is derived from CDialog

CExistingDialog has a number of controls. When the code in CExistingDialog calls CWnd::EnableWindow on one of these controls I want CNewDialog to intercept the message, determine what should be done with the message, and then pass it on to the control.

I'm not very familiar with the messaging framework. I've tried overriding a few of the methods of CNewDialog but none of them ever receive the message to enable the window. I assume this is because the message is sent directly to the child window (the control).

Is there any way to intercept these messages? I don't know much about hooks either but is this a possible option?

View 8 Replies View Related

Visual C++ :: Property Sheets On Main Dialog

Jul 17, 2014

I have been playing around with property sheets/property pages and have been successful in getting them to work in a secondary dialog by calling the property sheet using DoModal().

How to get the property sheet to display on the main dialog of a dialog application.

I am using VS2008 and CMFCPropertySheet and CMFCPropertyPage.

View 5 Replies View Related

Visual C++ :: How To Encapsulate WinAPI Dialog In A Class

Feb 28, 2013

I have made a simple Pane class so that I can encapsulate a winapi Dialog.
I call it as:

Here the code I have, but it displays no dialog.

Here is what I do in main:

Code:

Pane(&hDlg, hInstance, nCmdShow);
while((ret = GetMessage(&msg, 0, 0, 0)) != 0)
{
if(ret == -1)
return -1;
if(!IsDialogMessage(hDlg, &msg))
{

[Code]...

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved