|
[CListCtrl::DeleteItem] Deletes an item from a list view control.
CListCtrl* pmyListCtrl;
int nCount = pmyListCtrl->GetItemCount();
for (int i=0;i < nCount;i++)
{
pmyListCtrl->DeleteItem(0);
}
|
|
|
|
|
Looking at (ATL) code of mine for handling tabs, and which uses <code>GetDlgItem</code> rather than <code>SetFocus</code>, the only difference I can see is that I have a call:<pre>// Now select all like normal tab behaviour
SendMessage(hNew, EM_SETSEL, 0, -1);</pre>at the end. Presumably as my tabs have edit controls on and the cursor needs setting up. So unless there's a parallel with your views e.g. ensure, say, a node or list item has focus or is other wise set up, I'd agree with Chris and wonder about the code doing the deleting.
|
|
|
|
|
Hi all,
I'm new with Win C++ API, I'm trying to create an application that lives as a trayicon, and my purpose is to capture the mouse over event when hovering over the icon..this should launch a new window. I've had some try by using the WM_MOUSEHOVER message on the window handler relative to the NOTIFYICONDATA object, but it seems to have no effect. Am I using the message in a wrong way? Is there some specific API or implemaentation to manage this?
Thank you all in advance!!
|
|
|
|
|
[ Here ] are a couple of good implementations.
|
|
|
|
|
Hi,
This link will help you.
http://www.codeproject.com/KB/shell/ctrayiconposition.aspx
-- modified 25-Nov-11 4:09am.
|
|
|
|
|
Please make your links clickable, like this[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi developers,
I requires to handle OnClose handle of a form view. I am building a heavy tree on it( based on thread ), and while doing that if i closed that form, application was getting crash, because that tree control has been destroyed.
So that I have to capture it's close event so that I can prevent this event to proceed, i.e. to close that form.
Thanks In Advance.
Amrit Agrawal
Software Developer
|
|
|
|
|
When you close that form, the syst will call its destructor so if you wanna handle the prob go to the
YourFormClass()::~YourFormClass( )
{
}
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
|
I totaly agree with u in case the user is running an SDI application but what if it is a MDI application ?
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Yes, [MSDN] says: "To destroy an MDI Child window; use the virtual member function CWnd::DestroyWindow . Do not call the global ::DestroyWindow API to destroy an MDI Child window."
It goes on to say: "In the case of C++ Windows objects that do perform auto-cleanup, you must call DestroyWindow. If you use operator delete directly, the MFC diagnostic memory allocator will alert you that you are freeing memory twice (the first call to delete as well as the indirect call to "delete this" in the auto-cleanup implementation of PostNcDestroy)."
|
|
|
|
|
You scored Hight .
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Hi all,
I am trying to run one console based application,
Where i reading a argument from command line.
If i press ENTER ,i am writing the sane to the command line.
How can i print the same without pressing ENTER.
Can i execute the second printf without pressing ENTER
This is the code i am using
int main(int argc, char* argv[])
{
int aNumber;
char aChar;
printf("\nEnter a number:");
scanf("%d", &aNumber);
printf("\nThe number entered is %d\n", aNumber);
return 0;
}
Thanks
Sharan
|
|
|
|
|
On Windows, you can utilise the _getch function, which is exposed by conio.h . On *nix, you can use tcsetattr to turn off canonical mode, which is exposed by termios.h , which'll offer immediate feedback when reading.
|
|
|
|
|
Hi , Use this modified code.
Modified code,
#include <conio.h>
int main(int argc, char* argv[])
{
int aNumber;
char aChar;
printf("\nEnter a number:");
scanf("%d", &aNumber);
printf("\nThe number entered is %d\n", aNumber);
getch();
return 0;
}
|
|
|
|
|
Hi,
try to run this program from the windows command prompt..
|
|
|
|
|
We have an application developed using MFC in Visual Studio 6.0. which is a client-server based architecture using TCP/IP Sockets.
The server application reads data from text files and binary (which acts as database). Based on the Network configuration, the client application that runs in various stations (PCs connected within the LAN Network) connects to the Server application. Exchange of data then takes place between the server and various number of clients that are connected to the server. All the communication happens using the TCP/IP socket protocol.
Now there is a requirement to convert the existing architecture to web based architechture such that the Server is installed in a remote PC. The clients from various geographical locations have to be connected to the Server.
Please provide me guidelines how to convert the existing architecture to web based architecture.
|
|
|
|
|
You need to convert your server into a web server using one of the web architectures available. If you are familiar with Microsoft products then ASP.NET[^] would be a good choice.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi,
First you need to convert your Server portion to a web architecture.You can use ASP.Net and SQL Server. Then develop the client in Visual c++ or something else, the client must communicate to the database.
|
|
|
|
|
"How to change my app from using Internet Protocol, to an Internet based one"
Er, anyone else see a problem here?
manoharbalu wrote: Now there is a requirement to convert the existing architecture to web based
architechture
So you can market it as 'Cloud' no doubt?
Just leave it as it is, it is already an internet based app and slap 'Cloud' on the box to fool the muppets and marketing types who use words without understanding what they mean.
==============================
Nothing to say.
|
|
|
|
|
The internet is based on TCP so at the basic level there is no difference.
The two factors that are relevant.
1. You must have a public IP. On a lan you probably have a private one. The public IP allows someone on the internet to address you. You might, but it is not required, also want to have a Domain Name. There will probably also need to be seem network infrastructure setup to route from the public facing hardware to the actual server. None of this has anything to do with the existing server/client code unless the client code does not allow a way to specify an IP/Domain Name (because someone hardcoded the IP.)
2. You MUST provide security. User/pwd should be sufficient as long as the pwd strength is sufficient. You might already have that in the code but if not it must be added.
Besides the above you might want to investigate SSL depending on the nature of the data that gets sent.
|
|
|
|
|
i have a string
login#user#1 username password
i want to trim login# and extract user#1 username password
i am unable to sole it using strtok
please help
|
|
|
|
|
Use
std::string::find_first_of() To find the position of
#. Then use
std::string::substring() to extract the string you required.
Code might look like this:
std::string test = login#user#1 username password;
size_t pos = test.find_first_of("#");
std::string requiredstr = test.substr(pos+1);
|
|
|
|
|
is there any way to do it using strchr
|
|
|
|
|