|
Hi all,
I am getting the error:
error C3861: 'SetWorkingDirectory': identifier not found
I have already included #include <shobjidl.h>
Is there anything I lack?
Is it defining cplusplus?
If so how do i do that?
Thanks
Jayjay
|
|
|
|
|
monsieur_jj wrote: error C3861: 'SetWorkingDirectory': identifier not found
Here is the answer in google's way ...
There is no such function. Did you mean SetCurrentDirectory[^]?
|
|
|
|
|
Did you see Requirements for SetCurrentDirectory?
Requirements
Client
Requires Windows Vista, Windows XP, or Windows 2000 Professional.
Server
Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.
Header
Declared in WinBase.h; include Windows.h.
Library
Use Kernel32.lib.
DLL
Requires Kernel32.dll.
Unicode
Implemented as SetCurrentDirectoryW (Unicode) and SetCurrentDirectoryA (ANSI).
|
|
|
|
|
When I Click a row of DataGrid control,What message occurs?
I wanna export the data of a row of the DataGrid control to the excel.I think when I click or doubleclick the row,a Message would occur.What is the Message?
|
|
|
|
|
Does this[^] help?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello,
Here is the issue.
I have a win32 dialog on which there are some controls and I have call back method defined for handling the messages. One of the control is a button. Once the button is clicked and released, WM_COMMAND is received by the call back method. But as i need to handle button click and button release messages seperately i used Subclassing. I defined one more call back method for this button and now i am able to receive button down and button up messages.
There is a shortcut assigned to this button. On pressing the shortcut key, WM_COMMAND is received by the window call back but not the control call back. On releasing no message is sent to any of the call backs. Is there a way to enable the framework to send appropriate message to the control call back...
Please let me know if you need more details.
Thanks in advance,
Hari krishna.
|
|
|
|
|
Adarapu Harikrishna wrote: I defined one more call back method for this button and now i am able to receive button down and button up messages.
you mean Lbuttondown and LbuttonUp ?? Its better to handle the BM_CLICK message. It will be fired in all cases.
|
|
|
|
|
Thanks Naveen for your reply. I need any sort of message to the control call back on pressing the shortcut key and also on the release of the same. Right now it goes to the dialog call back as WM_COMMAND once the shortcut key is pressed.
|
|
|
|
|
Did you try handling BM_CLICK message in the button's call back function..?
|
|
|
|
|
Hi Experts,
I have a CListCtrl with LVS_EX_CHECKBOXES style but if I check/uncheck the item from list how can get the index of it?
I also used LVN_ITEMCHANGED and NM_CLICK but could not get the selected item index.
|
|
|
|
|
MPTP wrote: how can get the index of it?
Have you had a look at the dozens of CodeProject Articles about using CListCtrl?
led mike
|
|
|
|
|
|
I have never used MSXML, so bear with me. I have a small C++ app that receives a message via another app. The message received is XML format but is contained in a string and not passed as an XML doc. Stuck with this, nothing I can do about this part.
So, I need to implement MSXML, I am hoping this is the right path, to load the string into an XML doc and parse through it. Does anyone have or know of a simple example of how to do this? The xml string I receive only has 2 elements, so this does not have to be a very involved example with lots of bells and whistles. Just looking for the basics.
BTW, I am using MSXML 6.0.
Thanks a lot in advance for the help.
Troy Schenk
|
|
|
|
|
MSXML implements an XML DOM and maybe also a SAX parser. You can go study how those things work at web sites like TOP XML and www.w3schools.com
I also believe you will find sample code using MSXML at w3schools. Now those samples might be in something like Javascript but that doesn't matter because the COM interfaces are the same when you use them from C++. Of course if you don't have experience using COM interfaces from C++ then you will also need to learn about that.
led mike
|
|
|
|
|
thanks, I will definitely check out the w3school website.
|
|
|
|
|
|
When the cursor stays on an icon(i.e. an icon of a folder or an application), how can i get the message that there is a folder under the cursor? Just like the tooltip, when the cursor stays on an icon, it appears. I want to accomplish the same function.
|
|
|
|
|
mceros wrote: Just like the tooltip, when the cursor stays on an icon, it appears. I want to accomplish the same function.
Store these icon locations in a vector/list. Then on mouse move check whether the current mouse position is within any of the above icon locations. Handle ON_WM_MOUSEMOVE to track mouse movement. You can wrap the icon, it's location and corresponding tooltip in a structure so that you don't have go hunting again for tooltip.
Some other functions that could interest you are...
std::find_if
GetCursorPos
SetCapture
ReleaseCapture
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Well, I have thought about this method, but if I adjust my screen resolution, it seems that locations of folders would change. And another problem: I want my program to display something like the tooltip when user stays its cursor on any icon of folder, so it is almost impossible to store the locations of all folders.
When I use Spy++ to chase messages, I found that a message called TTM_WINDOWFROMPOINT was posted. But the problem is that MSDN says this message only can be posted by coder, and recieved by system. So I wonder whether there is a message or a function can get the message that the cursor is on an icon at current positon.
I suppose function WindowFromPoint() is usefull, but I'v got no ideas how to accomplish my purpose.
|
|
|
|
|
mceros wrote: I want my program to display something like the tooltip when user stays its cursor on any icon of folder, so it is almost impossible to store the locations of all folders.
What application is this? Explorer?
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
a little win32 application
|
|
|
|
|
mceros wrote: I want my program to display something like the tooltip when user stays its cursor on any icon of folder, so it is almost impossible to store the locations of all folders.
If your folders are controls then you can call EnableTooltips in OnCreate or OnInitDialog and handle TTN_NEEDTEXT notification.
MSDN has useful code snippet. This way you don't need to store icon locations.
Prototype for TTN_NEEDTEXT looks like this...
BOOL TooltipHandler( UINT id, NMHDR * pTTTStruct, LRESULT * pResult );
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
The folders I mean are those which on the desktop or Explorer.exe, not in my application.
|
|
|
|
|
mceros wrote: The folders I mean are those which on the desktop or Explorer.exe, not in my application.
Mmm I guessed it earlier that's why I asked whether you want to handle explorer icons!
You need to write a shell extension... Here is a tutorial series by Michael Dunn!
http://www.codeproject.com/KB/shell/shellextguide3.aspx[^]
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Well, thank you all the same! 
|
|
|
|