Archived

This topic is now archived and is closed to further replies.

Default button not working

This topic is 4999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Default button doesn't seem to work.
ChatWindows[WinNum].MainChat = CreateWindowEx (WS_EX_OVERLAPPEDWINDOW, WinClass, user, WS_OVERLAPPEDWINDOW, ChatWnd[0], ChatWnd[1], ChatWnd[2], ChatWnd[3], NULL, LoadMenu (hInst, MAKEINTRESOURCE(IDC_CHATWINDOWS)), hInst, NULL);
ChatWindows[WinNum].RecvChat = CreateWindowEx (WS_EX_TRANSPARENT, "edit", NULL, WS_CHILD|WS_TABSTOP|WS_VSCROLL|WS_VISIBLE|ES_LEFT|ES_READONLY|ES_AUTOVSCROLL|ES_MULTILINE, RecvWnd[0], RecvWnd[1], RecvWnd[2], RecvWnd[3], ChatWindows[WinNum].MainChat, (HMENU)1, hInst, NULL);
ChatWindows[WinNum].SendChat = CreateWindowEx (WS_EX_TRANSPARENT, "edit", NULL, WS_CHILD|WS_TABSTOP|WS_VISIBLE|ES_LEFT, SendWnd[0], SendWnd[1], SendWnd[2], SendWnd[3], ChatWindows[WinNum].MainChat, (HMENU)2, hInst, NULL);
ChatWindows[WinNum].SendButton = CreateWindowEx (0, "button", "Send", WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_DEFPUSHBUTTON, SendBtn[0], SendBtn[1], SendBtn[2], SendBtn[3], ChatWindows[WinNum].MainChat, (HMENU)3, hInst, NULL);
Init source /
if ( (wmId == 3) && 
				(wmEvent == BN_CLICKED) )
			{
				WindowText = (char *)calloc(64,1);
				GetWindowText (hDlg, WindowText, 64);

				Child = FindChildWindow (hDlg, 1);
				Message = (char *)calloc(1024,1);
				GetWindowText (Child, Message, 1024);
				SetWindowText (Child, "");

				LocalEcho (hDlg, Message);

				FormatForSend (WindowText, Message);
				return TRUE;
			}
From WM_COMMAND in the DLGPROC Not sure but my best guess is to group them, that I haven't tried but would be nice for input if I'm in the right direction. [edited by - MaxxJag on April 5, 2004 10:53:17 PM] [edited by - MaxxJag on April 5, 2004 10:53:46 PM]

Share this post


Link to post
Share on other sites