|
Thanks,
Rob
|
|
|
|
|
Hi,
I'm developing an application using the Doc/view. I have several different views of the document which I want to display. This is being acheived by using, surprise, static splitter windows. the catch is that I need to be able to change the configuration of the splitter windows depending on what the user wants. For example:
splitter 1
-----------------
- view 1 -
-----------------
- view 2 -
-----------------
But now the user wants to see another view like this:
-----------------
- view 1 -
-----------------
- view2 - view3 -
-----------------
I know how to set up views, but my problem is how do I destroy these views and re-create them in the new format that I need to? I tried to change the number of rows/columns then re-create the views, but I can't add any more rows or columns once the first splitter is created, but I can't figure out how to delete that original splitter and then re-create the whole package. Any ideas?
|
|
|
|
|
|
hi everybody!
Is there any functions in ODBC or any other library that dealing with adding escape characters to the sql input string that contains single quote characters? btw, i'm using msaccess database with my vc++ program.. do you use single quote or escape character to escape the single quote in the sql input string?
e.g.
original sql string: insert into table1(test) values('it's here')
after adding the escape character: insert into table1(test) values('it''s here')
|
|
|
|
|
Good day!
I have a crash in release when changing tab in the CTabCtrl.
and while writing the message, that I mostly delete, I fixed it ...
Anyway, for those who want to know ...
I had this :
ON_NOTIFY(TCN_SELCHANGE, IDC_TABCONTROLLER, OnTabSelChange)
and I had this :
void MyPanelParent::OnTabSelChange( )
{
}
but the real definition is :
void MyPanelParent::OnTabSelChange(NMHDR* pNMHDR, LRESULT* pResult)
{
}
Anyway, all is well now, move along ...
Max.
|
|
|
|
|
Years later i have come down to this stupid problem, thanks you saved me from many lost hours more.
|
|
|
|
|
How can I dissect an .exe to view its contents? The IDE of Visual C++.NET does not allow these file types to be opened. I opened one using the edit program from the dos command prompt, but it was just a bunch of symbols and letters. So I guess my question should be what do I do to view an .exe in a legible form?
|
|
|
|
|
What do you want to view specifically?
You can view things like the import and export tables, the resources and other information like that with a PE viewer. You can find one in MSDN by Matt Peitrek.
However, if you want to look at the actual code for the EXE you cant do that. You will need a reverse compiler, and they are not all that great.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Paul Watt wrote:
You will need a reverse compiler, and they are not all that great.
Nor are they all that legal in some areas. However I'm guessing Mr Anonymous doesn't care since he wants to steal someone's code.
|
|
|
|
|
Mark Nischalke wrote:
However I'm guessing Mr Anonymous doesn't care since he wants to steal someone's code.
Yeah, but what would he do with it ? He's obviously dumb enough to expect an exe just to be all the source files joined together.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Why does Mr. Anonymous have to be trying to steal someone's code. Why can't he just be learning through example. Or maybe he wanted to see how wrappers are utilized. There are hundreds of possibilities, but it would take a critic to only see the negative ones.
|
|
|
|
|
The IDE does let you open an EXE to view it's resources, at least.
Software Zen: delete this;
|
|
|
|
|
You can try dumpbin. It will display quite a bit of information, including disassembly.
It's a good tool for learning what is inside an EXE.
Jason Shirk
VC++ Compiler Team
|
|
|
|
|
Hello,
I would like to create a utility that automatically moves MP3 files around and creates directories or deletes them based on my criteria. What is the preferred MFC functions to use for copying, renaming, deleting, and moving both files and directories? ("Directory" is a difficult search word because it results in everything dealing with MFC installation, not directory manipulation).
Thanks!
JennyP
|
|
|
|
|
CopyFile(Ex), MoveFile(Ex), DeleteFile
Search for File Management Functions
|
|
|
|
|
SHFileOperation is also a good choice !
Max.
|
|
|
|
|
I'm trying to print the file using ShellExecuteEx()
but for some of the files need file's associate .exe to set before ShellExecuteEx() get called.
So I want to set the fiel associate .exe ( same as "open with") programmatically.
So I search...
I found out I can set the registry as
[code]
Use the Registry functions to access the registry.
HKEY_CLASSES_ROOT\.ext\(Default) contains the type of file you are looking for. Then accessing
HKEY_CLASSES_ROOT\fileinfo\Shell\Open\Command\(Def
ault) where fileinfo is the value that was specified in the first registry key I mentioned.
[/code]
but I don't know where to get HKEY_CLASSES_ROOT..
I don't know how and where to set HKEY_CLASSES_ROOT
I also used [code]
CString finename = "abc.txt";
CString path = "C:\";
LPTSTR fn = (LPTSTR)(const char*)filename;
LPTSTR p = (LPTSTR)(const char*)path;
LPTSTR r;
::FindExecutable(fn,p,r);[/code]
but I got run time error at FindExecutable()..
Lets say, if FindExecutable is returning r, (in this case r = "c:\program files\notepad.exe", which contains the file name with Rath name... ,, then what should I do... what if r is empty...???
Thanks
|
|
|
|
|
If you are using ShellExecuteEx , then it handles finding the associated application for you. Just specify the name of the document and set the verb to "print". If the document has an associated application, and the application supports the print verb, that should do it.
Software Zen: delete this;
|
|
|
|
|
I know about it.. but what if the documents doesn't have associated applicaiton, print verb??
How can I set the associated application programatically??
|
|
|
|
|
If the document type does not have an associated application, then you need to do one of two things, both of which require the same information.
First, you could create an association for the document type. This requires that you know the path to the application and the command line syntax used for printing. You must also create the association in the registry.
On the other hand, since you know the path to the application and the command line syntax for printing, you could simply use CreateProcess and run the application directly. This is easier than the first approach, since you don't have to mess with the registry and establish the association.
If you don't know the path to the application, or you don't know the application's command line syntax for printing, then neither of these approaches will work.
Software Zen: delete this;
|
|
|
|
|
Thanks for your reply Gary. I was looking for information to do so... and found out that I have to used RegOpenkey()..something like that. but don't really have the idea of using it..
Would you please tell me how to create the asociation in the registry?
|
|
|
|
|
|
I don't use WinAmp, but I have seen screen grabs of some of the skins for it. The thing that catches my eye is the reflective screen does not get lost by drawing the text/controls that are supposed to be beneath it. Is this done by using something like AlphaBlend()? Maybe WinAmp requires DirectX? Any ideas what they are using to implement the drawing? I'm not talking about creating my own skin for WinAmp - I'm talking about the code used to implement the skinning.
|
|
|
|
|
I've never done this, but don't you think that would be easier to make all the controls owner drawn and that all those controls load the images that must show from one/some external and easy configurable resource file?
|
|
|
|
|
Thanks for the reply,
Skinning applications usually ask you to provide a series of image files, and a configuration file (.ini) that helps the program put them all together.
The most interesting part for me is the actual code used to take the static image (somtimes looks like a LCD screen depending on the skin), and draw dynamic text, images to make it look as though they are beneath this static image. There must be some kind of blending happening, but I don't know what they are using to do this.
|
|
|
|