|
Thank you for answering. It was more annoying stuff, but i didnt noticed it:
class A {...}
class B : public A, public X {...}
class C {...}
my code:
X *x = new C;
delete x; // kabooom
Well problem solved, thank you again for answering.
|
|
|
|
|
Hello everybody,
i want to avoid the menu which pops up with a right click on the taskbar button of an application but I find no way to trap this event. Does anybody have a solution for this problem?
MS
|
|
|
|
|
|
Hello cpallini,
thanks a lot, that seems to work. The disabled close button does not affect my purpose.
MS
|
|
|
|
|
|
even you got the answer, i just wondere : why on earth do you want to remove this standard windows behaviour ?
|
|
|
|
|
|
Hi All,
I am debugging an application(MyApp) which uses an OCX control.
I need to debug the OCX control too.
I am able to compile the OCX in debug mode and have copied the MyOcx.ocx and MyOcx.pdb files to MyApp Debug folder.
When I try to debug the MyApp I am not able to debug the OCX code. I checked with the modules window and found that the symbols for the ocx could not be loaded and it shows "" C:\WINDOWS\System.Drawing.pdb: Cannot find or open the PDB file." error
I checked with the C: files but the .pdb do not exist.
Is it a problem with my m/c that it does not have the System.Drawing.pdb file or I am wrong somewhere else?
Please help me.
Just a note to add: MyApp is built in VS2005 and MyOcx is built in VS2003.
Any help would be highly appreciated.
Thanks and Regards,
Arti Gujare
-- modified at 7:04 Tuesday 28th November, 2006
|
|
|
|
|
Hi Arti,
do you perhaps use the .NET Framework in your OCX? Because "System.Drawing" sounds like the corresponding namespace of the .NET Framework.
Perhaps your callstack looks nicer if you use the Microsoft Symbol Server to get the corresponding debug symbols. Then for example "System.Drawing.pdb" will be automatically downloaded from M$.
Checkout the following articles on how to configure Visual Studio to connect to the M$ Symbol Server:
http://www.codeproject.com/useritems/symbols.asp[^]
http://www.codeproject.com/debug/postmortemdebug_standalone1.asp[^]
cheers,
mykel
If they give you lined paper, write the other way!
|
|
|
|
|
hello !
my datasource name : "Database_MyWorld";
whow to retrieve if my DataSource exist or not in to :
if(.......)
{
AfxMessageBox("YES");
}
else
{
AfxMessageBox("NO");
}
Bravoone
|
|
|
|
|
to test if the connection to your database is correct or not, you can try this SQL statement :
SELECT 1 FROM DUAL;
|
|
|
|
|
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
|
|
|
|