I have subclassed and edit box. Here is the code:

Code:
// get ready for user input
err = ListView_GetSubItemRect(expHwnds.hLV_Wnd, 0, 0, LVIR_LABEL, &rect);
if( err == 0 )
{
	sprintf(error, "Unable to get dimensions of first item. %u", GetLastError());
	MessageBox(NULL, error, "Error", MB_ICONEXCLAMATION);
	return(-1);
}
else
{
	expHwnds.hEdit = CreateWindow("EDIT", "MM/DD/YYYY",
                WS_CHILD | WS_BORDER | WS_VISIBLE | ES_MULTILINE | ES_WANTRETURN,
                rect.left, rect.top + 30, rect.right - rect.left,
                rect.bottom - rect.top, hwnd, NULL, g_hInst, NULL);
	if( expHwnds.hEdit == NULL )
	{
		sprintf(error, "Unable to initialize user input for Expense module. (Error 0027; %u)", GetLastError());
		MessageBox(NULL, error, "Error", MB_ICONEXCLAMATION);
		return(-1);
	}
}

// TODO: subclass editbox (to get ENTER/TAB key when pressed)
oldProc = (WNDPROC)SetWindowLongPtr(expHwnds.hEdit, GWLP_WNDPROC, (LONG_PTR)ExpInputWndProc);
SetWindowLongPtr(expHwnds.hEdit, GWLP_USERDATA, (LONG_PTR)oldProc);
SetFocus(expHwnds.hEdit);
Now the editbox seems to get focused (based on output given from this editbox's new windows procedure). However, no text is seen within the editbox (such as the "MM/DD/YYYY" that is supposed to be initially seen within the edit). Nor does it show any text is that is typed into it. Here is the subclassed windows procedure for the editbox.

Code:
LRESULT CALLBACK ExpInputWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
	WNDPROC oldProc;

	switch(Message)
	{
		case WM_KEYDOWN:

			// information was entered (user done)
			if( wParam == VK_RETURN )
			{
				MessageBox(NULL, "Enter key was pressed.", "Keypress", MB_OK);
				// get data in edit control
				// empty edit control
				// hide edit control
				// make next edit control visible
				// copy above steps for VK_TAB
				return(0);
			}

			// same as VK_RETURN
			else if( wParam == VK_TAB )
			{
				MessageBox(NULL, "Tab key was pressed.", "Keypress", MB_OK);
				return(0);
			}

			// never will the '/'s in the editbox be erased
			else if( wParam == VK_BACK )
			{
				MessageBox(NULL, "Backspace key was pressed.", "Keypress", MB_OK);
				// get current cursor position in text
				// determine if backspacing will erase a '/'
				// if not break;
				// else simply move cursor position back one instead of backspacing
				return(0);
			}
			break;
	}

	oldProc = (WNDPROC)GetWindowLongPtr(hwnd, GWLP_USERDATA);
	return(CallWindowProc(oldProc, hwnd, Message, wParam, lParam));
}
If anyone can tell me why this isn't showing the text, then please let me know. I have been unable to figure it out. Also does anyone know how to get rid of the warning messages that are coming up for the lines where I am calling GetWindowLongPtr() and SetWindowLongPtr()? There are warnings for setting oldProc to (WNDPROC)... says that possible loss of data setting 'LONG' to 'WNDPROC' of greater size. As well as with SetWindowLongPtr() I'm getting warnings with setting 'LONG_PTR' to 'LONG' also possible loss of data. If you can help with that as well, its a pet peave of mine to have any sort of warnings whatsoever when I am done a project (I get worried that it will cause problems).

Thanks,
Tyouk