|
What about the lpfn member (of the BROWSEINFO structure)?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I know how to use the lpfn function pointer, but I am not sure what you are suggesting. I am setting that pointer to my callback function, but it is not being called when the user is doneediting the folder name.
|
|
|
|
|
Royce Fickling wrote: I am setting that pointer to my callback function, but it is not being called...
Is it being called for anything? I would have thought a TVN_ENDLABELEDIT notification would be sent.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
No, it is being called with the BFFM_INITIALIZED and BFFM_SELCHANGED messages and nothing else. I thought maybe I needed to set another flag, but I don't know what it might be.
|
|
|
|
|
I do not see any other ones here that look promising.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Good day, i'm having a proplem with a static library i'm creating. But before i'll go into the details of the library i'm gonna give you some details about the app that is importing it.
But basicly this is a raw exe. All standard libraries such as the default C Runtime Libraries are not included. Which means i have to declare my own entrypoint for the application which looks like this.
#pragma comment(lib, "SkyNet_RTL.lib")
#include <windows.h>
#include "SkyNetLoader.h"
#include "..\SkyNet_RTL\SkyNet_RTL.h"
void __stdcall __SkyNetLoaderEntry()
{
_SkyNet_RTL_INIT();
int entry_ret = 1;
ExitProcess(entry_ret);
}
</windows.h>
The only libraries that link with the application is kernel32.dll and ntdll.dll which actually link to all applications.
Don't know if it matters but that standard calling convention for the exe is __stdcall and __cdecl for the static library.
The function _SkyNet_RTL_INIT(); is a function implemented in the static library called SkyNet_RTL.dir (Skynet Runtime library). As you see i've included the SkyNet_RTL.lib in the pragma comment directive so it should be linked into the build.
The header file for the static lib IS the same file for both the application and the static library.
The Compiler puts the .lib file and the export file into the folder containing the .exe so it should be present for the linker to grab.
The static lib project is a dependency for the application so if there are any changes to the lib it's rebuilt and put into the application project's folder for linking before the application itself is built.
Here's the header file for the static library
#ifndef __SKYNET_RUNTIME_LIBRARY_V01
#define __SKYNET_RUNTIME_LIBRARY_V01
bool __cdecl _SkyNet_RTL_INIT(void);
#endif
Plain and simple. _SkyNet_RTL_INIT(void) is implemented in SkyNet_RTL.cpp like this
#include "SkyNet_RTL.h"
bool __cdecl _SkyNet_RTL_INIT(void)
{
return true;
}
The static library is also a completely raw library, which excludes all standard libraries for linking (CRT, etc). But right now the symbols dont seem to be exported. I've messed around with the settings alot and i constantly get.
SkyNet Loader error LNK2019: unresolved external symbol "bool __cdecl _SkyNet_RTL_INIT(void)" (?_SkyNet_RTL_INIT@@YA_NXZ) referenced in function "void __stdcall __SkyNetLoaderEntry(void)" (?__SkyNetLoaderEntry@@YGXXZ)
Atm i dont see anything wrong, i've gone trough quick articles on static libraries and none seem to do anything other then what i'm doing here excluding the fact that my lib and app are completely raw (my compiler/linker settings have been modified alot, no RunTime checks, etc).
The lib and export files are present for the application to be linked with.
If someone can point me in the right direction it would be greatly appreciated, and btw if you are wondering why the explicit __cdecl in the library function it was because i thought perhaps the calling conventions could change something, it was originally made __stdcall by the compiler even though the standard calling convention for this build is __cdecl.
|
|
|
|
|
Problem solved. Somehow building the lib in debug mode seems to screws up the export mechanism. No problem when the static lib is built in release.
|
|
|
|
|
Hi all
I am trying to write all my datas from my VC++ application to excel sheet.I wrote the code using c++.But the datas written in the excel sheet was not up to the expectation.
Can anyone suggest me a better way of writing the excel sheet from application.If possible with an exampl....
Thanks
gany
|
|
|
|
|
C++ Typelib tuto : http://www.codeproject.com/KB/wtl/WTLExcel.aspx
PS: You can made it without WTL, with minor modification...
A++
...
|
|
|
|
|
HI i m using visual studio 6.0 , not vc++.net
Rather i want to write a excel file....
|
|
|
|
|
If i remember effectively #import don't work with vc6 but there's an other way to generate typelib header... try "Ole/Com viewer" or MIDL in command line... i Don't remember exactely it's to old... or ask to some one that have VC7 or higher version and the same excel version to generate header for you (i use Office 2003 but it must be compatible with newer version), h file is store on : C:\Documents and Settings\xxxxxxx\Local Settings\Temp
This method allow you to made what you want with excel : read write xls file (without displaying excel interface), integrated excel on your application like ie made when you open an excel file on the web...
If you want to read or write file that can be read or write by excel the easy way is the csv file format...
A++
...
|
|
|
|
|
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
hi there,
i'm trying to get the window handle from the only window, when my windows is locked. it has the "Computer Locked" title, so first i tried FindWindow(NULL, "Computer Locked"), but nothing. then i tried GetWindow(GetDesktopWindow(), GW_HWNDFIRST), because it's the (hopefully) one and only active window on the locked screen. but nothing. and i also tried WindowFromPoint with the mid point of my screen, because the "computer locked" window is centered an the screen. but no luck at all.
sooo, anyone an idea or hint, how to get this _hard to get_ window handle?
regards
ps: google is also not giving any useful results
|
|
|
|
|
I would try using Spy++, which comes with visual studio (at least it did - I assume it still does with newer stuff than I have), and see if you can find your desired window.
Maybe it has a special window class name you can look for?
And even if it is the only application you can see, I bet there are a loads of top level windows you can't see. Most tray apps will have an invisible one for getting messages at the very least.
Iain.
|
|
|
|
|
Hi Iain,
How can we use SPY++ after the computer screen in locked??
Can you please elaborate.. I tried to get the window handle but no success
Thanks!!
Regards,
Sandip.
|
|
|
|
|
Krzysztof Gorgolewski wrote: ...so first i tried FindWindow(NULL, "Computer Locked"), but nothing.
What does that function return? If NULL , have you tried calling GetLastError() ? Are you sure that is the exact name of the window being sought?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Krzysztof Gorgolewski wrote: i'm trying to get the window handle from the only window, when my windows is locked.
So you want to get a handle to the window that is displayed when the user session is locked...
Why?
In order to do what?
From a technical aspect I doubt this is even possible, but here are my thoughts...
From that screen you can switch user through "Fast User Switching", which means that you create or active another desktop. This suggests to me that this window doesn't even belong to the session your application is running in and this is probably also why ::FindWindow() cannot find the window.
If you want to know when the session gets locked you can register for session notifications with WTSRegisterSessionNotification() and process the WM_WTSSESSION_CHANGE message.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
You pretty much don't. The security screen is on a different desktop (read up on Windows Desktop objects) which is completely inaccessible to normal code.
|
|
|
|
|
thanks for your thoughts.
hm... so it's not possible because of security reasons? not nice to hear...
i already got the message, when the screen/computer is locked (after the lock i'm changing the wallpaper and additionally wanted to move the f§%*$ng ... ehm ... nice "computer locked" window).
ok, GetLastError i will have to check later. and the thing with a different desktop was/is also in my mind. maybe it's possible to find/enumerate through the available desktops and have a look for my desired window (if the security allows it : )
so long
|
|
|
|
|
oh yes:
http://msdn.microsoft.com/en-us/library/ms682573(VS.85).aspx => "... Applications cannot access the Winlogon desktop ..."
maybe i can change the access rights for my "default" desktop/program somehow to get to this "winlogon" desktop's content?!?
criss
|
|
|
|
|
one more thought in the morning: once i used an application called Active Desktop Calendar. and it was displaying its calendar/todo/etc also on the locked screen.
soo that means, if this application is able to access the Winlogon desktop, why should i not be able?
regards
|
|
|
|
|
Does this[^] help?
Regards,
Sandip.
|
|
|
|
|
still i didn't had time to try anything new, but i let you know.
regards
|
|
|
|
|
I'm trying to get into SDK but I can't seem to find any tutorials for beginners, display a basic window, processing Windows Messages and such.
On MSDN there are sites with supposedly SDK and Windows UI samples, but they don't have any content.
I'd appreciate if you could link me to some beginner's SDK tutorials.
Also I'm not sure if I already have it or not, I installed Visual C++ Express 2008, does that already include SDK or do I need to install it separately?
Thanks.
|
|
|
|
|
Are you talking about Windows SDK, formerly known as Platform SDK? If yes then you have to install it separately and it comes with good documentation which can be integrated with MSDN.
-Saurabh
|
|
|
|