|
Shashi.Shinde wrote: Linux platform.
I'm guessing you're not using C++/CLI then. Try the Visual C++ forum.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Look for Numerical Recipies !
There you can find many algorithm, and the C function implementation.
Russell
|
|
|
|
|
Hi ,
Can anybody tell me how to Copy a WinForm from One project to another in VC++ 2005?
I tried including all files(.h, .resx, .cpp) but it gets included like source files. I dont get a designer view option for Form.h.
Any help/url is highly appreciated.
Thanks a lot!
art
|
|
|
|
|
tell me the steps which should be followed to create a simple dialog box in Win32 programming using API..i m trying to make a single and simple dialog window..please help me out...
-- modified at 8:57 Wednesday 1st August, 2007
|
|
|
|
|
Yesterday, you said C++ .NET, and I suggested that you needed to work out if you meant .NET, or if you wanted to use MFC or Win32. I also said C# is a better language than C++/CLI for Winforms ( forms with .NET ). So, now you're in the C++/CLI forum, and you're saying Win32. I'm sorry, but this question is in the wrong forum, yesterday you said .NET in the Visual C++ forum, and today you say 'Win32' in the C++/CLI forum. I recommend doing some reading to make sure you get your terminology right.
Programming Windows by Charles Petzold is THE book on Win32 programming, although I cannot imagine why anyone would want to use Win32 today. MFC is a far better option.
If you're using the C++ Express Edition, MFC is not an option, which may be why you're asking about Win32. Really, it's a bad idea. Learn C# instead, Win32 is too much like hard work, and Winforms is better supported in C#. You already found out how few people read this forum, compared to the other ones.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I would create a table who every cas was : array < String ^, 2 > ^ tab=gcnew array < String ^, 2 > (20, 200);
i try for array < String ^, 3 > ^ tab=gcnew array < String ^, 3 > (20, 200);, i can't make : tab[1][2]= subItems when array<string^>^ subItems=gcnew array<string^>(16);
Thank you verry mutch
|
|
|
|
|
I don't understand what you're trying to do, but I see right away that you're trying to create a 3 dimension array
with only two arguments in the constructor.
What happened to our previous thread? I thought you needed an array of arrays...
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
they are always an exception, how i can add in table of arrays, i do : tab[i][j]=Subitem;
Thank you verry mutch
|
|
|
|
|
tab needs to be defined to hold the type that subitem is. You didn't show what subitem is in your first post.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
the definition of subItem was array^ subItems=gcnew array(16);,
|
|
|
|
|
That's not valid. Your arrays need to have a type.
What do you want to do?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
abbd wrote: array < String ^, 3 > ^ sub2=gcnew array < String ^, 3 > (20,100,200);
array^ subItems=gcnew array(16);
sub2[0,0] = subItems
You have a bunch of things wrong here. Do you have an understanding of C++ arrays?
They are strongly typed, like the whole language is.
To define an array you have to specify a type - this won't work:
array^ subItems=gcnew array(16);
Now to add this array type to your multi-dimension array, that multidimensioned array must be defined to hold an array type -
the type of subItems, which you haven't defined.
If you have an array with three dimensions then you must access members of the array using three arguments.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
you've created a rectangular multidimensional array rather than a jagged one. As such, you need to access elements like this tab[i,j] rather than tab[i][j] (which you would do for a jagged array in C++/CLI)
|
|
|
|
|
i try for :
array < String ^, 3 > ^ sub2=gcnew array < String ^, 3 > (20,100,200);
array<string^>^ subItems=gcnew array<string^>(16);
subItems[0]="1";
subItems[1]="2";
.
.
subItems[15]="14";
sub2[0,0] = subItems
but they are an error : Error 80 error C3262: invalid array indexing: 1 dimension(s) specified for 3-dimensional 'cli::array<type,dimension> ^'
Thank's
|
|
|
|
|
Are you trying to do something like this:
array<array<String^>^, 3>^ sub2 =
gcnew array<array<String^>^,3>(10, 10, 10);
array<String^>^ subitems = gcnew array<String^>(15);
subitems[0] = "one";
subitems[1] = "two";
sub2[0, 0, 0] = subitems;
Console::WriteLine(sub2[0, 0, 0][0]);
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hello everybody,
I apologise if i am in the wrong forum.I am posting a question C
I want to read a file using c Coding and i want to store the data in an array like unsigned char data[] and i want then to calculate the data_length
can anyone please help me
thanks\
Nal
|
|
|
|
|
NalBH wrote: I apologise if i am in the wrong forum.
Accepted. You should post here: Visual C++/MFC[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello,
Maybe you can try this one:
FILE *fp; //file handler
//open the file
fp = fopen(filename, "r"); //check for mode "rb" if binary
//read the file and save to buffer
i = 0;
while (fget(buffer[i], SIZE-1, fp) != NULL)
i++;
fclose(fp); //close the file
I have'nt compile it but this is the algorithm and steps.
Hope this will help.
dfdf
|
|
|
|
|
Hello
thanks for replying.But where is the array where the data file has been stored.Can i call fget(buffer[i], SIZE-1, fp ) again in my code.How can i call the data in the file.And is SIZE the size of the file.It has not been defined.i have this peace of code but it doesnt seems to work.
Please help
Thanks
Nal
|
|
|
|
|
Hi,
What does mean
- the easy way is have every Control be handled by the GUI thread, which
could mean, use a Forms.Timer, since that executes its Tick handler on the
GUI thread. The drawback is, if the Tick handler takes too long, your GUI
responsiveness will suffer
i have an exception when i use listview whith thread:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll
Additional information: Cross-thread operation not valid: Control 'listView2' accessed from a thread other than the thread it was created on.
Please help me de resolve this great problem,
Thank you,
|
|
|
|
|
abbd wrote: the easy way is have every Control be handled by the GUI thread, which
could mean, use a Forms.Timer, since that executes its Tick handler on the
GUI thread. The drawback is, if the Tick handler takes too long, your GUI
responsiveness will suffer
That's quite correct.
And here is the explanation with the remedy:
http://www.codeproject.com/script/comments/forums.asp?msg=2155450&forumid=3785#xx2155450xx[^]
Did you read up on Control.InvokeRequired and Control.Invoke() by now ?
|
|
|
|
|
Hi,
InvokeRequired Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.
Form1 ^ob = (Form1^) obj;<br />
if(ob->progressBar1->InvokeRequired)<br />
{MessageBox::Show(I am in invoke ); <br />
ProgressBarCallback ^d = gcnew ProgressBarCallback(ThreadTask);<br />
ob->Invoke(d,gcnew array<System::Object^>{ob}); <br />
}<br />
else<br />
{<br />
MessageBox::Show(I am not in invoke );<br />
<br />
ob->listView2->Items->Add("GooD");<br />
<br />
<br />
}
He swow me always I am in invoke, thus he was in 1st thread, How i can add in listView??
Thank's
|
|
|
|
|
Hi,
I can't give you a C++ example. You need to construct a method that checks
InvokeRequired; in the "then" part use Invoke to call that same method (itself)
again (so it runs again, but this time on the GUI thread), and in the "else"
part do what needs to be done.
There are plenty examples around, mine would all be in C#.
|
|
|
|
|
I am trying to port this tutorial to a wxwidget application, with mingw32. This class generates the default context menu on windows files from explorer.
I have converted some parts successfully, but it seems mingw's api doesn't know anything about IID_IContextMenu3 and IContextMenu3 ( undeclared references bacause shobjidl.h doesn't exist on mingw32 api ).
Could someone help me to fix this ? ( or give me another way to display such context menu )
thx
carlos
|
|
|
|
|
To whom it may concern,
I want to develop a new GINA DLL and replace it with the Standard Microsoft GINA DLL. I want to use pki-based smart card for logon. I am familiar with GINA to some extent, but I want to know more. If there is any article available, please let me know. I'd appreciate it.
Regards,
Qeraati
|
|
|
|