can i use both opengl and ddraw in one application?
no, not unless your completely release one and reinitialize the other
Mmm, well, I assume you can use both at the same time, in the same program, if you don’t use them in the same window. Can’t see any reason why you can’t use them on different windows.
Then how can I use swap buffer without glaux or glut?
Make sure to ask for a double-buffered pixel format when you call ChoosePixelFormat (include PFD_DOUBLEBUFFER in dwFlags). After you have set up your OpenGL Rendering Context on a window that uses a double buffered pixel format, just call SwapBuffers to swap buffers.
If the question you really wanted to ask was how to create an OpenGL window without using glaux or glut, then I would suggest scanning this group for past posts.
I was once able to have opengl draw to a directdraw surface. However, I changed video cards and it no longer worked. I suspect this is not a standard thing to do.