|
If this was easy to do every virus/trojan writer would be doing so already.
Steve
|
|
|
|
|
A good answer
|
|
|
|
|
Hook the terminate process API in kernel32.dll. Then when user right-click on the process list of Task Manager to kill process (tree), it takes no action.
Maxwell Chen
|
|
|
|
|
Hi fellows,
Does anybody here knows how can I change the color of a selected text within a Textbox? I'm using MFC's CEdit.
Any comment will be really appreciated. Thanks in advance.
Regards,
FG.
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
|
|
|
|
|
Do you mean you want to change the color of the highlight that shows what text is selected, or do you mean you want to select text, and then change its color?
I don't think that the basic Edit control is capable of multi-colored text. I think you need something more advanced like the RichEdit Control.
|
|
|
|
|
In general, for a specific control, it is not possible. However you can change the selection-highlight colour for just your application by hooking the GetSysColor API and returning your custom colour.
www.catch22.net/tuts/tips2.asp[^]
|
|
|
|
|
|
Hello,
I am attempting this example
http://www.codeproject.com/managedcpp/ijw_unmanaged.asp[^]
I am newbie so let me clear myself what i understood and where I got stuck.
This solution contains three project
1) C # Class Library
2) C++ Managed Library
3) C++ Unmanged Console Application
Am I correct? If so
Q. after Building 1) and 2) I get two .dlls. In this example's case they are ManagedClasses.dll and ManagedWrapper.dll. HOWEVER to build 3) I need four items, the above two .dll files, IManagedWrapper.h file AND ManagedWrapper.lib file. CAN SOMEONE PLEASE TELL ME HOW TO MAKE .lib file out of 2) ?
Q. another question i have is about how to make this projects? I mean When I create a C # library project in .NET 2005 it won't let me include System.Windows.Forms. The included Project sample with the link above somehow gets around it. Can someone explain me how? Also How is 2) (C++ Managed Library ) created? in .Net? when I tried making one.. I ended up with six default files. Do i just delete them?
Thx a lot
Sameep
|
|
|
|
|
First, you should understand rhe idea: you are tring to run unmanaged code in the manged framework. Thus, the MangedWrapper is an adaptor between the codes which by one side obeys the rules of the managed framework but is capable wrap the unmanaged code and make it managed too. So, the managed apllication calls the wrapper which calls the unmanaged code. In other words the managed code should "know" the Wrapper and the Wrapper should know the "unmanaged" and not the other direction. When you want to extend the managed appliction and to intorduce new classes you should insert the refference to the assembly (or dll in other words)in the project of the mannged application. On the other hnd the wrapper includes the h file of the unmanaged class.
2) When you create a new project choose Visula C++ project category and then Managed C++ class
I hope this helps you
DavidR
|
|
|
|
|
How do I get GetPrivateProfileSectionName function to work in VC++.NET 2002? It works fine in the 2003 version, but I can't get it to work in the 2002 version which is what I use at home. The error is that it is an undeclared identifier. I am assuming I need to include some header file, but I don't know which one though I did see some references to a kernel32.dll. How do I import this dll or have the compilier link it when it is compiled?
Roj
-- modified at 16:32 Friday 21st July, 2006
|
|
|
|
|
Look up the function name in the MSDN library, and down at the bottom of the page it tells you exactly what header file to include, and what library file to link with.
|
|
|
|
|
Yes, I know and I tried that, but it still comes up with the same error. It says that it requires kernel32.lib that is declared in windows.h. So, I included the windows.h and I added the kernel32.lib to the linker object/library modules, but still it fails to compile and always says undeclared identifier.
Roj
-- modified at 1:30 Saturday 22nd July, 2006
|
|
|
|
|
Ok, I got it to work, but I had to move the kernel32.lib from its normal directory into the directory where my project is. I must need to set the path somewhere.
Roj
-- modified at 1:29 Saturday 22nd July, 2006
|
|
|
|
|
Hi,
I'm writing a Windows Service in C++ (no .NET) and I need this service to start in Safe Mode w/Networking automatically, like the services.exe services (DHCP Client, Workstation, etc). What I have works fine in normal mode, but I can't even manually start it in Safe Mode (Error 1077)... not that it would do me any good manually - I need the service to start before login (and before clicking OK on the "Windows is in Safe Mode" messagebox). There has to be a way to do this, but I can't seem to find it on MSDN.
|
|
|
|
|
Only system services start up in safe mode ... and for good reason. You won't find a way around the security measures on MSDN. Safe mode is suppose to be used when something needs to be fixed ... which means, you don't want third party software running while fixing the OS.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I found the code but it is in C#. I tried to convert to VC++ in .NET but I was getting error for the following:
"tview.Nodes[k]" The error is in Nodes[k]. Can anyone please let me know how to solve it.
The code I got in C# is below:
<br />
{<br />
TreeNode temp = new TreeNode();<br />
<br />
for(int k=0; k<tview.Nodes.Count; k++) <br />
{<br />
temp = tview.Nodes[k];<br />
<br />
MessageBox.Show(temp.Text);<br />
<br />
for (int i = 0; i < temp.Nodes.Count; i++)<br />
visitChildNodes(temp.Nodes[i]);
}<br />
Any other sugesstions for how to traverse all the nodes in a treeview using VC++ .NET will be appreciated
|
|
|
|
|
Here's some actual code:
void CTreeTestDlg::WalkChildren(HTREEITEM hItem)
{
while (hItem != NULL)
{
OutputDebugString(m_treeCtrl.GetItemText(hItem) + _T("\n"));
if (m_treeCtrl.ItemHasChildren(hItem))
WalkChildren(m_treeCtrl.GetChildItem(hItem));
hItem = m_treeCtrl.GetNextSiblingItem(hItem);
}
}
void CTreeTestDlg::OnClickedWalk()
{
WalkChildren(m_treeCtrl.GetRootItem());
}
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi,
I want to change my project name .Can I change my project name after creating it?
Cyber Friend
|
|
|
|
|
Yes, but it's fairly tedious. I always find it easier to just create a new project.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi,
This link is not working .Can u provide some other link ?
Regards.
Cyber Friend
|
|
|
|
|
Hmmm..
Just tried it and it worked.
I also tried typing in vsrename in the SEARCH box at top and it
comes up with the same valid link???
Roy
|
|
|
|
|
Hi,
Ya it worked n i have used this utility. Its fantastic utility. When anyone uses this utility then dont forget to remove spaces from the path of poject being renamed.
Best Regards.
Cyber Friend
|
|
|
|
|
Yes , It is possible but you should consume about 20 minute .
1 - del Debug and Release folders .
2 - get back up of your prj .
3 - click --> Start->Serach-> ... and search your prj name .
4 - rename all files were found to new prj name.
5 - type prj name in "Containing text" edit box of Search window and empty "Search for files or ..." on that window
6 - Open all file that found in notepad and serach prj name int it and change it to new prj name .
I changed prj name with this way more times .
-- modified at 1:58 Saturday 22nd July, 2006
|
|
|
|
|
Hiya there everyone... In Visual Studio 6 i used to be able to press CTRL + W to bring up classwizard. Then i could click on a class ( A CDialog dervied class for exampe ) in the workspace and it would bring up all the message handler that i could double-click and the Visual studio would create a skeleton function for me.
Im aware that ClassWizard is defunct with regards to Visual Studio 2005 but i was just wondering if there is any way for me to bring up a all the message handlers that are associated with a class beause im going around the bend at the moment trying to remember my Message map handlers
cheers!
|
|
|
|