View Single Post
Old June 9th, 2009   #24 (permalink)
@ruantec
Emu author
 
@ruantec's Avatar
 
Join Date: Nov 2002
Location: Austria (originally from Dominican Republic)
Posts: 2,381
Quote:
Originally Posted by Hatorijr View Post
how much do you know of win32 window creation? my main thing was i could almost never get my code to create addition windows right, i could make them but when i closed one it closed everything down, i fixed it once but i broke it and never got it working again :/. than again with everything i learned from c#, if i went back now and tried, i most likely could get it easily lol. learning c# helped me learn aspects of coding that i found rather difficult in c++ and was able to learn those a lot easier, i wonder if i could code much more efficiently in c++ now lol.
C/C++ has always been a pain when it comes to GUI but there are several ways to create them via API in a easy way. when you need your GUI to be fancy you have to deal with few things in windows... first is to create a form then by using the SetLayeredWindow api you can transform that form into a layer by passing the hwnd of the window. once you get your layer ready you can use GDI+ to draw everything you need. there are also DX ways to do that but they are too complicated.

the only problem(well not a problem for me as is what i love) you have with that technique is that you´re dealing with a per-pixel app that means you can´t draw a hwnd(control) over it as it won´t be visible. so your only choice is to show yourself and write your own controls and functionality which to me helps a lot as you can add/remove whatever you want and in most cases they consume less memory and do the job faster(Showed in the old @ES when loading 25,8GB of Audio information). by using a second form you can stick one to another and create several layers that allows you to hold normal controls or draw whatever you want there such as picturebox etc..
__________________

Current development tools:

Visual C++.net, Visual C#.net
Visual VB.net, Visual Webdeveloper.net
Bloodshed Dev C++, Borland C++
Visual Basic 6

Last edited by @ruantec; June 9th, 2009 at 08:47..
@ruantec is offline   Reply With Quote