Win32 controls for drawing
I'm looking to draw a picture on a dialog box. Its simply going to have lines on it. By my understanding of what i'm reading I can only draw on a control. Which control would be proper for this task?
Once I have the control I think from the documentation I create a Graphics object.. then a Pen... and I use the various Draw functions with the pen to then graphiti it up. But what would be the proper base control to place on a dialog box?
Also.. I try creating a pointer to a Graphics object in a Visual Studio win 32 application but it doesn't recognize it.. is there a library I need to include to bring this online? MSDN just gives the call setups but not the library includes. Thanks.
Re: Win32 controls for drawing
Ok.. I've figured out some stuff. Found that I can draw stuff directly on the dialog box via the WM_PAINT event of the dialogue box. I've been able to put text right on the dialog box via the DrawText call. But it appears in order to put something like a line I need to create a Graphics object using the device context. The problem still arises that I can't get visual studio to recognize the Graphics call. I.e. just a simple:
Now.. this seems a clear cut library issue. In the MSDN documentation I've found it shows the following:
Header : Declared in Gdiplusgraphics.h, include gdiplus.h
Import library : gdiplus.lib
I've tried including both header files but that just brings up a slew of more errors on the compile. Is there a place in the IDE for adding in the gdiplus.lib and do i need to add the headers to the Header Files over on the left and not just #include "" them?
|All times are GMT +5.5. The time now is 13:22.|