pouët.net

Win32 API coding: A Wrapper class for Window Creation

category: general [glöplog]
winterniels: like kusma said before, its probably better to code some tool that is usable before its starting to get somewhere.
it can be improved as time goes, well, its nothing new about this, ive planed it out myself, but the only problem i have is that i want the code to be as flexible as it can ever be- without doing major changes along the way. at the moment im more curious about the gui stuff than the engine code. i want the gui code to be flexible as well.
added on the 2009-01-21 15:53:09 by rudi rudi
well i don't have to agree with kusma per-se luckily :) but yeah you can set up something very basic that goes in the right direction, perhaps along with needed runtime code.

this brings me to the following, and that is that this 'extreme flexibility' is an utopia but there is one simple rule that best suits you if you want to keep all options open: keep code as simple as possible, do never implement a single piece of functionality or a line of code that you dont need (apart from perhaps a few really trivial things).

its easier to change something simple than to modify something complex/overdesigned. especially when dependencies grow, and they most likely will.
added on the 2009-01-21 16:02:22 by superplek superplek
oh but please keep depending on things. those orthogonal designs some people almost pray to imo are for amateurs and lesbians.
added on the 2009-01-21 18:21:24 by superplek superplek
i'm interested: what's an "orthogonal design" in your world?
added on the 2009-01-21 19:56:49 by skrebbel skrebbel
objects having 'horizontal' relationships instead of, where need be, hierarchical.
added on the 2009-01-21 20:16:09 by superplek superplek
out of curiousity, you work as a technology evangelist? (so many adjectives, so little meaning :)
added on the 2009-01-21 20:17:05 by Gargaj Gargaj
i'm quite good at mumbo jumbo for someone who backtraces crashed ps3 spu assembly in a bad debugger, right? :)
added on the 2009-01-21 20:26:12 by superplek superplek
(as for the original question, which is just for demos and not gui stuff, but to be more 'meaningful', here's what i use for my renderwindows: http://www.visualizers.nl/window_thingy.cpp) -- by no means perfect (im no windows expert, never have been) and there's some more code outside, but its the general gist of it)
added on the 2009-01-21 20:42:25 by superplek superplek
is it just me or is ListView a fucking joke?
added on the 2009-02-05 14:53:21 by rudi rudi
rydi: It's you. ListViews are useful.
added on the 2009-02-05 14:59:00 by kusma kusma
kusmabite: not usefull for editable subitems.
added on the 2009-02-05 15:01:36 by rudi rudi
plek: Amen.
added on the 2009-02-05 15:04:13 by kusma kusma
...because there are no way to edit subitems except for the first column, or else you'll have to make your own editboxes for all the columns (and rows). which i am doing right now. what a fucking waste of time.
added on the 2009-02-05 15:23:43 by rudi rudi
so basically you're re-doing a datagrid? Those already exist.
added on the 2009-02-05 15:31:05 by Paralax Paralax
Paralax: No, im not doing a datagrid.
added on the 2009-02-05 15:35:15 by rudi rudi
@rydi: You don't have to create edit-boxes for all the items in your listview. You only need one edit-box :)
added on the 2009-02-05 16:20:08 by datsua datsua
And here is a link that explains one way of doing it http://zairon.wordpress.com/2007/11/06/editable-listview-control/
added on the 2009-02-05 16:21:45 by datsua datsua
And what's exactly the difference to say... this?
added on the 2009-02-05 16:39:36 by Paralax Paralax
Quote:
Paralax: No, im not doing a datagrid.

Probably because because he's "not" doing a datagrid :)
But I suspect that a datagrid is what he should be using.
added on the 2009-02-05 16:47:00 by datsua datsua
datsua: yeah, sorry that's what i meant actually.
added on the 2009-02-05 20:18:06 by rudi rudi
its actually starting to work quite okay.
added on the 2009-02-05 20:19:20 by rudi rudi
That's nice to hear and I hope that you make a software demo about it ;)
added on the 2009-02-05 22:55:21 by datsua datsua
Datsua: of course, if i ever get there :P

the problem i am facing now is to handle the messages from the editbox. and this is where i found out that i need to do it via a global messagefunc which is not what i intended. i can't get a wm_keydown message from the mainwindow since i am in that editbox. i wonder if ive overlooked something...
added on the 2009-02-10 17:05:37 by rudi rudi
Sorry to say, but you might have overlooked that this could suck.
I'm not sure what you want to achieve, but you can build a custom message loop for the editbox and process messages there.
added on the 2009-02-10 21:35:52 by raer raer
no, i just hacked it. so it works.
added on the 2009-02-10 22:04:36 by rudi rudi

login