|
If you find the exe in the snapshot collection by calling Process32First()/Process32Next(), then that means your exe is running. If you don't find it, it isn't running. This is from MSDN: A snapshot that includes the process list contains information about each currently executing process.
|
|
|
|
|
Hey Lads,
I basically need to change the URL that somebody tries to navigate to in a CHtmlView derived View from starting with http:// to starting with https:// .
I'm basically going to override OnBeforeNavigate2() and alter the URL there and then pass the altered URL on to be handled as default but I was wondering if there is a different approach to this or if anybody sees a problem with doing it this way???
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
Brian Delahunty wrote:
I'm basically going to override OnBeforeNavigate2() and alter the URL there and then pass the altered URL on to be handled as default but I was wondering if there is a different approach to this or if anybody sees a problem with doing it this way???
Nothing wrong except the fact that translating http to https is odd enough, since it is usually part of the html application logic, i.e. the user should find a *real* link to https.
|
|
|
|
|
.S.Rod. wrote:
http to https is odd enough, since it is usually part of the html application logic, i.e. the user should find a *real* link to https.
I know it sounds strange but it's something that I need to use to access a particular site.
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
CHtmlView now supports a function called OnTranslateURL which you can use to modify a URL before it is loaded. But I think you need .NET (and thus MFC7) to use this function.
|
|
|
|
|
Schlaubi wrote:
CHtmlView now supports a function called OnTranslateURL which you can use to modify a URL before it is loaded. But I think you need .NET (and thus MFC7) to use this function.
Thanks The machines I'll be using it on probably won't have .NET so it's probablyt just stick to my original way.
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
I have a modeless dialog box placed on a modeless dialog box when I am updating some information which takes some time. I call DestroyWindow to end the dialog when the process is done but rarely (don't know why, can't reproduce the results reliably) The dialog turns white ( the overlying one) and no information is entered into the controls unless I click on the window.
This is the code for the dialog:
BOOL CALLBACK WaitDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
SetCapture(hDlg);
SetCursor( (HCURSOR) LoadCursor(NULL, IDC_WAIT));
return TRUE;
case WM_DESTROY:
ReleaseCapture();
SetCursor( (HCURSOR) LoadCursor(NULL, IDC_ARROW));
return TRUE;
}
return FALSE;
}
Does it have something to do with SetCapture and ReleaseCapture. I make sure I call UpdateWindow after I call DestroyWindow but still sometimes it happens. What is the reason for this problem?
|
|
|
|
|
Have you tried yourdlg.RedrawWindow(); ?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I actually was using UpdateWindow(), but I think I might have found the problem although it's hard to tell since it happens rarely. In your opinion do you think the application got 'stuck' because I called EndDialog for the modal dialog box first (which is the parent window of the WaitDlg (the one that gets 'stuck') and then called DestroyWindow? I noticed this this afternoon and though maybe in some way that if the parent window was destroyed first the second one is left there hanging, like an orphan where most of the times windows takes care of it but sometimes leaves it in the gutter mmm?
|
|
|
|
|
Hi,
I have an ActiveX control, with the source code, I use it in my application ( it uses un ugly wrapper, with calls like raw_(...)).
What I would like to do is to be able of going to the source code of the ActiveX when debugging... is there anyway to do that ?
( or I have to start the DLL in another Visual Studio waiting for a server to activate it ?).
Thanks in advance, greetings
Braulio
|
|
|
|
|
You have to start second instance only if it is outproc and you use VC6.
1. VC6+outproc - wait until Your program instantiates control than attach the second instance of DevStudio to the process of your control(menu Build->Start Debug->Attach To Process).
2. VC7+outproc - wait until Your program instantiates control than attach the studio to the process of your control(menu Debug->Processes).
3. inproc - in both cases it is just normal debugging
|
|
|
|
|
What does a user’s computer have to have in order to use MSChart if I include it in a program? Can I distribute these items with my program?
I have searched MS website but no solid information.
"Best file compression around: DEL *.* = 100% compression."
<><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
If it's MSChart, the Active-X COntrol that comes with VS6, I think it's redistributable. I forget the ocx or dll it's in, but if you do a dependancy trace you can find it. I think it is self registering too, but I'm not sure.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I have to create a Visual Studio Installer Project
in order to install my application (a single executable file)
and a Freeware Tool (as in example Acrobat Reader).
I can't find the way to let the Freeware Tool installation
executable file to be launched by the Visual Studio Installer Project
(during the installation of the mine application)!!!
Which settings have I to do in my Visual Studio Installer Project?
Thanks a lot !!!!
|
|
|
|
|
Anthony B. wrote:
Visual Studio Installer Project
in VS .Net? try posting in the .net forum.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
hi all,
I have heard that you must use an dll for the windows keyboard hook apis to work in Win2000/XP in a global state, is that correct? If so then why?
Is there any other way to "hide" or prevent applications from recieving keystroke messages? If so then how?
Does hotkey apis prevent messages and must they always use combined keys like ctrl+..., alt+... or shift+...?
I thank you for any reply
Aidman » over and out
|
|
|
|
|
In order to have system-wide keyboard hooking, you should work with SetWindowsHookEx win32 API.
Your code should be a dll since the operating system injects the dll to every running process.
|
|
|
|
|
hi,
I need to send to a serial port a char*.
I am accepting the data through an edit box ==> CString.
I tried to convert the string through lstrcpy( )
from CString to char*, but when comparing the char* string whith an "identical" char* I got NULL. I had in both strings '\n' .
thanx
Moshe
|
|
|
|
|
Try:
CString s = "Test";
char* ch = static_cast<char*>(s.GetBuffer(0));
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I tried the following:
CString s = "Test";
char* ch = static_cast<char*>(s.GetBuffer(0)), *test="Test";
int d = ( ch == test);
ch = test;
d = ( ch == test );
the first d is 0 and the second 1. so the arn't really equal
even though they seem so!!!
|
|
|
|
|
citroen wrote:
the first d is 0 and the second 1. so the arn't really equal
even though they seem so!!!
NO! NO! NO!
don't confuse yourself! Read my article on Pointers[^] and you'll see why ch != test. Actually, they'd better not be equal!
Download the demo project, and go over the article. It will hopefully enlighten you! I understand how confusing it can be at first, trust me.
Let me know what you find out, and tell me why they are not equal.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
First, thanx.
It works.
so they will be equal I should have written:
*ch==*test; to dereference them.
thanx again
Moshe
|
|
|
|
|
citroen wrote:
so they will be equal I should have written:
*ch==*test; to dereference them.
You are exactly right!
[happy-cry] sniff... sniff... I'm so proud... [/happy-cry]
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
|
How can I get application path ?
such as I want to get icq path,acrobat path,...;
How should I do (Howto or Library) ?
Thank you for your kindness.
|
|
|
|