Dialog Box (2).
By SalimMeghani
- 241 reads
//
// Message handler for Dialog Box.
LRESULT CALLBACK Input(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
hwndEdit=GetDlgItem(hDlg,EDITTAB);
wpOrigEditProc= (WNDPROC) SetWindowLong(hwndEdit, GWL_WNDPROC, (LONG) EditSubclassProc);
SendMessage(hwndEdit,WM_CLEAR,0,0);
SendMessage(hwndEdit, EM_REPLACESEL,FALSE,(LPARAM) szInputStr);
newscroll=1;
scrolled=1;
return TRUE;
break;
}
if (setcursor>=1)
{
if (setcursor==2) up=1;
if (setcursor==3) down=1;
if (setcursor==4) left=1;
if (setcursor==5) right=1;
input=0;
setcursor=0;
GetDlgItemText(hDlg, EDITTAB, szOutputStr, 2047);
EndDialog(hDlg,0);
}
//
return FALSE;
}
- Log in to post comments