lemming999
Programmer
I created a dialog box with two buttons and various text boxes that I can edit. I have figured out how to draw to the dialog box but it is messy. How can i set the background of the dialog box, would approaching this a different way be better such as using something besides a dialogBox
Thanks
the code I have so far in the dialog procedure is
LRESULT CALLBACK Graph(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
int array[4] = {100,10,10,0};
switch (message)
{
case WM_CREATE:
hdc = GetDC (hDlg);
return 0;
case WM_INITDIALOG:
return TRUE;
case WM_PAINT:
hdc = BeginPaint(hDlg, &ps);
SetDlgItemInt(hDlg,IDC_stat,20,FALSE);
RECT rt;
EndPaint(hDlg, &ps);
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDCANCEL)
{
SetDlgItemText(hDlg,IDC_g1,"hello"
;
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
Thanks
the code I have so far in the dialog procedure is
LRESULT CALLBACK Graph(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
int array[4] = {100,10,10,0};
switch (message)
{
case WM_CREATE:
hdc = GetDC (hDlg);
return 0;
case WM_INITDIALOG:
return TRUE;
case WM_PAINT:
hdc = BeginPaint(hDlg, &ps);
SetDlgItemInt(hDlg,IDC_stat,20,FALSE);
RECT rt;
EndPaint(hDlg, &ps);
break;
case WM_COMMAND:
if (LOWORD(wParam) == IDCANCEL)
{
SetDlgItemText(hDlg,IDC_g1,"hello"
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}