What's new

CHIP8 DrawSprite

aprentice

Moderator
Doomulation said:
Now, if I translate this,



...we'll get this:
"Why use assembly when you can use C/C++?"
OR
"Why use pure win32 api programming when you can use MFC?"

We will simply write out program without knowing how the inner working of the code we use works :icecream:
Although knowing how the hardware communicates is a good thing... but it doesn't require asm.

Some people find winapi more easier than MFC, I know I do.
 

glVertex3f

Crap Cracker
Im not saying "dont learn or ever use assembly" or anything like that.

I think its great we learn this stuff for the concepts and understanding. Im just saying there's really no reason to write a large program (emulator) in assembly. (Except for the novelty)
 
OP
K

Kevin19

New member
I think you people have encouraged Me to upgrade to WIN32API

Or at least that is the name of the book i got here

WIN32API and introduction to MFC
 
OP
K

Kevin19

New member
and the second reason that i am going to need a real easy way to access files or something to create a sort of debugger

Because my last debugger in the chip8 project was kind of burdensome to code
 

Cyberman

Moderator
Moderator
The WinAPI is actually easier to understand than the Poo people call MFC. Unfortunately sometimes obfuscation of what is going on underneath makes for poor programing. I never use MFC to be honest because as many professionals have observed "MFC is a poor excuse to hide all the inadequacies of win32 with even worse ways of handling all the functionality of the windows API"

I use Borlands classes and the win32 API directly. I don't waste time with something that is moot and pointless (MFC in this case).

As for how Kevin19 is doing things, I think most of you are arguing for the sake of arguing, obviously he is having fun with what he's doing. If he wants to use DOS or win32API let him. He'll have fun and learn something, it's bettern than learning nothing as a result.

I really find MFC just another anoying layer of obfuscation by Microsoft that really isn't useful unless you like to cut your head off and use it for shark bait regularly :teehee:

Cyb
 
Last edited:

zenogais

New member
I personally use MFC, and I find it to be easier than WinAPI as I don't have to create long files dealing with useless message handling switchs, which was something that always annoyed me about the WIN32 API. Although MFC isn't perfect, I find that I write alot less code, and the windowed code that I write has alot fewer bugs and memory leaks. But don't be fooled, the WIN32 API is not nearly as bloated as MFC in terms of interface size. I'm sure eventually I may end up just writing my own wrapper around WIN32, as alot of programs who deal with it often do, but I'd only be doing this to avoid the bloat of MFC while keeping the idea behind it achievable.
 
OP
K

Kevin19

New member
I exmained both and WIN32API looks more extensive and sensible to the eye

But all this windows programming business is really frustrating so many pieces of code to deal with one thing

I know this is win32api

But is not there something that lets you build and modify the properties of the window and make menus other than program them yourself using resource files

I would really appreciate it if you people could help me understand this interface better
Because i really need to get done studying the basics of it
So i can start trying out THE 6502 CPU code i programmed
 
OP
K

Kevin19

New member
I do not want to sound petty

But this is really frustrating scripting the resource file

Could not they just make a friendly PROGRAMMER interface like in visual basic to design your menus and all the visual appendages
 

smcd

Active member
You can make everything in a resource editor and instead of using "real" windows, use the designed dialogs (this is what I often do), or use a platform like Borland C++ Builder.
 

Doomulation

?????????????????????????
Lemme quote y'all... starting with apprentice =)

aprentice said:
Some people find winapi more easier than MFC, I know I do.
I really can't see how people find win32 api easier. For example, you need to define a message handler when working with windows. In MFC, you can sinply override those messages you want to handle. Ahhh, sweetness.
And not to even bother with the accursed structs when you for example want to add an item to listview... MFC has functions that doesn't use all of the functionality of those, hence making it MUCH easier to add a simple line without much hassle. Of course, it still provides struct functions so you don't lose out anything on using MFC.
And the fact that all functions are wrapped up in classes and you don't have to use GetDlgItem or such... that's just friggin' sweet!

and the second reason that i am going to need a real easy way to access files or something to create a sort of debugger

Because my last debugger in the chip8 project was kind of burdensome to code
That is the beuty of win32 programming ;) it saves you a lot of trouble rather than dos.

The WinAPI is actually easier to understand than the Poo people call MFC. Unfortunately sometimes obfuscation of what is going on underneath makes for poor programing.
It sure isn't. Win32 api is confusing, hard to understand, hard to get right and a friggin' pain in the ass. Sure, mfc hides a lot of details, but it never leads to poor programming.

I never use MFC to be honest because as many professionals have observed "MFC is a poor excuse to hide all the inadequacies of win32 with even worse ways of handling all the functionality of the windows API"
Well, that's them. MFC is rather good, if you get to know it. I have yet to see ONE THING that mfc makes worse than using the real win32 api.

I use Borlands classes and the win32 API directly. I don't waste time with something that is moot and pointless (MFC in this case).
Once again, it isn't pointless and moot.

As for how Kevin19 is doing things, I think most of you are arguing for the sake of arguing, obviously he is having fun with what he's doing. If he wants to use DOS or win32API let him. He'll have fun and learn something, it's bettern than learning nothing as a result.
Actually, you see... it's better to lead a mad who's lost out of the labyrinth rather than leave him there. I think kevin should try an effort to learn win32 api. Dos is outdated is is obviously crap.

I really find MFC just another anoying layer of obfuscation by Microsoft that really isn't useful unless you like to cut your head off and use it for shark bait regularly :teehee:
And I think you're wrong ;)

I personally use MFC, ...
Yes, I think zenogais is correctly here... MFC is really useful. But oh I'm repeating myself :evil:

I exmained both and WIN32API looks more extensive and sensible to the eye

But all this windows programming business is really frustrating so many pieces of code to deal with one thing

I know this is win32api

But is not there something that lets you build and modify the properties of the window and make menus other than program them yourself using resource files

I would really appreciate it if you people could help me understand this interface better
Because i really need to get done studying the basics of it
So i can start trying out THE 6502 CPU code i programmed
There is. The easiest way is to do it is to create resources, then use the LoadMenu() api, which will give you a handle to the menu. There's also other menu functions such as ShowMenu() and EnableMenu() if I'm not mistaken. There are also functions to modify and create menues dynamically. Such are CreateMenu, CreatePopupMenu, AppendMenu, and more. You should take a look into the windows sdk. VC++ has all win32 api functions documented.

I do not want to sound petty

But this is really frustrating scripting the resource file

Could not they just make a friendly PROGRAMMER interface like in visual basic to design your menus and all the visual appendages
I thought this too when I first started... but there is a grid which can be enabled in the toolbar. Also buttons that align buttons and make them same size/height =) Great stuff.
 
OP
K

Kevin19

New member
Where and how do i use this resource editor

I know this question might sound very general
But I just got to the chapter that teaches about menus and dialogs and the scripting language looks very dreadful in a way that i cannot explain

I will be honest with you i am not a big fan of scripting languages
 

Doomulation

?????????????????????????
Lol, the resource editor is part of the visual c++ envoirment. Click the resources tab and insert whatever resource you want ;) It'll bring up the resource editor. Also, if you double-click on them.

You'll find menues in windows is very easy actually. With resources, almost no code is necessary =)
 

smcd

Active member
There are also numerous free resource editors, for free C and/or C++ IDE & resource editor, you might check out Mingw Studio, http://www.parinya.ca/

It's practically a clone of VC++ 6's IDE, though not as fully featured. For being free (and cross platform, wow!) it is great.
 
OP
K

Kevin19

New member
Yes i tried to make a resource with the MVC++ resource editor
and it seems to give me this error

d:\win\resource.rc(20) : error C2143: syntax error : missing ';' before 'constant'
d:\win\resource.rc(20) : error C2501: 'LANGUAGE' : missing storage-class or type specifiers
d:\win\resource.rc(20) : fatal error C1004: unexpected end of file found
 

Top