1: Well, you’re using legacy-opengl, but there is nothing particular bad about this I think.
2: Generate a empty texture with glGenTextures, bind it with glBindTexture, fill your data in with glTexImage2D
3: you don’t bind it to GL_QUADS, you just bind it, all following calls will have the texture bound, until you bind a new texture.
Also make sure to set the UVs (0,1 for the top-left corner, 1,1 for the top-right corner, 0,0 for the bottom-left corner and 0,1 for the bottom-right corner)
I’m not familiar with Delphi, but from a brief look at the documentation, you can get the underlying bitmap handle (HBITMAP) via the Handle member, on which you can call the GetDIBits() GDI function.
IIRC, Windows uses GL_BGR format (i.e. blue first). Also, if the width isn’t a multiple of 4, you need to call glPixelStorei(GL_UNPACK_ALIGNMENT, 1) (the default is 4-byte alignment).
You don’t. You just bind it (with glBindTexture), enable texturing (glEnable(GL_TEXTURE2D)), then draw a quad, specifying texture coordinates as well as vertex coordinates (texture coordinates (0,0) are the lower-left corner for a bottom-up bitmap or the top-left corner for a top-down bitmap).