|
Hi all,
I have to write a program in MFC that should do:
- draw a sinusoidal signal on the screen
- draw a random signal with random dispersion on the screen
- draw the sum of the two signals
I haven't program and I'm not very interested in programming in MFC, so I'm just asking if anybody of you have done something like this and could give me a ready class, a hint, etc. If there are some ready functions in MFC I'll appreciate if you point them.
Thanks very much for the help!
SELECT * FROM LIFE
|
|
|
|
|
There are several chart articles that may help you. One that I've used in several ocasions to represent data series is XGraph[^] that is very powerfull
I hope it helps,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
I am working on something like this but
havent done up with the work and it remaining to
optimise the class.
But u can find some example in codeproject for
displaying some good sinosuidal signals.
Abuout random i dont knwo if the same class can do
the work for but will try my class to do that for u
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
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...
|
|
|
|
|
Hello,
It doesn't help to post your question three times after eachother...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi,
OOOOOPS!!!! it was a mistake...sorry abt it(i got a server error everytime i posted it)
chillax
|
|
|
|
|
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
|
|
|
|