|
-
Jul 8th, 2001, 09:35 AM
#1
How to make a simple drawing?
Here i post the code of a simple function. I want it to create a window and draw a circle in it, but i can't make it. 
[code]
HWND initEditor(HWND hMainWnd) {
HWND hewnd;
HDC hDispl;
PAINTSTRUCT *lpPaint;
hewnd = CreateWindowEx(
WS_EX_CLIENTEDGE,
g_szEditClassName,
"Test Window",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, 500, 350,
hMainWnd, NULL, g_hEdInst, NULL);
ShowWindow(hewnd, SW_SHOWNORMAL);
UpdateWindow(hewnd);
hDispl = BeginPaint(hwnd, lpPaint);
Ellipse(hDispl, 10, 10, 15, 15); // this should draw a circle!!!!
EndPaint(hwnd, lpPaint);
}
[\code]
Probably there's something wrong with it, but i can't find anything wrong...
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|