At 9/23/06 09:59 AM, Elemento wrote:
At 9/21/06 05:20 PM, Jordan wrote:
Yeah, its really anoying, and also, its likely that it doesnt really teach as much as a "real" book on programming.
At 9/21/06 04:26 PM, elbekko wrote:
I dislike the For Dummies books =/ They always think I'm stupid. Tried reading one on C once.Yeah, they do assume you are somebody who has only been using a computer for a day and don't even know how to open up a program :(
My first programming book was "The C Programming Lenguage" excelent book, just excelent.
My first programming book was actually Visual Basic 3.0 for Windows
though I really never read it, I pretty much just followed the examples.
I'm working on a pretty cool project at school now, having alot of troubles though,
I'm making a remote control for windows media player and winamp on a pocket pc.
I've made everything work, it now plays, stops, pauses, sets to fullscreen mode, next previous, fast forward etc. but I have a big problem namely to retrieve the playlist!
I thought it would be pretty straight forward by just using the windows message queue to retrieve elements, text string by text string, but appearantly, they're using the ATL ListView control, which does some freaky stuff.
On the normal listbox control, you can just send LB_GETITEMTEXT to retrieve data so that one's simple, in listview they have a LVM_GETITEMTEXT which theoretically should work similar... but nooo, for some reason, it needs a pointer to a structure, now in plain C++, this would be simple, but problem is; I'm using C# which isn't a problem in most cases, BUT in C#, you can only use pointers to primitives, ie int *, byte* float * etc, but not structures. This would still not be a problem, because I could just point to a byte * an retrieve data "manually" from there since I know what the structure looks like, problem is; the field I want, is a LPSTR within the structure, which makes the whole scheme alot harder, so I started making a managed DLL in C++ to implement in my project, which would be the logical step. But then I encountered a new problem...
The linker complains about a missing entry point, stdcall_ malloc, so I changed it to new; new linker problem, missing entry point stdcall_ new. It seems they have forcibly removed the unmanaged memory allocation functions for some reason. So I thought I should start being clever, so I did this :
thestruct.lpName = "(tons of whitespace)";
to force the string to allocate some memory in stack.
Console output (client)
server : ELLO MOTO!
me : ELLO!
server : FLESH
me : PLAYLIST
Windows Media Player has encountered a problem and needs to close. We are sorry for the inconvenience.
And I was like " : / "
Oops, too long text? sorry to ditch you off topic, I just wanted to share :)