Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWindow on Dialog Pin
Manjunath S4-Jun-06 22:56
Manjunath S4-Jun-06 22:56 
AnswerRe: Window on Dialog Pin
Hamid_RT4-Jun-06 23:08
Hamid_RT4-Jun-06 23:08 
AnswerRe: Window on Dialog [modified] Pin
_AnsHUMAN_ 4-Jun-06 23:08
_AnsHUMAN_ 4-Jun-06 23:08 
AnswerRe: Window on Dialog Pin
Nishad S4-Jun-06 23:16
Nishad S4-Jun-06 23:16 
QuestionRe: Window on Dialog Pin
Manjunath S4-Jun-06 23:16
Manjunath S4-Jun-06 23:16 
AnswerRe: Window on Dialog Pin
Nishad S4-Jun-06 23:22
Nishad S4-Jun-06 23:22 
QuestionRe: Window on Dialog Pin
Manjunath S4-Jun-06 23:31
Manjunath S4-Jun-06 23:31 
AnswerRe: Window on Dialog Pin
Nishad S4-Jun-06 23:49
Nishad S4-Jun-06 23:49 
I'm sorry, I have no experience with SDL.
Anyway I can help you to just create a window Wink | ;)

First you have to insert a new class using ClassWizard.
Select class type as MFC and base class as generic CWnd.

Then you have to add a function to create the window in the new class created. Sample will just look like this...
bool MyWnd::Create(CWnd* pParent,const CRect& rect)
{
    // Register the class.
    CString csClass = AfxRegisterWndClass( 0, LoadCursor( 0, IDC_ARROW ),
                                           (HBRUSH)GetStockObject( WHITE_BRUSH ));
    // Create the window.
    if( FALSE == CreateEx( 0, csClass, _T( "" ), WS_CHILD, rect, pParent, 0 ))
    {
        return false;
    }
    // Do extra...
    return true;
}


Then you can create a member variable of MyWnd in the dialog and can call the Create function of it.


- NS -
AnswerRe: Window on Dialog Pin
_AnsHUMAN_ 4-Jun-06 23:24
_AnsHUMAN_ 4-Jun-06 23:24 
GeneralRe: Window on Dialog Pin
Nishad S4-Jun-06 23:27
Nishad S4-Jun-06 23:27 
AnswerRe: Window on Dialog Pin
_AnsHUMAN_ 4-Jun-06 23:31
_AnsHUMAN_ 4-Jun-06 23:31 
QuestionRe: Window on Dialog Pin
Manjunath S4-Jun-06 23:47
Manjunath S4-Jun-06 23:47 
Questionabout edit box Pin
yogendra kaushik4-Jun-06 22:55
yogendra kaushik4-Jun-06 22:55 
AnswerRe: about edit box Pin
_AnsHUMAN_ 4-Jun-06 22:59
_AnsHUMAN_ 4-Jun-06 22:59 
AnswerRe: about edit box Pin
Hamid_RT4-Jun-06 23:05
Hamid_RT4-Jun-06 23:05 
AnswerRe: about edit box Pin
ThatsAlok5-Jun-06 0:26
ThatsAlok5-Jun-06 0:26 
Questionconfused about system stack Pin
George_George4-Jun-06 22:54
George_George4-Jun-06 22:54 
AnswerRe: confused about system stack Pin
Viorel.5-Jun-06 0:19
Viorel.5-Jun-06 0:19 
GeneralRe: confused about system stack [modified] Pin
George_George5-Jun-06 1:38
George_George5-Jun-06 1:38 
GeneralRe: confused about system stack [modified] Pin
Viorel.5-Jun-06 2:05
Viorel.5-Jun-06 2:05 
GeneralRe: confused about system stack [modified] Pin
George_George5-Jun-06 2:24
George_George5-Jun-06 2:24 
GeneralRe: confused about system stack [modified] Pin
Viorel.5-Jun-06 3:18
Viorel.5-Jun-06 3:18 
GeneralRe: confused about system stack [modified] Pin
George_George5-Jun-06 3:38
George_George5-Jun-06 3:38 
GeneralRe: confused about system stack [modified] Pin
Viorel.5-Jun-06 3:58
Viorel.5-Jun-06 3:58 
GeneralRe: confused about system stack [modified] Pin
George_George6-Jun-06 19:07
George_George6-Jun-06 19: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.