Click here to Skip to main content
15,914,070 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralNeed a DialogBar HOWTO Pin
bisserke1-Jul-02 3:56
bisserke1-Jul-02 3:56 
GeneralRe: Need a DialogBar HOWTO Pin
[James Pullicino]1-Jul-02 4:00
[James Pullicino]1-Jul-02 4:00 
GeneralRe: Need a DialogBar HOWTO Pin
bisserke1-Jul-02 4:07
bisserke1-Jul-02 4:07 
GeneralRe: Need a DialogBar HOWTO Pin
[James Pullicino]1-Jul-02 5:15
[James Pullicino]1-Jul-02 5:15 
QuestionHow do you remove or hide the Menu in an MDI window (CMDIFrameWnd)? Pin
1-Jul-02 3:32
suss1-Jul-02 3:32 
AnswerRe: How do you remove or hide the Menu in an MDI window (CMDIFrameWnd)? Pin
[James Pullicino]1-Jul-02 4:06
[James Pullicino]1-Jul-02 4:06 
GeneralRe: How do you remove or hide the Menu in an MDI window (CMDIFrameWnd)? Pin
1-Jul-02 5:46
suss1-Jul-02 5:46 
Generaldialog from property sheet? (newbie) Pin
1-Jul-02 3:09
suss1-Jul-02 3:09 
I have a property sheet, which I added a button.
The button brings up a modeless dialog, using the Visual C++'s sample modeless code. The dialog is never visually created, but successfully returns from the Create call (i.e., 1).

m_pCrowsFeet_modeless = NULL;
if (m_pCrowsFeet_modeless == NULL){
m_pCrowsFeet_modeless = new CrowsFeet_Dlg(this);
BOOL dana1 = m_pCrowsFeet_modeless->Create();
if (dana1 == TRUE)
GetDlgItem(IDOK)->EnableWindow(FALSE);
}
else
m_pCrowsFeet_modeless->SetActiveWindow();

The value of dana1 from the Create is 1. But the error occurs when
EnableWindow(FALSE) is invoked. That is the ASSERT(::IsWindow(m_hWnd) is violated and aborts.


CWnd* CWnd::GetDlgItem(int nID) const
{
ASSERT(::IsWindow(m_hWnd));

if (m_pCtrlCont == NULL)
return CWnd::FromHandle(::GetDlgItem(m_hWnd, nID));
else
return m_pCtrlCont->GetDlgItem(nID);
}


The dialog works when called from an application, but not from a property sheet.

Is not a property derived from Cwnd and therefore an IsWindow?
The this from the dialog code does not appear to have a m_hWnd.
Is this true of a propertysheet?

Although the same parent is used to create a window

BOOL ret = Create(NULL, windowName, WS_OVERLAPPEDWINDOW | WS_VSCROLL,
CRect(10,10,300,400), parent, 0);


Thanks, dana

GeneralRe: dialog from property sheet? (newbie) Pin
Prem Kumar1-Jul-02 4:47
Prem Kumar1-Jul-02 4:47 
GeneralAttach to process Pin
Hans Ruck1-Jul-02 2:53
Hans Ruck1-Jul-02 2:53 
GeneralRe: Attach to process Pin
Hans Ruck1-Jul-02 3:14
Hans Ruck1-Jul-02 3:14 
GeneralATL service stopping Pin
Hans Ruck1-Jul-02 2:19
Hans Ruck1-Jul-02 2:19 
GeneralRe: ATL service stopping Pin
Christian Graus1-Jul-02 2:27
protectorChristian Graus1-Jul-02 2:27 
GeneralRe: ATL service stopping Pin
Hans Ruck1-Jul-02 2:36
Hans Ruck1-Jul-02 2:36 
GeneralRe: ATL service stopping Pin
Bill Wilson1-Jul-02 9:38
Bill Wilson1-Jul-02 9:38 
QuestionHow to prevent a CFileDialog Box from resizing? Pin
Erik1-Jul-02 2:06
Erik1-Jul-02 2:06 
AnswerRe: How to prevent a CFileDialog Box from resizing? Pin
Prem Kumar1-Jul-02 4:51
Prem Kumar1-Jul-02 4:51 
GeneralRe: How to prevent a CFileDialog Box from resizing? Pin
Erik1-Jul-02 19:02
Erik1-Jul-02 19:02 
GeneralI/O Completion Port Pin
unknown soldier1-Jul-02 0:59
unknown soldier1-Jul-02 0:59 
GeneralRe: I/O Completion Port Pin
Len Holgate1-Jul-02 8:53
Len Holgate1-Jul-02 8:53 
GeneralHigh scale chat server Pin
1-Jul-02 0:47
suss1-Jul-02 0:47 
GeneralRe: High scale chat server Pin
benjymous1-Jul-02 2:02
benjymous1-Jul-02 2:02 
GeneralRe: High scale chat server Pin
Len Holgate1-Jul-02 9:01
Len Holgate1-Jul-02 9:01 
GeneralGet code page of exe Pin
ed welch30-Jun-02 23:08
ed welch30-Jun-02 23:08 
GeneralRe: Get code page of exe Pin
Mike Nordell2-Jul-02 7:20
Mike Nordell2-Jul-02 7:20 

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.