Click here to Skip to main content
15,915,094 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unhandled exeption when using shell functions Pin
redeemer19-May-02 11:47
redeemer19-May-02 11:47 
GeneralRe: Unhandled exeption when using shell functions Pin
Joaquín M López Muñoz19-May-02 12:09
Joaquín M López Muñoz19-May-02 12:09 
GeneralRe: Unhandled exeption when using shell functions Pin
redeemer19-May-02 12:07
redeemer19-May-02 12:07 
GeneralRe: Unhandled exeption when using shell functions Pin
Joaquín M López Muñoz19-May-02 12:17
Joaquín M López Muñoz19-May-02 12:17 
GeneralRe: Unhandled exeption when using shell functions Pin
redeemer19-May-02 12:21
redeemer19-May-02 12:21 
GeneralRe: Unhandled exeption when using shell functions Pin
Joaquín M López Muñoz19-May-02 12:32
Joaquín M López Muñoz19-May-02 12:32 
GeneralRe: Unhandled exeption when using shell functions Pin
l a u r e n19-May-02 12:07
l a u r e n19-May-02 12:07 
GeneralA basic question on creating a window Pin
Still learning how to code19-May-02 10:56
Still learning how to code19-May-02 10:56 
I have had a problem programming in Windows for some time which I have never solved and would appreciate anybody's help !! I shall describe the current incarnation !!

I am writing an application (using MFC and VC++) using the Document/View architecture. Within a Document/View process, I need to produce a secondary window (to the view) to display certain other information. I invoke this via a menu item associated with the View, and have tried to display this secondary window by using the following statements within the menu routine:

void CIRCView::OnMenuItem()
{
// TODO: Add your command handler code here
CIRCDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);


if(!m_bButtonSelected)
AfxMessageBox("Please select a key to adjust");
else
{

CRect rect(20,20,100,100);
CWnd Wnd;

int rc;
rc = Wnd.Create(NULL,NULL,
WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW | WS_VSCROLL | WS_HSCROLL,
rect,(CWnd*)GetParent(),NULL);
}
}

I get a good (non-zero) return code from Create(), but no new window (apart from the View) is visable (if I add a Wnd.ShowWindow(), it returns that the window WAS already visable !).

Where am I going wrong ??? (Any help appreciated on this trivial, but important, question will be greatly appreciated !!)


Doug
GeneralRe: A basic question on creating a window Pin
Joaquín M López Muñoz19-May-02 11:03
Joaquín M López Muñoz19-May-02 11:03 
GeneralRe: A basic question on creating a window Pin
Still learning how to code20-May-02 19:29
Still learning how to code20-May-02 19:29 
Generalwtf!! Pin
l a u r e n19-May-02 11:02
l a u r e n19-May-02 11:02 
GeneralRe: wtf!! Pin
Joaquín M López Muñoz19-May-02 11:00
Joaquín M López Muñoz19-May-02 11:00 
Generalmessages Pin
S van Leent19-May-02 10:14
S van Leent19-May-02 10:14 
GeneralRe: messages Pin
Paul M Watt19-May-02 21:53
mentorPaul M Watt19-May-02 21:53 
GeneralRe: messages Pin
S van Leent20-May-02 5:03
S van Leent20-May-02 5:03 
GeneralLSD and the Windows Desktop Pin
Shog919-May-02 9:53
sitebuilderShog919-May-02 9:53 
QuestionWhat is a DDE server? Pin
19-May-02 8:59
suss19-May-02 8:59 
AnswerRe: What is a DDE server? Pin
Michael P Butler19-May-02 9:39
Michael P Butler19-May-02 9:39 
AnswerRe: What is a DDE server? Pin
Paul M Watt19-May-02 9:41
mentorPaul M Watt19-May-02 9:41 
Generaltcp/ip and unicode... Pin
l a u r e n19-May-02 8:59
l a u r e n19-May-02 8:59 
GeneralRe: tcp/ip and unicode... Pin
Paul M Watt19-May-02 9:52
mentorPaul M Watt19-May-02 9:52 
GeneralRe: tcp/ip and unicode... Pin
l a u r e n19-May-02 10:29
l a u r e n19-May-02 10:29 
GeneralCStdioFile::Find() and CStdioFile::Insert() Pin
Emearg19-May-02 8:19
Emearg19-May-02 8:19 
GeneralRe: CStdioFile::Find() and CStdioFile::Insert() Pin
Joaquín M López Muñoz19-May-02 11:47
Joaquín M López Muñoz19-May-02 11:47 
GeneralRe: CString, not CStdioFile Pin
Emearg19-May-02 15:07
Emearg19-May-02 15:07 

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.