|
It has a default argument.
If I dont pass, it will save it in a format identified by extension.
|
|
|
|
|
does that mean you got it to work? if so, how?
|
|
|
|
|
Ya I got it to work. But it still doesn't work the way it should.
I set the required path as current directory and then I call Save with only filename as the parameter (no path prefixed, since it still doesn't work that way.)
|
|
|
|
|
Hi all,
i have static text for mailto and website.and it is working as hyperlink perfectly.
only one problem is there the hand cursor not display when i move mouse on this.
please help me for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I typed "hyperlink" into the search box at the top of codeproject, and found several articles doing what you want - and with hand cursors.
I'd pick http://www.codeproject.com/KB/miscctrl/hyperlink.aspx[^], as it's one of the very first articles on codeproject.
Or you can just handle WM_SETCURSOR/OnSetCursor if your code is almost complete.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Create a message handler function OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) for the message WM_SETCURSOR
Declare a HCURSOR variable in your class
HCURSOR mLinkCursor = NULL;
In the OnInitDialog function, add the below block
if(mLinkCursor == NULL)
{
CString winDir;
GetWindowsDirectory(winDir.GetBuffer(MAX_PATH), MAX_PATH);
winDir.ReleaseBuffer();
winDir += _T("\\WINHLP32.exe");
HMODULE hModule = LoadLibrary(lpzWinDir);
if (hModule)
{
HCURSOR mHandCursor = ::LoadCursor(hModule, MAKEINTRESOURCE(106));
if (mHandCursor)
mLinkCursor = CopyCursor(mHandCursor );
}
FreeLibrary(hModule);
}
Now, you update the added OnSetCursor function as
bool myClass::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
// Note: Here IDC_HYPERLINK is nothing but your control Id
// that should get the hand cursor when mouse moves over it.
// Update this to your ctrl Id
if((pWnd->GetDlgCtrlID() == IDC_HYPERLINK) && (mLinkCursor != NULL))
{
::SetCursor(mLinkCursor );
return TRUE;
}
return CDialog::OnSetCursor(pWnd, nHitTest, message);
}
I found this in one of the forums. This should work.
Let me know if you face any problem.
KJ
|
|
|
|
|
hi, can you explain what does these error messages mean??
'sparta1.exe': Loaded 'C:\Users\Vani\Desktop\Projects\sparta1\debug\sparta1.exe', Symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\ntdll.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\kernel32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Users\Vani\Desktop\Projects\sparta1\sparta1\sqlapi.dll', Binary was not built with debug information.
'sparta1.exe': Loaded 'C:\Windows\System32\user32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\gdi32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\advapi32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\version.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\ole32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\oleaut32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.42_none_ef74ff32550b5bf0\msvcr80d.dll', Symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\imm32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\msctf.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\lpk.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\usp10.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Program Files\Kaspersky Lab\Kaspersky Internet Security 2009\mzvkbd.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\psapi.dll', No symbols loaded.
'sparta1.exe': Unloaded 'C:\Program Files\Kaspersky Lab\Kaspersky Internet Security 2009\mzvkbd.dll'
'sparta1.exe': Unloaded 'C:\Windows\System32\psapi.dll'
'sparta1.exe': Loaded 'C:\Program Files\Kaspersky Lab\Kaspersky Internet Security 2009\adialhk.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\shlwapi.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100\comctl32.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Program Files\Kaspersky Lab\Kaspersky Internet Security 2009\kloehk.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Users\Vani\Desktop\Projects\sparta1\sparta1\sqlite3.dll', Binary was not built with debug information.
'sparta1.exe': Loaded 'C:\Windows\System32\uxtheme.dll', No symbols loaded.
'sparta1.exe': Loaded 'C:\Windows\System32\clbcatq.dll', No symbols loaded.
First-chance exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000.
First-chance exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000.
The program '[5892] sparta1.exe: Native' has exited with code -1073741819 (0xc0000005).
|
|
|
|
|
Messages of the form 'sparta1.exe': Loaded 'C:\Windows\System32\clbcatq.dll', No symbols loaded. indicate DLLs foir which no debug information can be found.
Messages of the form First-chance exception at 0x00000000 in sparta1.exe: 0xC0000005: Access violation reading location 0x00000000. indicate some part of your code accessing an invalid memory location - I suspect dereferencing a NULL pointer (or possibly callling a virtual method on a NULL pointer) in this case - difficult to say more without code.
Step through the code in the debugger - the debugger will tell you when the access violation occurs...
|
|
|
|
|
|
Point 2:
That should be coming - this is a bad spelling mistake that I won't explain. And wait until you're home before you research why.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
ROFL
|
|
|
|
|
You didn't have to delete the message, just edit it a little.
In hindsight, I should have emailed you, rather than posting a reply.
It was a legitimate question, so I hope you repost soon and get helpful replies.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Iain Clarke wrote: You didn't have to delete the message, just edit it a little
But you can say thanks[^] like me.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hmm, has he deleted all his messages?
Very polite of you sir!
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi All
How to get connected USB Device name?
|
|
|
|
|
newhivc wrote: How to get connected USB Device name?
What do you mean by that?
What kind of device is it?
How do you want to discover it? By enumerating the USB tree or when the user inserts the device in a port or both?
Do you have a way to recognize the device when you encounter it during a USB enumeration, such as part of the device name?
Getting the device name when the user attaches the device to the system is fairly straight-forward:
You register for device notification for the device class the particular device belongs to and handle the WM_DEVICECHANGE message. The device name is part of the struct that is passed as an argument to the message handler.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
To extend Roger's answer - if you're interested in devices being plugged in / out, have a look at my article:
http://www.codeproject.com/KB/system/Drive_Detect.aspx[^]
It's aimed at drives, but I use it in my work to detect a certain class of USB devices also - and they're not pen drives.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
|
Jijo raj wrote: 1. Enumerate Properties of an Installed Device[^].
2. Enumerate Installed Devices Using Setup API[^].
Whats the different between these links except their titles?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hamid. wrote: Whats the different between these links except their titles?
Copy/Paste error. Thanks!
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Yeah.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Do you need to Win32_USBControllerDevice also this article is helpful form you Detecting Hardware Insertion and/or Removal[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
hi experts please let me know how to find all depenent .DLLs,.EXES that depends on a particular .exe in vc++ 1.52(dependency walker is not working in vc++1.52)
kir_MFC
|
|
|
|
|
You need to use Dependency Walker[^] why it doesnt work?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Because Visual C++ 1.52[^] produces 16-bit applications and dependency walker won't work on 16-bit modules. Here[^] is a dos utility to find dependencies of 16-bit apps. Hope it helps.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|