GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Jul-2009, 09:59
noaktree noaktree is offline
New Member
 
Join Date: Jul 2009
Posts: 1
noaktree is on a distinguished road
Post

CDialog Floating Child and CEdit


I'm using VS2008 CPP to develop a simple MFC Dialog Based application.

First I create a dialog, to be used as child, in the resource editor (IDD_THE_FLOATER). I give the dialog the style:Child setting and place two controls on it: Combo and Edit.

Next I create a class for the dialog and add it as a data member to the main dialog window (float_dialog).

Now I attempt to make the floating dialog appear inside of the main dialog window. On initialization I do the following:

float_dialog.Create(MAKEINTRESOURCE(IDD_THE_FLOATE R), this);
float_dialog.ShowWindow(SW_SHOWNORMAL);

The floating dialog appears and can be dragged around inside the main dialog app. The combo box works well but the edit box will not respond to mouse clicks.

The I-Beam cursor appears when the mouse is moved over the CEdit control and I can force the focus programmatically but am unable to set focus to CEdit using the mouse.

If I change the floating dialog to a Control:True type the CEdit works as it should (can mouse control it) but I lose the dialog border and the ability to drag it around.

Does anyone know why this is happening? And if so, is there a way to get CEdit to behave properly given this setup?


 
 

Recent GIDBlogOnce again, no time for hobbies by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing Params from Parent to Child (MFC) AmiGame MS Visual C++ / MFC Forum 1 16-Oct-2007 02:43

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:15.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.