well, i've spent about the past 3 hours staring at msdn, and I haven't learned a thing yet
i can't figure out how to use an edit box in my program
what i'm doing is i did the tutorials from http://winprog.org/tutorial/ and i did the multiple document interface, changing and adding a few things. but the thing is, i can't get it to create an edit box. I don't know HOW to create one, because all msdn says is, "hey, we've got edit boxes, whoohooo! but we're not telling you how to use 'em, we'll just tease you with all the stuff it CAN do! muahahahaha"
so, yah, msdn is evil sometimes. lol
help would be appreciated, like some sort of example or tutorial somewhere that is semi-decent......
-thanks in advance
-edit-
oh yeah, here's all the code that is really of importance here:
Code:
BOOL CALLBACK EditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
default:
return FALSE;
}
return TRUE;
}
LRESULT CALLBACK MDIChildWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_CREATE:
{
HFONT hfDefault;
HWND hEdit;
RichEdit test;
hEdit=CreateDialog(hInMain, MAKEINTRESOURCE(IDD_EDITBOX), MainWindow, EditProc); // here's where i'm creating the richedit box, but it crashes whenever i try and open it
ShowWindow(hEdit, numcmd);
UpdateWindow(hEdit);
if(hEdit==NULL)
MessageBox(hwnd, "Could not create edit box.", "Error", MB_OK | MB_ICONERROR);
hfDefault = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
SendMessage(hEdit, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE, 0));
}
break;
// and more from here, not putting it all, lol