I'am trying to retrieve the text from an edit box.
long WINAPI MainWndProc(HWND hWnd,UINT msg,WPARAM wParam,
LPARAM lParam){
HWND hwndCtl=(HWND) lParam;
int nMaxCount=30;
char* str;
switch (msg)
{
case WM_GETTEXT:
if (hwndCtl==hWndEditQues1) GetWindowText(hWndEditQues1,str,nMaxCount);
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return DefWindowProc(hWnd,msg,wParam,lParam);
}
Just started VC++ the book I'am using had a some code using Windows API but not much, used the search function and MSDN wasn't that helpful any help or a link to a tutorial would be apprecitated.
Thanks
long WINAPI MainWndProc(HWND hWnd,UINT msg,WPARAM wParam,
LPARAM lParam){
HWND hwndCtl=(HWND) lParam;
int nMaxCount=30;
char* str;
switch (msg)
{
case WM_GETTEXT:
if (hwndCtl==hWndEditQues1) GetWindowText(hWndEditQues1,str,nMaxCount);
case WM_DESTROY:
PostQuitMessage(0);
return 0;
default:
return DefWindowProc(hWnd,msg,wParam,lParam);
}
Just started VC++ the book I'am using had a some code using Windows API but not much, used the search function and MSDN wasn't that helpful any help or a link to a tutorial would be apprecitated.
Thanks