Author |
Message |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Apr 09, 2005 10:40 am Post maybe stupid Post subject: |
 |
|
|
|
All commands should be handled by code AND id, otherwise you can confuse lots of messages. You can differentiate between menus, accelerators, and control notifications. _________________ 4,691 irradiated haggis! |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sat Apr 09, 2005 2:44 pm Post maybe stupid Post subject: |
 |
|
|
|
Yes I have often thought the same thing. In my command handler, I use if/else-if/else-if/else type statements. Doesn't have to be super efficient because commands are mostly at UI speed (ie user keys and clicks).
If you were ambitious, you could also combine code/id into a single value and switch on that. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sat Apr 09, 2005 3:53 pm Post maybe stupid Post subject: |
 |
|
|
|
Ekted wrote: | If you were ambitious, you could also combine code/id into a single value and switch on that. |
Yeah, that was what I was trying to say I had been doing above, but now I have many, many IDs for the same notification code, and I want to process them all the same.
(Are we the only Win32 programmers on this board?) |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Sun Apr 10, 2005 1:41 am Post maybe stupid Post subject: |
 |
|
|
|
Cyan~Fire wrote: | Are we the only Win32 programmers on this board? |
No, just my UI skills are just crap. Take a look at 'pretty' the interface for my DeBuildlevel program was. I prefer to try and work on the background side of things, and leave the interface to someone else.
Of course, I've been working on trying to increase my UI skills, but have not had the time too much. |
|
Back to top |
|
 |
Solo Ace Yeah, I'm in touch with reality...we correspond from time to time.

Age:37 Gender: Joined: Feb 06 2004 Posts: 2583 Location: The Netherlands Offline
|
Posted: Sun Apr 10, 2005 3:48 pm Post maybe stupid Post subject: |
 |
|
|
|
Mine GO BOOM wrote: | No, just my UI skills are just crap. |
Hah, if you call yours "crap" you haven't seen mine yet.
Every time I try to get a nice GUI on a program I end up getting annoyed because things don't work how I want them to work or just, well, don't work at all.
I might start trying to skills ^ 2 again after this school year. |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Sun Apr 10, 2005 5:14 pm Post maybe stupid Post subject: |
 |
|
|
|
I didn't even know where to begin, most of the pages I lookup uses MFC or some variant of it. _________________ Performance is often the art of cheating carefully. - James Gosling |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Apr 10, 2005 5:32 pm Post maybe stupid Post subject: |
 |
|
|
|
MFC is like a virus. It took over Win32 API without improving it. It now dominates all searches for any real info. |
|
Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Sun Apr 10, 2005 8:53 pm Post maybe stupid Post subject: |
 |
|
|
|
I had a go at some GUI stuff last weekend. I had to port my code to c++ since that's what wxWidgets uses. It made the program 5 times bigger.
When I got round to installing the wx devpak in devcpp the barebones program int the project template is 1.8mb (statically linked I believe). The gtk libs were over 6mb themselves so wx is an improvement in a way. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Apr 10, 2005 9:29 pm Post maybe stupid Post subject: |
 |
|
|
|
My win32 apps (statically linked) are usually in the 20-60K area, unless they have a ton of resources in them. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Apr 10, 2005 11:00 pm Post maybe stupid Post subject: |
 |
|
|
|
Eek. My program is 100K! It's dynamically linked, which by my understanding, should make it smaller? What's wrong? |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Apr 11, 2005 12:48 am Post maybe stupid Post subject: |
 |
|
|
|
Straight win32? No other non-OS libs? No wrappers like MFC, etc? Large resources? Release mode compile? |
|
Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Mon Apr 11, 2005 1:40 pm Post maybe stupid Post subject: |
 |
|
|
|
Mr Ekted wrote: | MFC is like a virus. It took over Win32 API without improving it. It now dominates all searches for any real info. |
Time to write your book now show us newb programmers how to do it right  |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Apr 11, 2005 5:58 pm Post maybe stupid Post subject: |
 |
|
|
|
My static zlib.lib is 66K in release mode. It's a build I made with just the stuff I've used. For example, I don't use the file stuff. I have no idea how much bigger this lib makes the EXE though. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Apr 11, 2005 6:30 pm Post maybe stupid Post subject: |
 |
|
|
|
The dynamic one with all the functions I'm using is 10.5K. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Apr 11, 2005 6:55 pm Post maybe stupid Post subject: |
 |
|
|
|
Dynamic means the EXE will use an external DLL. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Apr 11, 2005 7:52 pm Post maybe stupid Post subject: |
 |
|
|
|
But it still needs a lib to link to, right? I looked in zlib.lib with a hex editor, and it seems it's just a bunch of function names and offsets. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Apr 11, 2005 8:11 pm Post maybe stupid Post subject: |
 |
|
|
|
A dynamic lib simply lists the exports that are in the DLL. This allows the linker to know that they exist, and to place the appropriate references in the EXE header so the loader knows to load zlib.dll and what functions to find/resolve. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Apr 11, 2005 8:45 pm Post maybe stupid Post subject: |
 |
|
|
|
OK, that's what I thought. So... any clue what's going on? The source itself is 160K, if that's around the range you're looking for. |
|
Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Mon Apr 11, 2005 9:39 pm Post maybe stupid Post subject: |
 |
|
|
|
You use anything gay like STL? |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Apr 12, 2005 3:55 pm Post maybe stupid Post subject: |
 |
|
|
|
I don't use STL, but I use one template class that I wrote. I guess that does take up a bit of room, as it's used for 4 different classes, so 4 different copies.
But it's nowhere near STL which includes around 10 templates for one you use in your code. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Jun 20, 2005 9:05 pm Post maybe stupid Post subject: |
 |
|
|
|
Off topic, but still Stupid Windows API.
Any way to catch a return sent to an edit control other than by subclassing? Of course, only common controls send NM_RETURN (not to mention WM_NOTIFY in general, which only makes command processing 50 times easier). |
|
Back to top |
|
 |
|