Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: upgrading vc6 c++ project to .net Pin
Dave Bryant28-Oct-03 13:12
Dave Bryant28-Oct-03 13:12 
GeneralCalling an ActiveX EXE from VC++... Pin
Orkun GEDiK28-Oct-03 10:39
Orkun GEDiK28-Oct-03 10:39 
GeneralRe: Calling an ActiveX EXE from VC++... Pin
Michael P Butler29-Oct-03 1:51
Michael P Butler29-Oct-03 1:51 
QuestionHow to update dialog title when a value is changed in a child window? Pin
ElizabethC28-Oct-03 10:19
ElizabethC28-Oct-03 10:19 
AnswerRe: How to update dialog title when a value is changed in a child window? Pin
David Crow28-Oct-03 10:40
David Crow28-Oct-03 10:40 
AnswerRe: How to update dialog title when a value is changed in a child window? Pin
Blake Miller30-Oct-03 9:17
Blake Miller30-Oct-03 9:17 
Generalm_pParentWnd and m_hWnd Pin
ns28-Oct-03 9:32
ns28-Oct-03 9:32 
GeneralRe: m_pParentWnd and m_hWnd Pin
Joaquín M López Muñoz28-Oct-03 9:44
Joaquín M López Muñoz28-Oct-03 9:44 
Hi ns, long time Smile | :)

However to use a certain function I need the m_hWnd of the parent. Is this the same thing as the m_pParentWnd

AFAIK, GetSafeHwnd(m_pParentWnd) is the HWND you're after. Anyway, experiment a little, your question surely can be answered with a trivial test.

BTW the m_pParentWnd is a generic CWnd*, and I am unable to cast it to my specific parent class due to unshakeable circular include issues which dont let me #include "parent.h" to do the casting.

Ummm... I'd need to know the header structure of your classes, but this kind of circularity can be solved most of the time using forward declarations. Consider
//A.h
#include "B.h"
 
class A
{
  B* b;
};
 
//B.h
#include "A.h"
 
class B
{
  A* a;
};
 
//A.cpp
#include "A.h"
...
 
//B.cpp
#include "B.h"
...
This does not compile due to circular references. The way out consists in cutting the knot somewhere with a forward declaration (or with two of these, for simmetry reasons, if this is applicable):
//A.h
class B; //fwd declaration
 
class A
{
  B* b;
};
 
//B.h
class A; //fwd declaration
 
class B
{
  A* a;
};
 
//A.cpp
#include "A.h"
#include "B.h" //we need this as A.h does not include B.h
...
 
//B.cpp
#include "B.h"
#include "A.h" //we need this as B.h does not include A.h

...
Get the idea? Hope it helps, regards,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralThanks to both of you! Pin
ns3-Nov-03 5:18
ns3-Nov-03 5:18 
GeneralRe: m_pParentWnd and m_hWnd Pin
andyvinc28-Oct-03 9:51
andyvinc28-Oct-03 9:51 
GeneralUsing an exe in VC++ Pin
SimoneShah28-Oct-03 9:12
SimoneShah28-Oct-03 9:12 
GeneralRe: Using an exe in VC++ Pin
Joaquín M López Muñoz28-Oct-03 9:51
Joaquín M López Muñoz28-Oct-03 9:51 
GeneralWindow snapshot Pin
alex.barylski28-Oct-03 7:12
alex.barylski28-Oct-03 7:12 
GeneralRe: Window snapshot Pin
David Crow28-Oct-03 8:15
David Crow28-Oct-03 8:15 
GeneralRe: Window snapshot Pin
alex.barylski28-Oct-03 8:39
alex.barylski28-Oct-03 8:39 
GeneralSDI title bar Pin
Daniel132428-Oct-03 7:08
Daniel132428-Oct-03 7:08 
GeneralRe: SDI title bar Pin
Michael P Butler28-Oct-03 7:35
Michael P Butler28-Oct-03 7:35 
GeneralSerialization or Persistant Class Pin
mfcuser28-Oct-03 6:53
mfcuser28-Oct-03 6:53 
GeneralRe: Serialization or Persistant Class Pin
Joaquín M López Muñoz28-Oct-03 9:59
Joaquín M López Muñoz28-Oct-03 9:59 
GeneralCommunication between child windows Pin
Behzad Ebrahimi28-Oct-03 6:36
Behzad Ebrahimi28-Oct-03 6:36 
GeneralRe: Communication between child windows Pin
alex.barylski28-Oct-03 7:45
alex.barylski28-Oct-03 7:45 
GeneralCatching clicking Pin
YaronNir28-Oct-03 5:50
YaronNir28-Oct-03 5:50 
GeneralRe: Catching clicking Pin
alex.barylski28-Oct-03 7:26
alex.barylski28-Oct-03 7:26 
GeneralRe: Catching clicking Pin
David Crow28-Oct-03 10:45
David Crow28-Oct-03 10:45 
GeneralRe: Catching clicking Pin
alex.barylski28-Oct-03 11:58
alex.barylski28-Oct-03 11: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.