|
|
Jijo raj wrote: Regarding installed software, this article might be helpful - How to get a list of installed applications.[^]
But only for those programs that were installed in a "standard" way. Windows has no way of knowing about all programs that have been installed.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
Can anyone pleae explain the difference between char* and char** in c++, with examples.
Regards,
KDevloper
|
|
|
|
|
kDevloper wrote: char*
one dimensional array of char. The pointer would contain the base address.
kDevloper wrote: char**
two dimensional array of chars or better said, one dimensional array of strings in some scenarios
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
kDevloper wrote: Can anyone pleae explain the difference between char* and char** in C++
in C++ ? the same as in C.
char* is a pointer that points to a char.
char** is a pointer that points to a char*.
when char pointers are used like strings (C style strings then), char* is a string, and char** is an array of strings...
but the later assertion depends of the context...
|
|
|
|
|
Hai !
In my application i created a (.chm)file i.e a help file using html help workshop, there is a button "Help", on clicking it i am able to open the help file , i also want that if the user press F1 from keyboard then also i have to open the same help file so how to detect when F1 is pressed ??
Thanks !
|
|
|
|
|
See here[^]
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
For catching F1, you've to handle WM_HELPINFO message. Check here[^] for code snippet.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
hi,
a simple method is that:
override PreTr... function, in this function, include code as follo
if( pMsg->message == WM_KEYUP )
{
switch ( pMsg->wParam )
{
case VK_F1 :
do your work...
break;
}
}
|
|
|
|
|
Hello all,(Sory about my English) Please help....
VC++ 2005.
I have a func that call to Socket,Bind, Listen & Receive.
I call this func from timer that see if the Client send data.
I get the data in the first call but in the second call I got errors.
I understand that I need to operate the Socket,Bind, Listen only once.
I got err when put this line in a global scope or as a member data in class declaration:
Socket^ listenerSocket = nullptr;
So, I tried to store it with the help of global pointer.
It is good till I call the funcs of the Socket type, after all it just pointer that set to some place in the memory.
Socket^ *GlistenerSocket = nullptr;
Socket^ *GserverSocket = nullptr;
int CMotoScopeDlg::DoSocketGet( String^ server )
{
Socket^ listenerSocket = nullptr;
listenerSocket = gcnew Socket( AddressFamily::InterNetwork,SocketType::Stream,ProtocolType::Tcp );
if (false == SocketBindFlag )
{
listenerSocket = gcnew Socket( AddressFamily::InterNetwork,SocketType::Stream,ProtocolType::Tcp );
GlistenerSocket = &listenerSocket ;
(*GlistenerSocket)->Bind(hostEndPoint ); //Only once
(*GlistenerSocket)->Listen( 4 );
SocketBindFlag = true;
}else{
listenerSocket = *GlistenerSocket; //check this. allocate place??
}
Socket^ serverSocket = (*GlistenerSocket)->Accept(); //ERROR at second time
If I could put this Socket variable in the global place it will help.
Thanks in advance,
Eyal
|
|
|
|
|
As you have Socket^ , and are asking syntax questions, you are in the wrong forum.
You'll get more help in the Managed C++/CLI forum.
You'll get even more help if you read the rest of the posting guidelines and use pre tags.
Good luck,
Iain.
|
|
|
|
|
Hi,
I am using WM_COPYDATA message to send a string from one application to other but how can I do that, my code is here:
TCHAR *szPath=new TCHAR[g_szSelectedFilePath.GetLength()+1]();
memcpy(szPath,g_szSelectedFilePath,g_szSelectedFilePath.GetLength()*2);
delete[]szPath;
COPYDATASTRUCT cs;
cs.dwData=32;
cs.cbData=g_szSelectedFilePath.GetLength()*2;
cs.lpData=szPath;
::SendMessage(hWindow,WM_COPYDATA,NULL,(LPARAM)(LPVOID)(&cs));
what is the use of "cs.dwData=32" I could not find?
When I recive this message in other application only first 2 char are visible of the string and others are garbage chars.
|
|
|
|
|
|
You should really read this[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
As i see this, after you copied some string into your szPath you allocated you delete it and then pass the pointer which now points at the deleted memory area to the copydata.
The dwData member -as far as i know- is just a value you can pass over to the receiver, it can be anything that fits your needs.
|
|
|
|
|
Hai !
I have created a help file for my application using HTML help workshop, i
have a button named "Help" in my application, now when i press this button or press F1 key from keyboard, i want to open the help file that i have created !!
can you plz help me with the code required ??
Thankyou !
|
|
|
|
|
why not use ShellExecute?
|
|
|
|
|
|
|
it was a good link but how to
Step 8:
Import htmlhelp.lib to your application
Right click on the Resource Files then Add Files to Folder.
Select htmlhelp.lib.
on right click of Resource file i donot get "Add Files to Folder"
can you plz explain how to add htmlhelp.lib
thanks
|
|
|
|
|
You can improta lib files :Configuration Properties->Linker->Input and on the Additional Dependencies filed you must enter lib file.
|
|
|
|
|
Thanks I could get it !!
But what happens if i run my application in a different system, its registry will not be containing data which i have entered !!
|
|
|
|
|
Its easy make it . CRegKey
|
|
|
|
|
can i assign list box with 2 control variables?
1st is control variable is of COwnerDrawListBox type (custom list box) and 2nd i want to assign control variable of type CListBox?
i tried in this way but is it giving run time error?
plz help me.
thanks in advance
|
|
|
|
|
why do you want to do such a thing?
The two controls are of different type after all.
I guess, you want to have a functionality of CListBox and COwnerDrawListBox. Is it right? If affirmative you can simply override some functions in the derived class.
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|