|
Let me see ... ...
|
|
|
|
|
CString *example1;<br />
CString *example2;<br />
<br />
example1 = new CString;
delete example1;<br />
<br />
example2 = new CString[10];
delete [] example2;
Simply said: delete is for deleting single objects, delete[] is for deleting arrays of objects.
Everything you allocated with new[] you should must free with delete[] .
--
karl
|
|
|
|
|
How to Enable /Disable the Toolbar?If the user closed directly the toolbar I want check the menuitem?
|
|
|
|
|
To disable/enable a toolbar i think CToolBar::EnableWindow(true/false) may do it
for the second question, use ON_UPDATE_COMMAND_UI macro on the menu item to update its state, and in the handler function just check the item according to the toolbar visiblitly:
the code could be like:
<br />
void CMainFrame::OnUpdateMyMenuItem(CCmdUI *pCmdUI)<br />
{<br />
if(::IsWindow(m_Toobar.GetSafeHwnd()))<br />
{ <br />
pCmdUI->SetCheck(m_Toolbar.IsVisible());<br />
}<br />
}
|
|
|
|
|
Thank U for reply.
I have one more doubt.Toolbar is implemented byusing CToolbarCtrl.I got successfully in the DEBUG.But I was change the settings from DEBUG to Release Toolbar window is not display properly.Please help me.
|
|
|
|
|
Well! I re-checked the code in a sample program under DEBUG and RELEASE and found nothing abnormal.
It is not clear what you mean by not display properly. What kind of error you exactly encounter.
|
|
|
|
|
HI I KNOW HOW TO CAPTURE VIDEO FROM WEBCAM
BUT HOW TO TRANSPHER IT THROUGH WINSOCK..
I WANT TO DO VIDEO CONFERENCING THROUGH VC++
PLEASE TELL ME HOW TO DO IT
|
|
|
|
|
I think you NEED to get in touch with the TV-Mogul. Try this link.
http://www.software-rus.com/[^]
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"AAAAAAAAAHHHHHH!!!!! Those leaks are driving me crazy! How does one finds a memory leak in a garbage collected environment ??! Daniel Turini Nov. 2, 2002.
|
|
|
|
|
Chris Meech wrote:
I think you NEED to get in touch with the TV-Mogul.
Ooooh, that's harsh!
(even that it had it coming from screaming its question the way it did)
Why not point it to something that actually could be used instead, like VLC?
That way we would have both helped something, and would get rid of it.
|
|
|
|
|
Did you go:
http://www.banasoft.net/AVPhone.htm
|
|
|
|
|
How can I add Header information. Like Version info and other important information?
Thanks
SPGV
|
|
|
|
|
Hi guys
I have an app (single document) that prints perfectly, but the print preview is wrong. When I press the zoom button, the page changes to the next one to print.I'm doing something wrong?
There is a way to avoid that the page changes when I press the zoom in the preview?
Best Regards
Dr. Pi
|
|
|
|
|
This is probably a problem in your OnPrint() code. When you render your output you need to check the value of pInfo->m_nCurPage to make sure you render the correct output. The big difference between preview/print is that in preview your OnPrint() can get called with a random order of pages, you cannot assume it will go page 1,2,3,....,n where it normally does when actually printing.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
Hi,
I'm using lots of containers objects such as Vectors and am being constantly frustrated at how awkward it is to look at the contents when debugging. A large Vector (of which I use many) may take half an hour to cycle through within the watch window, doing Vector._first, Vector._first+1, Vector._first+2 etc... seems to be the only way to look at the entire Vector. Please tell me there is some other way??
Thanks in advance,
Julian Churchill
|
|
|
|
|
Add a global function to return entry n, and use the result of that function in the watch window. Something like:
vector<int> vec;
/* I used 'int' arg. type to keep down example size */
int foo(const vector<int>& v, int entry)
{
return v[entry];
}
Then in the watch window, to see entry 47 of vector vec,
foo(vec, 47);
++luck;
|
|
|
|
|
When you are debugging vectors (or any pointer to an array of items), you can follow the expression with a comma and a count. This will display count elements.
So, Vector._first,10 will display 10 elements starting at Vector._first.
Best regards,
John
|
|
|
|
|
thanks for all the help, that's a debugging golden nugget as far as I'm concerned... can't find it anywhere in the help
|
|
|
|
|
hello,
and i'd like to monitor a server, to see when the server is down. of course, i could ping periodically, but is there a better way, maybe to get a notification from windows?
thanks
|
|
|
|
|
to get a UDP notification every time a Microsoft server died...
On second thought... I pay for my own bandwidth. Stop that request!
To answer your question: No, there is no way to get this kind of notification.
If you need to know when a server dies, you add a dedicated network connection (with dedicated NIC's) and send "I'm alive" messages. When they stop, the server has died.
|
|
|
|
|
hello,
how to resolve the ip to a hostname like with ping -a with win32 api?
thanks
enrico
|
|
|
|
|
You can look at the source of ping , its at MSDN.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
gethostbyaddr
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
yes, thanks, this is working. but it takes incredibly long, about 4 seconds to resolve the
name of the pc standing next to me, both win2000. is there a faster way to do this?
thanks
|
|
|
|
|
I don't think so, the delay, I assume is caused by querying, a "DNS server", you could try looking at thw Winsock FAQ
http://tangentsoft.net/wskfaq/[^]
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Having a struct P { int x, y, z}
and debugging an application with a variable
P* ptrtP;
is it possible to get it pretty printed in the
Values tab of Locals.
Alternatively, if I want to call a pretty print
function in the Command Window - Immediate,
can I return a char*, or a std::string.
Thanks in advance,
andreas
|
|
|
|