• Advertisement

Archived

This topic is now archived and is closed to further replies.

Yet another directx problem

This topic is 6248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have a silly directx problem, and I've read the old posts and no one seems to have had it. Well, to make a long story short, SetDisplayMode isn't working right. It should take 5 values, but it only accepts 3. Like this: HRESULT SetDisplayMode(DWORD, DWORD, DWORD); and that's all. When I compile, it doesn't send any errors, but when I run the program, I get a very weird error: Debug Error! Program: .... lists the program location Module: File: i386\chkesp.c Line: 42 The Value of ESP was not properly saved across a function call. This is usually the result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. With the option to abort, debug, or ignore. Ignore doesn't work and debug doesn't tell me anything. Line 42 is right where my WindowProc function is.(you know, for when windows gets messeges dealing with my program) If there is anymore information you need, I'll gladly supply it. Oh, one more thing: that error couldn't be copy/pasted. I don't think you need to know that, but it was a pain in the butt, so please be gentle. Edited by - nobodynews on January 12, 2001 10:39:11 PM

Share this post


Link to post
Share on other sites
Advertisement
The IDirectDraw::SetDisplayMode(DWORD,DWORD,DWORD) function takes only 3 parameters: width, height and bpp.

Use a IDirectDraw4 interface to solve this problem.
IDirectDraw4::SetDisplayMode(DWORD,DWORD,DWORD,DWORD,DWORD) takes (as you see) five. One of the last 2 parameters is the monitor frequency, but i dont know what''s the other one.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I am SUCH, an idiot. At first I didn''t get what you were talking about(idiot) so I eventually traced the problem to where you were probably pointing->
LPDIRECTDRAW lpdd;
LPDIRECTDRAW lpdd7;


I needed to create an LPDIRECTDRAW7 interface, just like you said. Just remember, I prefer the terms COMPUTER ILLITERATE, stupid, and idiot, but please, don''t call me newbie. That was just a case of not following directions.

Share this post


Link to post
Share on other sites

  • Advertisement