|
I'm curious what was wrong with the CreateFile() suggested here.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
it was good. I was curious what answer would give other peoples.
|
|
|
|
|
who knows the most simple way to append a menu with a icon?
for my application I only have 3 menu items need a icon attached as extra data.
a string attached would be much better, but not a must.
thank you
|
|
|
|
|
Please help me...
Is there anyone know how to take this kind of program into practice in general:it is been started just after booting,for the user who is not the administrator.And when the program is running,the user can only do things that the program permit and can't do anything that the program doesn't permit,including exiting and returning to the operating system.If wants to do so , a password is needed.Whithout the pass word,exiting is the same thing as shutting the computer down.
Thank you!
|
|
|
|
|
luyongxing wrote: Is there anyone know how to take this kind of program into practice in general
Yes, most of the people in this forum can help you but what is exactly what you want?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Maybe I did not say clearly and even there were some grammar mistakes.I am very sorry for that.I will think it over and explain it in exact words.
|
|
|
|
|
One way would be to replace the shell with one of your own. I did this once with Windows 9x. The registry value is:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
By default, the shell is explorer.exe. There are many articles on the Net that can provide you with details.
Another way is via the Group Policy Editor.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I create a new project (MFC Dialog) and place a button on the dialog. The code that the button performs is the following:
<br />
CCriticalSection c;<br />
c.Lock();<br />
c.Lock();<br />
c.Unlock();<br />
c.Unlock();<br />
When I start the Program in DEBUG-Mode I expect the following behaviour:
1. The CritSec is created.
2. The first Lock is applied.
3. The second call to Lock should result in a deadlock.
But that is not the case. The code will run without any problems.
WHY !!!!
Is there some different behaviour in DEBUG-Mode, or what?
Greets Snow
|
|
|
|
|
what is the return value when second lock is applied
-- modified at 6:51 Monday 28th November, 2005
|
|
|
|
|
|
Hi,
the CCriticalSection object encapsulates the CRITICAL_SECTION type.
The lock function calls the EnterCriticalSection API. So from the MSDN libs I found this:
After a thread has ownership of a critical section, it can make additional calls to
EnterCriticalSection or TryEnterCriticalSection without blocking its execution. This prevents a
thread from deadlocking itself while waiting for a critical section that it already owns. The
thread enters the critical section each time EnterCriticalSection and TryEnterCriticalSection
succeed. A thread must call LeaveCriticalSection once for each time that it entered the critical
section.
So it is normal behaviour
codito ergo sum
-- modified at 11:29 Monday 28th November, 2005
|
|
|
|
|
|
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
|
|
|
|