|
your declaration gives you 8x8 values, not 9x9. your loops are spanning 9x9 values.
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
I see. Do you think the program would still run properly and give the correct values in the table/array if the loop was incorrect? Do you think that would cause the crash at the end? I will try mess with that coding.
|
|
|
|
|
there is no telling what you will get if you start writing off the end of an array. you could be writing into anything...
-c
There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'.
--Holgate, from Plastic
|
|
|
|
|
Remember that arrays in C/C++/C#/Java are indexed from 0 to size-1. So by reading the element at position 8, you're actually reading the 9th element. And your array only has room for 8.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
you guys are awesome......that totally fixed it.
I knew that arrays started at 0 but i was sloppy in the coding and then didn't even think, since it worked properly, that the crash at the end was because of the loop...never entered my mind...
thanks a bunch..that fixed it....
Jo-Anne
|
|
|
|
|
Also don't use magic numbers, e.g. int array[8][8]
try #define MY_ARRAY_SIZE 8 (or const int MY_ARRAY_SIZE = 8)
array[MY_ARRAY_SIZE][MY_ARRAY_SIZE]
then, for(i = 0; i < MY_ARRAY_SIZE; i++)
|
|
|
|
|
I'm writing an MFC app that uses a word 200 object via automation. Of course this requires me to give the type library of word9 as well as word9 hearder files. Will this app work if I distribute it and the customers have a word version that is greater than 2000 such as Word XP or one lower such as Word 97? I don't have these office versions so anyone with MFC automation experience with Office , an answer would be greatly apprciated by me.
Thanks in advance,
Martin.
|
|
|
|
|
It depends what interfaces you use. We've had no trouble using apps built against Office97 and 2000 on systems with 97, 2000, and XP installed. But we stick to the functionality available in Office97.
(and of course, there's no guarantee that MS won't break compatibility at some point in the future... )
---
Shog9
This is my December
These are my snow covered dreams
This is me pretending
This is all I need...
|
|
|
|
|
i am using xp professional.
i have created a gina dll that will call the orginal msgina function.
question-
when the window perform logoff procedure then the window with this message should appears
Press ctrl+alt+del (like in WINDOWS NT OR 2000)
I dont how to implement that little logic.
Can any body tell which function of gina dll called when the system is in loggoff state and and
the dialogbox with this title
--------------------
Log On to Windows
--------------------
did not appears so that i can call the function that create a dialogbox
(having message Press CTRL+ALT+DEL)
For this purpose cany any body tell which function of gina dll or winlogin.exe creat a
message(Press CTRL+ALT+DEL)
and where i have to call that function?
so that after logoff procedure
the dialogbox with this title
--------------------
Log On to Windows
--------------------
did not appear.
//////////////////////////////////////////////////////////////////////////
i have halted the CTRL+ALT+DEL by using this simple code in gina dll
but there is still a problem and that is
when i press CTRL+ALT+DEL the desktop window and its child windows shakes
it gives the behaviour as i perform refresh event.
but i did not want that for my running application at that time.
nothing should heapen when user press CTRL+ALT+DEL?
how to do that ?
i have spent a lot of houres but could not sucessed yet.
can any body help me in this regard.
int
WINAPI
WlxLoggedOnSAS(
PVOID pWlxContext,
DWORD dwSasType,
PVOID pReserved)
{
if(dwSasType==WLX_SAS_TYPE_CTRL_ALT_DEL)
return WLX_SAS_ACTION_NONE;
else
return GWlxLoggedOnSAS( pWlxContext, dwSasType, pReserved );
}
r00d0034@yahoo.com
|
|
|
|
|
Could someone write this guy a GINA dll ? He's so obviously lost. Someone take pity on him and me, please.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
Could someone write this guy a GINA dll ? He's so obviously lost. Someone take pity on him and me, please.
obsolete
|
|
|
|
|
Next he will ask for a Marta dll
I just wonder why you have given up to complain about GINA DLL instead of MSGINA DLL
I don't think this is a serious possesion, and the evil most likely comes from your hand. Colin J Davies, The Lounge
|
|
|
|
|
Q-1who to get window directory path programatically?
Q-2if i call BlockInput(true)
and then i want to use postmessage or sendmessages for keyboard and mouse
will these messages works?
r00d0034@yahoo.com
|
|
|
|
|
imran_rafique wrote:
Q-1who to get window directory path programatically?
You look up the VC++ Help which tells you about: GetWindowsDirectory()
imran_rafique wrote:
Q-2if i call BlockInput(true)
and then i want to use postmessage or sendmessages for keyboard and mouse
will these messages works?
There would have to be a very, very good reason to use a function like BlockInput(). Surely you can simply test whether SendMessage etc. work. I would assume the will. The doc's don't indicate otherwise.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
i am using msgina.dll feature of
Automatic Logon
This feature allows a Windows NT system to log on a user automatically every time the system boots, by using default information.
for this purpose i know the use of following registry keys
1-AutoAdminLogon
2-AutoLogonCount
3-DefaultUserName
4-DefaultDomainName
5-DefaultPassword
i am sucessfully using this when the system boot.
platform is window xp
but problem is that when i logoff(afterlogon) the window then the
Dialog box with title
------------------
LOG ON TO WINDOWS
-----------------
appears although the registery keys having values
AutoAdminLogon is 1.
AutoLogonCount is greater then 0 or did not present.
DefaultUserName is correct.
DefaultDomainName is correct.
DefaultPassword is correct.
what i have to do hear in code of gina dll so that
Windows NT system log on a user automatically against a perticuler SAS event(say ctr+alt+del or any other)?
r00d0034@yahoo.com
|
|
|
|
|
I am trying to do something like this ...
CMyDoc::CMyDoc()
{
// TODO: add one-time construction code here
m_point = CPoint( 30, 30 );
m_upperLeft = CPoint( ??? something ??? , ??? something ??? );
m_lowerRight = CPoint( ??? something ???, ??? something ??? );
}
... and then do this ...
void CMyView::OnDraw(CDC* pDC)
{
CMyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
pDC->MoveTo( pDoc->m_upperLeft.x, pDoc->m_upperLeft.y );
pDC->LineTo( pDoc->m_lowerRight.x, pDoc->m_lowerRight.y );
pDC->MoveTo( pDoc->m_upperLeft.x, pDoc->m_lowerRight.y );
pDC->LineTo( pDoc->m_lowerRight.x, pDoc->m_upperLeft.y );
}
... what should I replace the ???something???'s with
|
|
|
|
|
Well since the Upper left and bottom right are points on the view and not the document, the view should determine these values.
I think GetClientRect will return a rect and then you can get the topleft and bottom right such that your X will be across the screen.
|
|
|
|
|
How can I find out how to use GetClientRect?
|
|
|
|
|
|
Oops! I almost forgot to say. Thanks!
|
|
|
|
|
Guys I am stuck .... I am trying to make a MFC application using opengl. I want to find out how to select an Object in a opengl screen of the MFC appliaction... please guide .. its URGENT>>>>>
|
|
|
|
|
I'm pretty sure that NeHe has stuff on this. It should just be a case of changing the screen co-ordinates to the world-space co-ordinates I think but for more info go to http://nehe.gamedev.net/ - A site for everything OpenGL based.
|
|
|
|
|
I have a program in which I have a splitter Window of Rich Edit View and an edit view.
I have Given a facity in the RichEdit View Through Which Whenever I right Click on a Particular words its Synonyms are displayed in a Separate dialog Box.
But the Program is Exiting without any Prompt whenever I Decalre a CString or perform a file opening Operation in
that Dialog Class.
The Same Program Runs All right in the Debug version but the above probelms are being found out in the Release Version
Can Anyone Suggest me the Solution...
Samir Sood
|
|
|
|
|
|
O.K. now here is something that I hope someone can explain to me.
I have been attempting to a simple DOS command line diroectory listing using MSVC.
But for the life of searching I find nodda about really how to write this.
This is what I have been attempting to do.
A simple VC code that will list the files just like the DOS dir command.
with this it should show the file date modified, and date created.
The ultimate goal I have to to be able to have the following:
command line directory listing application that would delete files past ## of days.
like
dir c:\files\*.doc -del:20
this would delete files in that directory that are past 20 days from the current date.
If anyone has something that would work in MSVC just to get me to at least show the files, and dates credted/modified, hopfully I can understand the rest, but without dir.h I cannot seem to go any farther.
|
|
|
|