kishore

Discussion in 'Win32' started by sunki_kishore, Sep 18, 2007.

  1. sunki_kishore

    sunki_kishore New Member

    Joined:
    Sep 17, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    what is the flow for a simple win32 application
     
  2. HowardL

    HowardL New Member

    Joined:
    Aug 5, 2007
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    East Coast USA
  3. johny10151981

    johny10151981 New Member

    Joined:
    Jul 7, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    int __stdcall WinMain(HINSTANCE hHinstance,HINSTANCE hPrevInstance, LPSTR lpStr,int nShowCmd)
    {
    WNDCLASSEX wcex;
    MSG msg;
    //fill every wcex data individually
    ....
    ....
    ....
    RegisterClassEx(&wcex);
    ghwnd = CreateWindow(.....);
    ShowWindow(..);
    UpdateWindow(...);
    while(GetMessage(&msg,0,0,0))
    {
    TranslateMessage(&msg);
    DispatchMessage(&msg);
    }
    return msg.wParam;
    }


    LPRESULT __stdcall WndClass(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
    {
    switch(msg)
    {
    case WM_CLOSE:
    PostQuiteMessage(0);
    return 0;
    }
    retunr DefWindowProc(hWnd,msg,wParam, lParam);
    }

    this is the simplest window
     
  4. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Use code block when posting code in the posts for better formating
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice