|
|
this->BeginInvoke causes the call to be executed on the main thread, so you're still blocking the main thread while StartRecognition runs (and the worker thread just waits at this->EndInvoke).
You have to run the code that takes a long time on the separate thread and Invoke only for the parts that update the UI.
|
|
|
|
|
With VS2005, I'm having a problem figuring out how to get new directories (from dirctx SDK Feb 2007) to be added to the standard ones.
I have tried Tool / Options, Project Options "Additional Included Directories" (/I), and cannot get it to work.
Clearly I'm missing the boat on this one... help.
|
|
|
|
|
You're trying to use managed DirectX, or are you in the wrong forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
OMG, sorry was totally in the wrong forum.
I got it solved anyways, thanks.
|
|
|
|
|
How do I disable the com1 port from being used by the debugger? I am writing a Mobile 5.0 application which uses com1 and it is in conflict with the debugger. Thanks.
|
|
|
|
|
Do you want to use C++/CLI, or just vanilla C++ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hello,
Under certain conditions, I would like my C++/CLI Windows Forms application (i.e. its main form) to show up maximized in the foreground, even if it is minimized or under other windows. Unfortunately, BringToFront and Focus functions don't help.
I have even imported and called the SetForegroundWindow API, with no effect:
[System::Runtime::InteropServices::DllImport("user32.dll")]<br />
extern bool SetForegroundWindow(IntPtr ^hWnd);
I call the code in Click event of the System::Windows::Forms::NotifyIcon component, and it gets called, but it has no effect.
|
|
|
|
|
I think you will need to import and call ::SetWindowPos()
System.IO.Path.IsPathRooted() does not behave as I would expect
|
|
|
|
|
There's a WindowState property, from memory. There is certainly a property that takes an enum for maximised. And, TopMost is a property you can set to true.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Thank you!
TopMost actually brings the window up. I am turning this property off afterwards, because I don't want this window to be permanently topmost, but it stays on the top of the z-order, which is what I needed.
|
|
|
|
|
Hi All,
I am writing code snippet that insert records into a table which has a primary key on 2 columns..say for example Column X and Column Y..
I want to prevent duplication of records from being inserted into the table using C++..is there any way i can acheive this..i dont want to use Maps for storing the already inserted combination and thereby comparing before insertion..is there any other way to acheive this..
Thanks In Advance
|
|
|
|
|
Subramaniam s.V. wrote: is there any other way to acheive this..
You mean like using the database? Yes there is.
led mike
|
|
|
|
|
Can you tell me how we go about doing it?
|
|
|
|
|
The obvious brute force way is to query the database for the key, however most modern databases allow you to put a unique constraint on the key which will cause the insert to fail. If you are interested in using a database solution ( I recommend it), try asking a question in the SQL forum here on CodeProject.
led mike
|
|
|
|
|
yeah thats right Led.
Ultimate solution would be to handle it in the database level. I completely agree with you on this point. Infact, my database by default handles this duplication. The problem is, my requirement is that, i need to insert records into a table by traversing up a Tree hierarchy and in my requirement there is a bright chance that duplicate records can be inserted into the database. when i try to insert a duplicate record it throws an error and comes out. All that I want is, if there is duplcaition, I want to skip that insertion from happening and proceed with further insertion of other records
hope you got the problem now..if not let me know i ll explain you the scenario in detail
|
|
|
|
|
In the sense, is there any other way to handle this using C++ itself?
without using any other datastructure to store the information about already inserted records, is there a way to handle duplication?
|
|
|
|
|
Hi all,
I am starting with a contact manager application. And for this i need to have a double link list to get the data from the csv file.
So that i can add new contact, delete contacts, update contact and save contact.
Is linklist and node class already there in C++.NET
or do i have to create one.
And one more thing i would like to ask is do i have to sort the list before i can read it (using doubly linked list). I mean do i have to write a sort function. Which sort method would be best for this application ?
Thanks a lot
|
|
|
|
|
Why use such an antiquated structure ? simply use STL lists ( or vector ) or some .net collection classes.
Software_Specialist wrote: I mean do i have to write a sort function.
yes, or minimally, depending on your data structure, a compare function ( can be used to sort ) when inserting.
Software_Specialist wrote: Which sort method would be best for this application ?
The quicksort, or use the one that is used when sorting with the data structure you are using.
|
|
|
|
|
Maximilien wrote: Why use such an antiquated structure ? simply use STL lists ( or vector ) or some .net collection classes.
What do you mean by this. Well i am bit new in C++.Net(windows programming).
So by STL lists or .net collection classes we can perform the doubly linked list functionality or what ?
Is there any good link to learn all this..
Thanks for your reply
|
|
|
|
|
IMO, there are no valid reasons in 2007 to use a double linked list.
STL and .net collection classes hide the internal technicality, you only need to concentrate on the functionality of your task at hand; you don't need to know how the std::list or the System.Collections.SortedList are implemented.
|
|
|
|
|
Maximilien wrote: IMO, there are no valid reasons in 2007 to use a double linked list.
There is a reason to use a double linked list in 2007.
There is no need to reinvent the wheel by coding the double linked list by hand
-------------------------
Don't worry, be happy )
|
|
|
|
|
Software_Specialist wrote: I am starting with a contact manager application. And for this i need to have a double link list to get the data from the csv file.
Sounds like an appropriate application for a database.
led mike
|
|
|
|
|
In the System::Collections::Generic namespace, there is a doubly linked list called LinkList . However, as far as I know, you have to write your own sort.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
You might want to consider looking at the C5 Generic Collection Library:
http://www.itu.dk/research/c5/[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|