|
Custom Command Routing for Different Views in SDI.
Hi all,
I have a Tree View and List View as a Splitter View. I have menus for both of them i want to implement Custum Command Routing both of the Views.
Please Help me out.
thanks and regards,
uday.
-- modified at 2:27 Tuesday 4th July, 2006
|
|
|
|
|
How can i delete a directory...?????
"Dream bigger...Do bigger...Expect smaller"
aji
|
|
|
|
|
use system(...) and run dos command rmdir using system(...)
Good luck
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
RemoveDirectory()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think this will work only if the directory is empty.
"Dream bigger...Do bigger...Expect smaller"
aji
|
|
|
|
|
see _rmdir function
whitesky
|
|
|
|
|
Yes this works only in case when the directory is empty. You will have to use the SHFileOperation which deletes the files recursively in a folder to first empty the directory and then Remove it.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
<br />
HANDLE hResource;<br />
LPCTSTR lpData;<br />
lpData = (const char*)L"Halo";<br />
<br />
hResource = BeginUpdateResource("Sample.exe", TRUE);<br />
if (NULL != hResource)<br />
{<br />
if (UpdateResource(hResource, <br />
RT_STRING, <br />
"IDS_TOTAL", <br />
MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US), <br />
(LPVOID)lpData, <br />
sizeof(lpData)) != FALSE)<br />
{<br />
EndUpdateResource(hResource, FALSE);<br />
}<br />
}<br />
I am trying to update a string resource in an executable named Sample.exe, IDS_TOTAL whose value is "Hi there" to "Halo". The resource is modified, but if I check the value updated in that executable, it is blank. Is there anything wrong in the above code?
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
I think instead of:
if(UpdateResource( ..., "IDS_TOTAL", ...) != FALSE)
you should consider:
if(UpdateResource( ..., MAKEINTRESOURCE(IDS_TOTAL), ...))
I hope this works.
|
|
|
|
|
you can see a article from Mr David Crow (i think was resource) of course maybe its not your answer but i think its good for you
whitesky
|
|
|
|
|
|
hi i want to write an application just like PC any where.just confused where to start. i had couple of ideas.
on is that capture the screen as bitmap and send it to another computer that will show it to the user.but dont know where the user had clicked on static bitmap and get all pts.any idea is welcomed
Tasleem Arif
|
|
|
|
|
Checkout http://ultravnc.sourceforge.net/[^].
This is an open source project wich has been very successful. I have been using it for several years now, and it works just fine, especially the latest Ultra version.
To be honest, I don't know why you would want to develop a new project for this, since Ultra VNC works very well.
Rilhas
|
|
|
|
|
ok i will check that.i want to write it bcos to gain knowledge and put some new feature as well.
thanks for the help.i had worked on windows hooks and transfer of bitmap but one problem hit me how to know that in which place of image one had clicked and on the basis of that open that folder/file on other side.
Tasleem Arif
|
|
|
|
|
Hello everyone!
Has anyone ever coded or seen a piece of code that does the exact same thing as the Beep() function in the Kernel32.dll file in the Windows NT family? Maybe some assembly code? I really need this, I really don't like being stuck to half a platform... (Not even a full one, since Win9x isn't supported).
Thanks!
PD: For those of you that don't know about the Beep() function, it takes 2 arguments: frequency (the frequency, if you set it to about 9999 or more, only the dog can hear it ) and duration (how much it lasts).
\|/ Thrift Store Floppy Collection \|/
(Server currently down due to mainteneance, aka comp not detecting monitor and acting weird)
|
|
|
|
|
|
No, I need to be able to specify the frequency and duration... Thanks!
\|/ Thrift Store Floppy Collection \|/
(Server currently down due to mainteneance, aka comp not detecting monitor and acting weird)
|
|
|
|
|
<br />
#include <dos.h><br />
void main()<br />
{<br />
sound(900);
delay(1000);
nosound();
}<br />
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
ltdos.h ? You sure you spelled that right? Google only yells out 2 results... If you are, for which compiler is that? Is it only for DOS? Anyways, thanks!
\|/ Thrift Store Floppy Collection \|/
(Server currently down due to mainteneance, aka comp not detecting monitor and acting weird)
|
|
|
|
|
It is dos.h not ltdos.h
Regards,
Brahmma
You have an apple and me too. We exchange those and We have an apple each.
You have an idea and me too. We exchange those and We have two ideas each.
|
|
|
|
|
Oh, I see - "<" is "<" in HTML!
Anyways, yeah, that's only for DOS...
Windows Calculator told me I will die at 28.
|
|
|
|
|
Hello everyone,
It is well known that DLL file can be used across different linkers, for example, a DLL created by VC can be linked with a VB application. In my context, I mean implicit linking.
I think without COM, there is no binary file standard. So, if there is no binary standard, how can a VB linker know which function it can invoke, which parameter it should provide and which address the invoked function resides (in order to invoke the function)? -- there must be some binary file level standard, right? besides COM?
I think this issues is solved by providing an accompany lib file with the DLL file in order to let other linker work with the DLL, but I am not sure about the internal reason. We know that an ordinary object file build by one compiler can not be used with other linkers -- but DLL overcomes this point -- because of the lib file?
thanks in advance,
George
|
|
|
|
|
The binary file standard is plain C, and the dll uses an ordinal table IIRC. Works pretty well as long as all you want is C. That's why if you examine, eg, GetProcAddress you do lookups with function names, and the returned pointers are untyped.
Problems with other things such as C++ -- hence the need for COM -- come from (1) no standard name mangling, (2)automatic memory management (allocate mem, constructors, destructors, etc) and needing to know the internals of the class structure, (3) the desire for strong versioning and strong interfaces, (4) exceptions handling (compiler specific again), (5) the fact that C++ isn't particularly object oriented at run time -- all sorts of places need to know the exact details of class layout, so it can't ever change. etc.
Grab a book by Don Cox called _Essential COM_
earl
|
|
|
|
|
Thank you earl,
Maybe I have not made myself understood enought. The purpose of my post is not to discuss COM, but to make clear why DLL can be used across linkers (for example, DLL created by VC can be linked in an VB application), while at the same time object file (which is generated by compiler) can not be used across linker (for example, we can not link an obj file generated by VC7 in a VC6 application). Since DLL and obj file are both binary files, why DLL can be used across linker but obj file can not? What is the internal reason?
regards,
George
|
|
|
|
|
DLLs can be used across linkers because everything you need to know is standardized while it isn't in obj files (and isn't in C++, which was the point of the latter bit of my post). You have an ordinal table to find function offsets (run dumpbin /exports on some dll). Combined with the lack of name mangling (at least usually) and the standard calling convention (put in place by __declspec(dllexport), the linker / run time knows what to do.
A dll may or may not have an import library around with automatic thunking code to fix up the lookup table, or you may have to do LoadLibrary / GetProcAddress. Either way, you're mapping function names to addresses.
I'd guess that an obj file is just a bunch of compiled code and the compiler keeps some internal table of function to address mappings (which is what is written to disk and shared via an ordinal table for dlls). In any case, non standard name mangling, various calling conventions, I don't believe (don't really know) that the standard requires any particular code layout, etc, mean they're compiler specific.
Basically, a dll is a bit of stuff added to an obj file to allow it to work across compilers.
HTH, and I'm tired, so it's bedtime.
earl
|
|
|
|