|
Thanks for replying.
If I don't get a solution then I'll have to rewrite a very big logic. Actually I'm migrating an application from VC6 to VC8.
|
|
|
|
|
Hopefully, you don't need to write much logic. CPtrList is just a pointer list (MFC class). It can be easily replaced by a simple list (.NET class), which stores a pointer to a node.
Best,
Jun
|
|
|
|
|
Thanks for helping me so much.
Can u tell me just one more thing - What is the alternate to CMapStringToOb MFC class in C++/CLI. Plz can u suggest me what should I do to write the code in C++/CLI for the code shown below:
<br />
int nCount = clRecSet.GetFieldCount();<br />
CDaoFieldInfo* pclFieldInfo;
CMapStringToOb clTables;
CPtrList* pclFields = NULL;
<br />
for (int ii = 0; ii < nCount; ii++)<br />
{<br />
pclFieldInfo = new CDaoFieldInfo;<br />
clRecSet.GetFieldInfo(ii, *pclFieldInfo, AFX_DAO_SECONDARY_INFO);<br />
if (clTables.Lookup (pclFieldInfo->m_strSourceTable, <br />
(CObject*&) pclFields) != TRUE )<br />
{<br />
pclFields = new CPtrList;<br />
clTables.SetAt (pclFieldInfo->m_strSourceTable, pclFields);<br />
}<br />
pclFields->AddTail ((void *) pclFieldInfo);<br />
}<br />
...<br />
...<br />
<br />
POSITION pos = clTables.GetStartPosition();<br />
while (pos != NULL)<br />
{<br />
pclFields = NULL;<br />
CPtrList* pclFields;<br />
CDaoFieldInfo* pFieldInfo;
<br />
clTables.GetNextAssoc (pos, strCurrTbl, (CObject*&) pclFields);<br />
POSITION posField = pclFields->GetHeadPosition();<br />
int nIndex = 0;
while (posField != NULL)<br />
{<br />
pFieldInfo = (CDaoFieldInfo *) pclFields->GetNext (posField);<br />
<br />
.....<br />
<br />
In the the above code I can replace :
CMapStringToOb -> ?
CPtrList -> ArrayList
CDaoFieldInfo -> DataColumn (Problem with fetching the database table name not the table name which comes from dataset object)
In DataColumn I can't get the name of the table, the column actually belongs to as we can do in CDaoFieldInfo::m_strSourceTable. Actually I've to map the name of the table with it's corresponding column and put that into a CMapStringToOb object.
|
|
|
|
|
CMapStringToOb doesn't seem to have a counterpart in .NET collection classes. It looks you have some work to do.
Best,
Jun
|
|
|
|
|
in VC++.Net I have drawn a Rectangle on the form.
My task is ,when i keep the cursor on Rectangle and (move the Mouse + Mouse Left Button Down) it should move accordingly.
Suggest me..
Thanks In Advance
Bye....
Nagaraju
-- modified at 7:58 Thursday 13th July, 2006
|
|
|
|
|
You should handle some of the mouse events such as MouseEnter, MouseDown, MouseUp, MouseMove and MouseLeave.
Best,
Jun
|
|
|
|
|
that is not my problem.
I have drawn Rectangle On the Form Using Graphics Class.
My code is
Graphics ^gr=this->CreateGraphics();
gr->DrawRectangle(gcnew Pen(Color::Black),90,50,60,60);
and when I keep the mouse on drawn Rectangle
MouseMove+LeftClickMOuse ,the rectangle should move accordingly
plz suggest me
Nagaraju
|
|
|
|
|
Nagaraju_Focus wrote: when I keep the mouse on drawn Rectangle
MouseMove+LeftClickMOuse ,the rectangle should move accordingly
What do you mean "should"? You have to implement this capability manually. Here is what you should do:
1) Identify the mouse events you want link to the rectangle movement and handle these events.
2) In your event handler(s), based on new (x, y) location of your cursor, redraw the screen and rectangle.
Best,
Jun
|
|
|
|
|
Should means the Rectangle On the Frame which i Drawn.
I do a lot work to move the rectangle with mouse events.
Even though they aren't work.
plz suggest me
Nagaraju
|
|
|
|
|
You can look my project whih is named "about event handler" in previous page.
in my code just change drawline into drawrect then u have a rectangle which move with mouse movement.
I have to say that i found mouse stick code in codeproject.com and written in visualbasic.
-- modified at 9:01 Friday 21st July, 2006
|
|
|
|
|
I have the following error while building a sample Form based application. Is this a bug ??
*****************************************************************
Output Window Compiling managed resources...
Unhandled Exception: System.NullReferenceException: [Resource lookup failed - infinite recursion detected. Resource name: Arg_NullReferenceException]
Sample : error PRJ0002 : error result returned from 'resgen.exe'.
*****************************************************************
Pavan
|
|
|
|
|
|
Is loading .NET framework / SDK a solution ?
|
|
|
|
|
it looks like your resource file is attempting to load itself or something like that as the problem is infinite recursion
check your resources very carefully, make sure you don't have a #include "resource.h" in your "resource.h" file.
Darka [Xanya]
|
|
|
|
|
I'm working on a simple game engine, and I'm trying to find out the best method of releasing a Managed Direct3D Device. I'm using VS.NET 2005 SE and the April 06 DirectX SDK, if that helps anyone.
The reason why I want to manually release the device is incase the person playing my game decides to change resolutions in the game, and I have to recreate the device. Or, is resizing the device a better idea?
|
|
|
|
|
friends
i have written a program in c. i could run the program in TC. but when i am triying to run the program in Vc6.0 IDE. i have got an error. i couldnt run the program... but i can compilt it. while debugging the program can finish..
i will show u the error i am getting while i am triying to run
The instruction at "0x77fcc912" referenced memory at "0x0031659a". The memory could not be "written".
pls help me.....
shamnar
|
|
|
|
|
The application attempted to write to an area of memory for which it either had no permission, or more likely an area of memory that is not writable.
Debugging the application should help you by prviding a call stack.
Darka [Xanya]
|
|
|
|
|
does the managed c++ need to develop a windows forms applications?
|
|
|
|
|
You can develop windows forms applications in managed C++ if you want to but you don't have to, WinForms is just part of .net
Darka [Xanya]
|
|
|
|
|
Ok thanks. I also want to know that, is the garbage collection essential to develop windows forms application ? Because, .net generates '__gc' operator into my code.
|
|
|
|
|
Yes it is, as it is will all .net applications as garbage collection is a fundamental part of the .net framework.
regards,
Darka [Xanya]
|
|
|
|
|
No. There are many types of .NET applications, Windows, Console, Service, Web, etc. But to take advantage of .NET (managed) capability, Windows applications should use Windows Forms.
Best,
Jun
|
|
|
|
|
What is the difference between managed and unmanaged c++? (most important diffenrences please)
|
|
|
|
|
Managed C++ is .NET, unmanaged C++ is C++
Managed C++, includes things like Garbage Collection, WinForms, etc.
Managed C++ can only be used to create .NET applications
C++ does not.
C++ can be used to create any type of application.
Darka [Xanya]
|
|
|
|
|
Managed C++ is a .NET C++ language, which now is offically called C++/CLI (common language infrastructure) on .NET Framework 2.0. It contains lots of extensions to ISO C++ (unmanaged). Microsoft has submitted C++/CLI spec to ECMA.
Best,
Jun
|
|
|
|