|
I have never done any DX programming, so this is just a guess.
The second parameter is supposed to be the version number for which the application is designed. You specified the DIRECTINPUT_VERSION macro, but what is the value of that macro? It is defined in the file DInput.h. So which version of the file are you using? If you are using the version that came with VC6 then it will be defined as 0x0500 (DX5).
You then provide an IDD for DX8 in the third parameter, and you say you are using the DX9 SDK.
Are you running into too many version conflicts here?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks for replying.....
well the macro is
#define DIRECTINPUT_VERSION 0x0800
defined before
#include <dinput.h>
according to the msdn link below.....
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/input/ref/functs/directinput8create.asp
and if i am sure the there was no changes made in DX9SDK in direct input so it uses dx8 parameter here(3rd param).
regards
varun
|
|
|
|
|
Hi,
here is my code...
BOOL cInput::Init(HWND hWnd, HINSTANCE hInst)
{
// Free a prior Init
Shutdown();
// Record parent Window handle
m_hWnd = hWnd;
// Create a DirectInput interface \\\
m_pDI = NULL;
if(FAILED(DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_pDI, NULL)))
return FALSE;
// Return a success
return TRUE;
}
i use VC++ 6.0 and directx 9 sdk
can anybody tell me whats wrong with this code ,it compiles n runs fine but while debugging at line "DirectInput8Create" it exits to the
assembly gives dialog "userbreakpoint called at .....".here the hInst is valid...n even rest seems fine for me.any kind of help is welcomed.
thanks in advance...
|
|
|
|
|
Hi,
here is my code...
BOOL cInput::Init(HWND hWnd, HINSTANCE hInst)
{
// Free a prior Init
Shutdown();
// Record parent Window handle
m_hWnd = hWnd;
// Create a DirectInput interface \\\
m_pDI = NULL;
if(FAILED(DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_pDI, NULL)))
return FALSE;
// Return a success
return TRUE;
}
i use VC++ 6.0 and directx 9 sdk
can anybody tell me whats wrong with this code ,it compiles n runs fine but while debugging at line "DirectInput8Create" it exits to the
assembly gives dialog "userbreakpoint called at .....".here the hInst is valid...n even rest seems fine for me.any kind of help is welcomed.
thanks in advance...
|
|
|
|
|
i heard one of the method is using % and / as predicate when compare the elements, but i dont really understand why use % and /, may anyone explan for me, thx very much!
1
|
|
|
|
|
Hello,
What algorithm are you testing? It's impossible for use to help you if you don't specify your problem more clear.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
sorry,
my question is how do u test sorting algorithms for stability by using % and / as predicate and why use % and /
like in merge sort ,u not suppose to swap the same element which its stable sort
but how do u prove its stable
thx
1
|
|
|
|
|
Hello,
I normally don't prove the stability of an algorithm with a test program. I prove the stability and correctness of my algorithm using math. It's difficult to explain and even harder to do, but if you can do it, it's an powefull tool in your toolbox. I'm just glad that I don't have to use it much..
A test program is there to help you resolve bugs in the implementation of your algorithm. Often, test programs are written for stress testing and preformance measuring.
If you want to prove your algoritm with a test program, you should have lots of data. You can choose the data carefully or use random data. The benefit of random data is that it mightsaves you a lot of work early in the process, but can cost you much more if you miss the hard-to-detect bug. Choosing your data carefully reduces the change that you miss a bug, but takes a lot of time early in the process. If you already verified the correctness of your algorithm, you should choose the random number approach and do a lot of stress testing (let your algorithm process HUGE amounts of data and see how it performs). If you want to debug your algorithm, you should carefully pick a sequence of data that you expect to give problems. These sequences can be very small.
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Without any code added for validations if I simply send IDOK on the sheet, i have it call IDOK on all its member pages which causes an assertion failure. But the problem is does not happen when one activate all pages of the property sheet before IDOK.
guesses are calling of UpdateData before the dialog is initialized might be causing the problem.
Could someone explain the working of CPropertySheet::AddPages()??
does it take care of initializing the dialog of its member pages?
Thanks in advance
|
|
|
|
|
The PropertyPages are not true 'windows' until you activate them or go to them using the tab or the next/back butons if it is a wizard. Otherwise, you just have the instance of the wrapper class, but no window exists yet.
You could check some of their member variables, such as m_hWnd to see if there is really a 'window' there before sending a property page any messages. Otherwise, you can declare a 'initialized' member variable for each property page and then set it to true in an OnInitDialog handler. Check this variable before sending a property page any messages.
|
|
|
|
|
thanks a lot, didn't know dat and never seen samples using this technique.
now d appl works fine. thanks again
|
|
|
|
|
thanks a lot for the info, the crash got resolved but now I am faced with a new issue.
I am initializing CDateTimeControl with current date on CPorpertyPage::InitDialog(). I have a random crash which appears and disappears with time, and it does not occur at my end.
Also the crash occurs when the exe is built at my end but does not occur when built at some other machine even when I comment out the code being executed on InitDialog().
Module:
File: i386\chkesp.c
Line: 42
The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
the above is the error msg I get on a crash, cud u pls help me diagnose this prob?
|
|
|
|
|
In order to use common controls on a dialog box, you need to call InitCommonControlsEx or AFXInitCommonControls before you create the dialog box.
Make sure you do this in your main property sheet before any of the dialogs with the comon controls are created.
Ask someone who has a machine that crashes to verify the DLL containing the date-time picker is the same version as the one you have. If it is not, then you will have to make sure the correct version is on a system prior to running your program or prior to activiating the property pages with the date-time pickers on them. This might explain why you don't see the crash, and why anyone who builds it does not either.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Hi Everybody.................
Can any one of u please guide me
"How to run a project in service mode"
Thanku in Advance
Dilip
|
|
|
|
|
|
For a simplier an fast way use XYNTservice[^]
Good luck,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
thelip2005 wrote: "How to run a project in service mode"
navigate to this link
http://www.codeproject.com/system#service[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
in my CDHtmlDialog window I have a iframe which displays another webpage. The problem ist, that I don't receive any DHTML_EVENT_ONCLICK events since the iframe contains another IE window. My question is now how to connect the DHTML_EVENT_MAP of my main CDHtmlDialog with my iframe window so that I can react to any actions performed in the iframe as well as the main dialog.
any suggestions?
./regards
Florian
|
|
|
|
|
Hi All,
I want to get the printout of an access table but when i open it & print it, i only get the first record printed.What may be wrong? Here are the two lines for opening & printing that i am using:
oDoCmd.OpenTable(_variant_t("recipe"),0,1);
oDoCmd.PrintOut(1,_variant_t("1"),_variant_z("1"),1L,_variant_t("1"),_variant_t("1"));
May be the problem is because whenever the table is opened its first record is already selected by default.perhaps, all the records need to be selected. How can i do that. i am using vc++ 6.0 & ms-access 2000.
Please Help. it is urgent.
Regards,
Ankush Mehta
|
|
|
|
|
What is DoCmd ?
I mean what type of object is it
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
it is used in access automation.see object model documentation for automating ms office.
hierarchical object model is used for office automation.
see msdn for details.
Regards,
Ankush Mehta
Ankush Mehta,
Dewsoft Solutions,
Mumbai
|
|
|
|
|
Ankush Mehta wrote: oDoCmd.PrintOut(1,_variant_t("1"),_variant_z("1"),1L,_variant_t("1"),_variant_t("1"));
Your arguments are wrong for the Printout command.
acPrintAll == 0
acSelection == 1
acPages == 2
BTW, there shouldn’t be any need to recast (all though I’m not completely sure about that) as all of the arguments are integers.
Good luck...
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
sfdougl wrote: oDoCmd.PrintOut(1,_variant_t("1"),_variant_z("1"),1L,_variant_t("1"),_variant_t("1"));
Thanks, First argument must be zero(print all).But as per VBA documentation second & third arguments(from page, to page) should be omitted.This doesn't work out in VC++.Error is- error C2660: 'PrintOut' : function does not take 4 parameters.
We need to type cast since these are of type variant in vc++.
Any idea buddy 4 d solution.Can u possibly suggest me how to have the number of tables and their names in ms access database.
Thanks in anticipation,
Ankush Mehta
|
|
|
|
|
Ankush Mehta wrote: First argument must be zero(print all).
Yup that’s why I mentioned it; your first argument is 1 which is print selection, in other words the currently selected record. Change that argument to a 0.
Ankush Mehta wrote: per VBA documentation second & third arguments(from page, to page) should be omitted
Im no where near a complier to test this but if 1 is causing an error try -1.
Ankush Mehta wrote: Can u possibly suggest me how to have the number of tables and their names in ms access database.
You can query Acces for tables i.e.
SELECT MSysObjects.Name FROM MSysObjects WHERE (((MSysObjects.Name) Like "Table Name"
or simply
SELECT MSysObjects.Name FROM MSysObjects
Hows that?
ZeePain! wrote: This seems like one of those programs that started small, grew incrementally, building internal pressure, and finally barfed all over its source code sneakers. Or something.
thedailywtf.com[^]
|
|
|
|
|
How can i query that using vc++?Please suggest.
Let me restate the problem.
I want to print an entire ms access table using vc++.Unfortunately, the code works fine for vb(in which if first argument of printout is 0, there is no need for second & third argument).The same thing in vc++ is not supported, it asks for all six arguments
DoCmd.PrintOut [printrange][, pagefrom] [,pageto][, printquality][, copies][, collatecopies]:
Ankush Mehta
|
|
|
|