Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with drawing windows.

Status
Not open for further replies.

lemming999

Programmer
Mar 11, 2002
12
0
0
IE
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;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top