Results 1 to 2 of 2

Thread: adding a text

Threaded View

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    adding a text

    hi
    The following is a simple win app I found on the internet..Because it is a blank application
    I tried to add a simple text ("This is my first WinnApp") to it..
    I got some error as to where and how to declare " OnPaint()"
    I will be happy if you can help me out
    thanks


    Code:
    #include <afxwin.h>
    
    class MFC_Tutorial_Window :public CFrameWnd
    {
    public:
        MFC_Tutorial_Window()
        {
            Create(NULL,"MFC Tutorial Part 1 CoderSource Window");
        }
    
    };
    
    class MyApp :public CWinApp
    {
       MFC_Tutorial_Window *wnd; 
    public:
       BOOL InitInstance()
       {
           wnd = new MFC_Tutorial_Window();
           m_pMainWnd = wnd;
           m_pMainWnd->ShowWindow(SW_SHOW);
           return TRUE;
       }
    };
    
    MyApp theApp
    ;
    Last edited by merhaba; Jul 29th, 2005 at 04:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width