|
That works great, thanks.
However it exposes a new issue, how do I now know if it failed ?
I want to show a message if it fails
|
|
|
|
|
I have no idea really, sorry. Google is your friend...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
|
This article shows how to display a message box (good) but i need to detect the need for it.
If the Navigate fails (the cable is out) i get a script error box. SetSilent() prevents the error box but now i just have a blank WebBrowser2. How am i alerted of the error ??
|
|
|
|
|
If your code (for display or simply do nothing) get called, then you are detected for it.
|
|
|
|
|
Hi,
I'm trying to disable the 'Alt' key. There's a Windows' Scan Code Mapping technique which disables the keys. I'm writing the required registry entries from my Win32 application. This successfully disables the key from my physical keyboard. But this technique doesn't disable the keys from On-Screen Keyboard. When I spy the On-Screen keyboard, I found only one control on it. Is there any way or API to disable the keys from On-Screen keyboard ?
Thanks in advance.
|
|
|
|
|
Are you trying to disable the Alt key system-wide, or just for your app?
|
|
|
|
|
|
|
You might try to disable it via a service.
On a side note, disabling a key is a very strange requirement: Are you sure it is the solution to your problem ?
|
|
|
|
|
You might try to disable it via a service.
via service? why should I need a service. And if at all, how can I do that?
On a side note, disabling a key is a very strange requirement: Are you sure it is the solution to your problem ?
Yes.
|
|
|
|
|
Hi,
I am designing a small utility to scan hard drive for specific file types.
But I am facing strange problem in it.
A dialog box is scanning the drive, When I press "Cancel" button to stop the process, it opens window dialog box to ask for shutdown the windows.
But I am just doing CDialog::OnOk() on button click;
This is happening with windows7 only, on XP it is running fine.
Please guide.
|
|
|
|
|
john5632 wrote: Please guide.
Please show the code path taken when you press "Cancel".
|
|
|
|
|
if(MessageBox(_T("Do you want to cancel recovery?"),_T("Information"),MB_YESNO|MB_ICONQUESTION)==IDYES)
{
g_bStopScanning=TRUE;
CDialog::OnOK();
}
|
|
|
|
|
There must be more to this than meets the eye. I suggest you track this through your debugger.
|
|
|
|
|
I don't see how this could cause the problem you described, but shouldn't you be calling CDialog::OnCancel() ?
|
|
|
|
|
Is the scanning going on in a secondary thread?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi,
I have property sheet with PSH_HASHELP button.
But how to create handler of this button?
|
|
|
|
|
Add a function to the class to handle the help button click - void OnPropertyBtnHelp(void);
Then add the following to the message map - ON_COMMAND(IDHELP, OnPropertyBtnHelp)
To handle the F1 key press create a handler for WM_HELPINFO .
|
|
|
|
|
I have read the MSDN document section about Journal Hook over and over again, still be confused with the following things.
1.Does the Journal Record Hook record the user actions( like mouse clicks or keyboard events ), then Journal Playback Hook replays the series of actions which the user has just performed?
2.The lParam of the JournalRecordProc is a pointer to a EVENTMSG, I can copy it to a buffer as the MSDN tells us to, but what are we supposed to do with these EVENTMSG buffer?
3.The lParam of the JournalPlaybackProc is also a pointer to a EVENTMSG, I think this EVENTMSG is one of the actions which the user has just performed, what should we do with it in order to replay the action?
|
|
|
|
|
During Journal Record, you need to make copies of the EVENTMSG structures passed in lParam .
You can do this by creating a vector or EVENTMSG structures - std::vector<EVENTMSG> vEventMsgs;
Whenever the journal hook callback is called you can use std::vector::push_back to make copies of this structure.
During playback, copy back the stored EVENTMSG structures to lParam .
The return value from the journal playback callback must be the amount of time to wait till the next journal playback callback is called.
You can calculate this from the time member of the EVENTMSG structure.
Take a look at this article to find out how its done - Writing a Macro Recorder/Player using Win32 Journal Hooks[^]
|
|
|
|
|
The subject is not necessarily related to C/C++/MFC, simply I didn't find a suitable section.
How can be changed the boot logo of Vista ? It's possible, some applications available on the net can do it. I'm interrested in writing my own application. Code in any language is welcome. If not code, then it would be great to get some information related to the subject (links, registry entries, files, shell functions, etc).
Thanks.
|
|
|
|
|
Easy[^] when you know how (to Google).
|
|
|
|
|
Thanks for the Google link, I never heard about this site. Is it a search engine ?
To turn serious, if you don't know the answer, you don't have to reply.
Ok, I repeat, maybe it helps: "I'm interrested in writing my own application".
|
|
|
|
|
Well I guess not bothering to try Google first was a reasonable indication that you did not bother to read this[^] either, particularly points 1 and 2.
CString(0xcccccccc) wrote: if you don't know the answer, you don't have to reply.
I was merely giving you some suggestions; but don't expect anyone here to give you a working solution for the asking. After all you did say you were interested in writing your own.
|
|
|
|