|
but how can i retrieve if is correct or not ?
can you give me more please ...because i need an answer into AfxMessageBox("...");
Bravoone
|
|
|
|
|
how do you connect ? ADO ? ADO.NET ? ODBC ?...
|
|
|
|
|
ODBC!!!!
Bravoone
|
|
|
|
|
With odbc but i do not have any ideea on how to make this !
i need the answer into MessageBox !true / false
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: whow to retrieve if my DataSource exist or not in to :
Your call to CRecordset::Open() or CDatabase::Open() will fail if the DSN does not exist.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
There is an application which downloads and installs a few applications on user machine after checking his machine for already installed things.
We need to parallelize this code in order to optimize its performance.
We are thinking of running one thread for downloads - one after another, and another thread for running the installs - as soon as a download is complete this thread will take over the installation.
However are there more tricks to parallelize more things - say parallelize 2 downloads?
Any other tricks to minimize CPU usage / optimize on memory usgae and reduce total time required?
Thanks in advance
SSC
|
|
|
|
|
If you parallelize 2 downloads you will divide the download bandwitdh by 2 ??? no ?
in consequence the download of the both files will take the same time than if you download one by one.
However I think that installing during downloading is a good idea.
|
|
|
|
|
samchepe wrote: We need to parallelize this code in order to optimize its performance.
There's nothing wrong with splitting work between threads, but unless you have a multi-processor machine, creating additional threads does not necessarily result in a performance gain. Most of the time it has the opposite effect (due to all of the context switches).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In this case it will lead to an optimization as each thread will spend most of its time waiting on IO.
|
|
|
|
|
hi guys,
I designed the MCI player for playing file formats like mpeg 1, mpeg 2(m2p extension),vob.....In that I am able to play all the file formats BUT i am unable to get the total time duration for the mpeg 2 files(m2p extension) alone using LONG MCIWndGetLength(HWND) function(for other formats the time duration is complete and i dont have problem ). The length obtained from this function doesnt match with the total duration of the mpeg 2 file alone(extension m2p). Some part of the m2p file at the end are missing(around 5 seconds in a 12 seconds m2p file).
Can anyone help me to solve this problem???
Thank you.
With regards
Raja Bose
|
|
|
|
|
Hi all,
i have a combo box whose type is dropdown and i want that it should be only
selectable i mean user should not be able to edit in that combo box.
i tried with changing it's type to drop list by that way it becomes only selectable but i can not set the default values in that combo box
if i am doing
m_wndCombo.SetWindowText("Default");
in InitDialog then it does not show that "Default" string in combo box.
how can i get both the feautures? means noneditable and should be able
to set the default values at start of dialog!!
Is it possible with combo box??
Thanks and regards
Harshal
|
|
|
|
|
harsha_1234 wrote: m_wndCombo.SetWindowText("Default");
Drop is not only for the user. Its for you too. If it is drop list, then you could only select what is available. Therefore you need to add a string before you could display it.
Try this:
<br />
m_wndCombo.AddString("Default Value");<br />
harsha_1234 wrote: m_wndCombo.SetWindowText("Default");
Use the CComboBox::SetCurSel() function to set the selection.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
harsha_1234 wrote: i tried with changing it's type to drop list by that way it becomes only selectable but i can not set the default values in that combo box
Use SetCurSel to set currently selected item. You cannot use SetWindowText for this purpose. You can set the initial index of the combo box in OnInitDialog .
|
|
|
|
|
Nibu babu thomas wrote: Maybe in OnInitDialog.
Not even there. SetWindowText refers to the window as a whole. I haven't tried this but in my opinion, it will not set the display value of the combobox.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: Not even there. SetWindowText refers to the window as a whole.
When did I say that? You should read carefully before commenting.
|
|
|
|
|
I did not tell you said anything. I said, setwindowtext refers to the window as a whole. It is more abstract and won't set the text value of the current selected item. Your opinion was that it may work in initdialog. I said an am saying it won't even work there!
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: Your opinion was that it may work in initdialog.
Wrong! What I meant was that he should use SetCurSel in OnInitDialog .
|
|
|
|
|
Nibu babu thomas wrote: Wrong! What I meant was that he should use SetCurSel in OnInitDialog.
Okay.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Hi,
Use
int SetCurSel(
int nSelect
);
or if you already have to selecting by text from list
SelectString(
int nStartAfter,
LPCTSTR lpszString
);
-----------
Mila
|
|
|
|
|
oh thanks
but how can i do this way like if i have a dropdown combo and i want to make the edit control non editable is it possible??
actually i have used CComboBox with dropdown property every where
and till now i was checking the selected text on OnOk but if
now if i want that combo to be dropdown and with non editable edit control !!
is it possible??
Thanks and regards
Harshal
|
|
|
|
|
harsha_1234 wrote: if i have a dropdown combo and i want to make the edit control non editable is it possible??
Why on earth would you need it? Use the drop list style straight away. Handle the CBN_SELCHANGE and that will help you realise selection change in the combo box.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Hi,
I don't know why you insist on dropdown style - I think in your case drop list is more proper.
You can try to override CBN_EDITUPDATE message:
"The CBN_EDITUPDATE notification message is sent when the edit control portion of a combo box is about to display altered text. This notification message is sent after the control has formatted the text, but before it displays the text."
-----------
Mila
|
|
|
|
|
harsha_1234 wrote: i have a combo box whose type is dropdown and i want that it should be only
selectable i mean user should not be able to edit in that combo box.
You can't. By using the CBS_DROPDOWN or CBS_SIMPLE style, there will be an edit control as part of the combobox. If you do not want this, you must use the CBS_DROPDOWNLIST style instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I am new to C++ and MFC.I am creating a zoom application(dialog based application) using VC++ in VS2005. While invoking this application, it will zoom whatever screen appears in the screen. I have a problem now. I am opening a modal dialog created in another application, When I tried to invoke the zoom application(which is also a dialog), it closes the previously opened dialog(opened by the another application).
Please clarify how to resolve this issue. I understand that the dialog
opened by the other application receives some message and got closed,
while invoking the zoom application. Please help me to retain that
dialog also while opening the zoom application.
Thanks in advance.
Sri
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|