-
Ideas or help please
Hi im currently designing/implementing a project for my final year dissertation at uni, and am having some problems implementing certain features of the user interface.
The suite i am using is Microsofts Visual C++ Dev Studio (Ver 5)
So far this is what i have come up with:
Basic Window, Menu, Simple Dialog Boxes
I am happy with this and need a few simple suggestions of how to go about implementing the next bits, these are:
Placing a box underneath the menu (eg in the white space) to display simple grids.
So far i have come up with little to help me, i keep trying to declare a CRECT structure, but it seems unable to locate the definition of the structure, hence it says add stdafx.h
But because i have used a mix and match of C++ and C, inclusion of this file makes my code go haywire, returning an error saying i have already included windows.h in my declarations.. removal of this causes over a dozen errors and totally brakes my code.
In reciept of this i tried declaring just a simple RECT structure, but am having problems attaching it to my standard window, i know i have done something write because the menu in that area doesnt work when u click on it, have i placed it incorrectly??
The next option i tried was to build a modal dialog application and not use the menus, this seems fine, but i have read somewhere on this board that you can include these with a standard build like the one explained above. By this i mean placing the modal dialog box inside the white space below the menu. I cant seem to find the post or code to help me in this area.
Like i said my main problem was drawing to the window. I can see how it works in simple applications built by MSVC++ using the AppWizard but i hate using this and would prefer to build it myself (understand it better then!). I know the code to draw like circles etc and am not interested in a quick fix line of code saying that i draw a rectangle like so...
Any help would be amazing (deadlines soon!), so thanks for taking the time to read this rather large post!!!
Kamikazeecows
-
Use a static ctrl.
Look how the resource editor creates a FRAME ctrl in your script.rc. Then do yours on the fly. (it is basicly a big static text box that you use to paste a HDC over)
I think you will need a HDC and so a frame buffer system for smooth drawing.
I can't find the thread with a actual working FB app (I was helping Face_Master) but some code here
http://www.cprogramming.com/cboard/s...ht=Framebuffer
-
hmm ill check it out
OK thanks i kinda worked out what i need to do later on that day, but thanks for the input, ill checkout the thread.
I found that all i was wanting todo was to create buttons, lines, text, etc in WM_CREATE it was just a simple case of using CreateWindow/CreateWindowEx and some simple line drawing things, i obviously hadnt thought things thru enough b4 posting !