Thread: displaying two dialogs

  1. #1
    Registered User
    Join Date
    Aug 2001

    displaying two dialogs

    I'm trying to display the Login window and then when it closes the Chat window should be displayed. Instead only the Chat window will display. This happens outside of the Borland IDE. The compiler that I'm using is Borland C++ 5.5.

    thank you

    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    	 LPSTR lpCmdLine, int nCmdShow)
       int i;
       WNDCLASS wc;
       for(i = 0; i < 5; i++)
         sprintf(users[i].username,"User %d",i+1);
     	DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(DIALOG_2),
    			NULL, (DLGPROC)LoginDialogProc, 0);
    	DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(DIALOG_1),
    			NULL, (DLGPROC)ChatDialogProc, 0);
    	return 0;

  2. #2
    Registered User
    Join Date
    Feb 2002
    Check the return from the first DialogBoxParam().
    If it's -1, call GetLastError() to fetch the errorcode

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 04-12-2009, 05:49 PM
  2. Ok..Tabbed dialogs...XP style
    By Joelito in forum Windows Programming
    Replies: 5
    Last Post: 05-14-2006, 02:36 PM
  3. I need to use dialogs as tabs?
    By BenPage in forum C++ Programming
    Replies: 1
    Last Post: 08-03-2005, 08:59 AM
  4. Modeless Dialogs in Multiple threads
    By MrGrieves in forum Windows Programming
    Replies: 0
    Last Post: 06-22-2004, 01:33 PM
  5. dialogs are easier, but what about the main window?
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 01-21-2003, 01:42 PM