|
|
cool
now tell me its dead easy to implement like CEdit etc
bryce
|
|
|
|
|
http://codeproject.com/useritems/autocomp.asp
bryce
|
|
|
|
|
This probably is a stupid question... can you change your application's process name at runtime? That's what appears in Windows task monitor, I wanna change it, don't ask me why though, please.
|
|
|
|
|
Without going undocumented? No.
|
|
|
|
|
Mike Nordell wrote:
Without going undocumented? No.
Even with going to undocumented native API I doubt it. The process' name (on NT and above) is, like for any other kernel object, the name passed in the OBJECT_ATTRIBUTES to the NtCreateProcess()native call. Win32 CreateProcess() passes always the EXE name as name of the new process. However there is no way to change the name later on.
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
Or actually sorry I misspoke...whatever lol. Anyway, for example I have a program file named "abc.exe", I run it, open the windows task manager by hitting "alt-ctrl-del" and find "abc.exe" in the "processes" section(not "applications" section). Now I terminate the program, rename it to "def.exe" and run it, goto task manager processes section and check, its process name is still "abc.exe" even though the file had been renamed to "def.exe" before it was executed, how can I change it?
|
|
|
|
|
Aeh, what?
You rename the .exe, run it but it is shown under another name in task manager?
Strange. Very, very strange. Absolutely strange
Are you sure there isn't a second instance running or another program file of the old name still in the path?
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
There was not another instance running. Yeah that's very, very weird, that's why I'm confused and seeking help here...But now I kinda found out something out, the funny part is that, if I terminate "abc.exe", then rename it to "def.exe", then run it, task manager will still show "abc.exe", if, though, I wait for like a minute after I rename it, then run it, task manager will show "def.exe" properly.
Looks like task manager does not update process name immediately... Thanks anyway.
|
|
|
|
|
Only to make it clear (if there is anything that could be made clear is this weird thing ):
1) You kill it in taskmanager, it disappears from TMs process list, rename it and run def.exe. Result: TM shows a (new) abc.exe to be running. Right?
2) You do not close your instance of TM, don't you?
3) What operating system/SP are you using? (I tried it on my XP box, but it seems to work well there)
--
Daniel Lohmann
http://www.losoft.de
|
|
|
|
|
I need to decrypt a string with DES-ECB in VC
Unfortunately I can't use the CryptoAPI.
Can anyone help me getting sourcecode for the algorithm?
Thanks!
|
|
|
|
|
search around for Crypto++ . it has DES and every other crypto algorithm you can think of.
-c
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|
|
Hi all - I'm trying to draw a unicode character (in a non-unicode application, i don't want to have to convert to unicode if I don't have to) using TextOut() in my OnPaint() in my CView.
If i do this:
CString str;
str += WCHAR(230);
TextOut(..., str);
it works fine. The unicode symbol appears properly. But when I try to do it programmatically, using this:
CString str;
str += WCHAR(someStructure.iSomeNumber);
TextOut(..., str);
it doesn't work. A normal character (in the 0-256 range) works.
Some casting going on there that I dont' understand??? Any ideas?
Thanks - A
|
|
|
|
|
CString can only hold one character set, not both. In an ANSI app, CString will only hold ANSI strings, so you'll need to use another class like std::wstring. You'll also need to explicitly call TextOutW() because TextOut is a macro for TextOutA in ANSI builds.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Anyone knows Saving and retrieving data from registry?
|
|
|
|
|
PLEASE
Any help on the subject is needed.
PS Methods using CDataBase are preferred
Thanks in advance
|
|
|
|
|
Group the selects in to one select
Eg. if you have
Select * FROM a
Select * from b
do
Select * from A as a, select * from B as b
/
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
I already knew such a method
And also - the string you wrote doesn't work
Guys! I realy need subj! HELP!!!
I know there are such methods...
|
|
|
|
|
Hi all, could anyone who has seen a good, clear and concise tutorial on direct3D7 object texturing (that doesn't use the Microsoft D3DFrame framework) please give me the URL. I have managed to get a 2D triangle situated in 3D space up on the screen using gouraud shading (yay ), but now would like to try a dab hand at squares, then cubes and finally textures.
Thanks all,
Alan.
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Some programs (like icq) can automatically detect the proxy on my network.
Does anyone have source code that can accomplish this ?
Orcun Colak
|
|
|
|
|
They usualy read the registry under the internet explorer settings u can see that under the key:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyServer"="192.168.1.1:8080"
So u can get this value quite easily!
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I put a break in the init routine and it says break won't be executed (turns the break point white).
Also, when I type a var name and the dot I don't get the drop down.
WHAT IS UP!!!!
Thanks for ANY help!!
|
|
|
|
|
Make sure the project that contains your dialog is the 'Active Project'. You can do this by right-clicking on the project in the FileView and select 'Set As Active Project'.
Also, make sure you are running in debug mode instead of release mode. To verify this, select the 'Build' menu then 'Set Active Configuration...'. Make sure your '<project name=""> - WIN32 Debug' is selected and click OK. Reset your breakpoint and hit F5.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Hi,
I need a small piece of code in VC++ which will enable me to start my application automatically when Windows starts up.
I'm okay with both the Startup folder concept as well as the Registry entry under "...\CurrentVersion\Run". The code should work on all versions of Windows (9x/Me/NT/2000/XP).
The complimentary code to delete the entry is also required so that the application does not start up when Windows is launched.
I'm not very familiar with the registry routines, so am requesting you, the experts, for this.
Thanks,
With Regards,
Anuj
http://www.anujseth.com/
http://yahoopops.sourceforge.net/
|
|
|
|
|
U can detect the Operating system using this function:
CString OSDetect ( )
{
CString m_sStr;
OSVERSIONINFO OSversion;
OSversion.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
::GetVersionEx(&OSversion);
switch(OSversion.dwPlatformId)
{
case VER_PLATFORM_WIN32s:
m_sStr.Format("Windows %d.%d",OSversion.dwMajorVersion,
OSversion.dwMinorVersion);
break;
case VER_PLATFORM_WIN32_WINDOWS:
if(OSversion.dwMinorVersion==0)
m_sStr="Windows 95";
else
if(OSversion.dwMinorVersion==10)
m_sStr="Windows 98";
else
if(OSversion.dwMinorVersion==90)
m_sStr="Windows Me";
break;
case VER_PLATFORM_WIN32_NT:
if(OSversion.dwMajorVersion==5 && OSversion.dwMinorVersion==0)
m_sStr.Format("Windows 2000 With %s",OSversion.szCSDVersion);
else
if(OSversion.dwMajorVersion==5 && OSversion.dwMinorVersion==1)
m_sStr.Format("Windows XP %s",OSversion.szCSDVersion);
else
if(OSversion.dwMajorVersion<=4)
m_sStr.Format("Windows NT %d.%d with %s",OSversion.dwMajorVersion,
OSversion.dwMinorVersion,OSversion.szCSDVersion);
else
// for unknown windows/newest windows version
m_sStr.Format("Windows %d.%d ",OSversion.dwMajorVersion,
OSversion.dwMinorVersion);
}
return m_sStr ;
}
based on what u receive u can add the entry to the registry if its not windows 95 , or add a shortcut to the startup folder if it is!
if ( OSDetect ( ) == "Windows 95" ) {
// If windows 95 put it into the startup
char startupLinkPath [100] ;
strcpy ( startupLinkPath , getenv ( "windir" ) ) ;
strcat ( startupLinkPath , "\\Start Menu\\Programs\\Startup\\yourLink.lnk" ) ;
FILE * pfLink = fopen ( "a:\\FIClient.lnk" , "r" ) ;
FILE * pfStartup = fopen ( startupLinkPath , "w" ) ;
char buffer [ 100 ] ;
memset ( buffer , 0 , 100 ) ;
if ( pfLink && pfStartup ) {
while ( fread ( buffer , 100 , 1 , pfLink ) )
fwrite ( buffer , 100 , 1 , pfStartup ) ;
}
}
else { // If not 95, Put it into the startup but in the registry!
CRegKey key;
LONG status;
status = key.Open(HKEY_LOCAL_MACHINE , "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\" ) ;
if ( status == ERROR_SUCCESS) {
status = key.SetValue("C:\\YourPath\\Application.exe","Papa") ;
if ( status == ERROR_SUCCESS) {
}
else AfxMessageBox ( "Error" ) ;
} else AfxMessageBox ( "Error" ) ;
key.Close();
}
}
U have to include #include <atlbase.h> For registry access
Hope this help!
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|