|
Hi
I have a MFC-dialog program with a list in it. I have assigned F5 as a hotkey to update the list through the RegisterHotKey function. This works fine
But from the main window I want to open another dialog with a different list in it. I want to use F5 as a update-hotkey in this dialog too .. but I cant get it to work. F5 only updates the list in the main dialog.
I thought that a RegisterHotKey registered a hotkey for the whole system so that I can capture it in every dialog in my program ??
Any help is much appreciated !
|
|
|
|
|
How are you calling RegisterHotKey() ?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I do it like this:
In the maindialogs OnInit-function:
RegisterHotKey(GetSafeHwnd(), m_IDHotKey, NULL, VK_F5);
And add this to the messagemap in every dialog that should use the hotkey:
ON_MESSAGE(WM_HOTKEY,OnHotKey)
And the OnHotKey function looks like this:
LRESULT CFingerIDAdminDlg::OnHotKey(WPARAM wParam, LPARAM lParam)<br />
{<br />
}
It only works for the main dialog ... a F5-keystroke in the child window registrates as a F5-key in the main window. I thought that the WM_HOTKEY-message was going to be handled by the dialog that is active ??
|
|
|
|
|
Have you used Spy++ to see the messages that are being received by both the main window and the child dialogs?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
me think you need to put the handler in all the different dialogs ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I have used FindNextFile for take all file in a directory
but now i have need to know if the current return from to FindNextFile is a link
How can i do?
|
|
|
|
|
Check to see if it has a .lnk extension.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I dont have an extention.
This files are in a UNIX ambient
|
|
|
|
|
What constitutes a shortcut on a Unix box (they used to be called nodes) is different than what constitutes a shortcut on a Windows box. There is no way for a Windows box to "ask" a Unix box if such-and-such file is a shortcut or not.
|
|
|
|
|
That's true. Unless you can execute something like a stat() on the file at the UNIX end, you have no way of determining that it is anything other than a regular file. You can't even tell if it's a file with multiple hard links, much less something more esoteric, like a soft link or a device file.
Steve S
|
|
|
|
|
Hello !
Juste a little question.
What is exactly the difference between delete and delete[] ?
Is the second used to delete memory allocated for more than one element and the first when only one element was allocated ?
Thanks
|
|
|
|
|
delete[] assumes that the block of memory pointed at is an array of (the same kind of) objects where the delete operator needs to call the destructor for each element in the array.
Rob Manderson
Paul Watson wrote:What sense would you most dislike loosing?
Ian Darling replied.
Telepathy
Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003
|
|
|
|
|
Both c++ commands are used to deallocate memory that was previously created. However, delete [] instructs the compiler that the given memory location is an array of allocated space (usually created using the new [] keyword).
The general rule is to use
delete with new and
delete [] with new []
I Dream of Absolute Zero
|
|
|
|
|
Ok thanks !
That was what I was thinking about but I wasn't sure
|
|
|
|
|
for more details, refer to Scott Meyers <<effective c++="">>
|
|
|
|
|
Hi, I'd like to be able to create a shortcut in the start menu like office does. Instead of putting it in the Programs > section, it puts it in the main Start Menu window?
How can I do this? Thank you,
Ashman
|
|
|
|
|
put your short cut here:
C:\Documents and Settings\All Users\Start Menu
but i don't know how to put one in the start menu for windowsxp-style start menu
|
|
|
|
|
Hi, I need to know how to copy a folder and all the contents within to another location set by the user. Because the folders content is read only, I want to be able to make ReadOnly(FALSE);
Is this possible, please help!
Thanks in advance
Ashman
|
|
|
|
|
SHFileOperation will help out, its very good api to work around with files and folder.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
Thanks
I searched for SHFileOperation() API calls and I don't understand how to implement it in my program.
Do you have/know of an example that I can use. What I want to do is very basic; transfer 2 folders with all their files intact from location:
D:\Programming\NeriedPOS\nbsSetup\nPOS & D:\Programming\NeriedPOS\nbsSetup\nManager
to C:\Program Files\nPOS with ReadOnly(FALSE)
Would you kindly be able to show me how to do that using SHFileOperation() or any other API?
Please help...its kinda urgent considering I have almost run out of hair to pull
Thanks
Ashman
|
|
|
|
|
This
SHFILEOPSTRUCT shfo = {0};
shfo.wFunc = FO_COPY;
shfo.pFrom = "D:\\Programming\\NeriedPOS\\nbsSetup\\nPOS\\*.*\0";
shfo.pTo = "C:\\Program Files\\nPOS\0";
SHFileOperation(&shfo); should get you started.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Have I ever told you I love you?
Thanks heaps
|
|
|
|
|
Ashman wrote:
Thanks heaps
You're welcome stacks!
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hello ,
Is there any SDK to implement the AUto-Upgrade feature .I am writing a application in vc++ .Is there anything ,that i can use some SDKs that can be used to check for upgrades for my application from a URL /server ?
Cause is my effort;
Effect is God's effort
|
|
|
|
|
What I did, which was kind of slow maybe to create an autoupdater was to get my program to connect to the server, navigate to updates folder and open a file which was similar to an ini file. Get the current version of the program the user is running, set a variable for each new version like; Version 1.10a = 1 and Version 1.10b = 2 etc.
On the server say the new version is Version 1.10c which = 3, try like: Note this is using CIniEx as an example...
<br />
CString strVersion;<br />
ini.Open("Version.ini");<br />
strVersion=ini.GetValue("Program","Version");<br />
<br />
if(strVersion == "3")
{<br />
}<br />
else {<br />
}<br />
<br />
Just a suggestion....bit hard to explain considering Im a complete knob. For some reason things just work themselves out for me programmatically . Hope that helped.
Ashman
|
|
|
|