|
In my MFC MDI app, I switch views. The views merely switch, they dont get recreated, so OnInitialUpdate doesnt run each time y ou switch. In View1 I have a top level menu item "User Choices" . INitially when clicked, it says nothing selected. I now go to view 2. I get information from the user in View 2, then I switch. By the time I get back to View 1, I want View 1 to have the menu ITem "User Choices" to be populated. So now when the user clicks it, a submenu drops down. Each submenu item then has its own flyout menu. WHen the user goes back to View 2 and makes new choices and returns, the menu should now have the new stuff in it.
SO should I send a message which runs a function in View 1 which then magically creates the menu using the info I gathered in View 2 and stored in a doc variable?
How do I destroy the old menu choices , so that the new ones get filled in on return to view1? In case the user cancels from View2, View 1 should retain the previous choices.
Appreciate your help,
ns
|
|
|
|
|
Anyone who knows if the file oledblob.h is avalible for the Visual Studio .NET enviroment?
(oledblob.h is an OLE DB consumer class dealing with updating and inserting blob data)
|
|
|
|
|
Is there away for an executable to modify itself, for example append data at the end of the executable or modify some internal data.
Thanks
|
|
|
|
|
If you can get to modify the flags for file opening (I mean getting rid of the flag "file in use so i cannot modify it"), you may do something like that. But it's hot stuff. What do you want to do ? A virus or something ? Anyway, there have to be a better solution to your problem than directly modifying the .exe
~RaGE();
|
|
|
|
|
Please could someone provide me with a working sample of using UpdateResource on the string table of an external exe app. Ive read several articles from MSDN in regards to string table blocks containing 16 strings etc, and allocation of the string, however no matter what i try i always seem to either overwrite the entire string block table or create an entirely new one.
My goal is to update a single string item within the string table with the contents of a user entered string.
Any help would be much appreciated.
Thanks
zebbedi
|
|
|
|
|
Hello,
I have the following code to pull HTML data from a website.. Everything works fine except that I have a small memory leak.. can someone tell me why there is a memory leak in CStdioFile..
here is the dump of the memory leak
Detected memory leaks!
Dumping objects ->
{44} client block at 0x00D226A0, subtype 0, 20 bytes long.
a CStdioFile object at $00D226A0, 20 bytes long
Object dump complete.
LPSTR url = "http://www.codeproject.com";
LPSTR filename = "C:\\codeproject.txt";
int numbytes;
char httpbuff[2048];
CInternetSession mysession;
CFile* myfile = new CFile();
CStdioFile* remotefile = new CStdioFile();
remotefile = mysession.OpenURL(url,
1,
INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);
myfile->Open(filename,
CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
while (numbytes = remotefile->Read(httpbuff, 2048))
myfile->Write(httpbuff, numbytes);
myfile->Close();
remotefile->Close();
delete myfile;
delete remotefile;
Rob
|
|
|
|
|
you don't need this
RobJones wrote:
CStdioFile* remotefile = new CStdioFile();
because
RobJones wrote:
mysession.OpenURL(url, 1, INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);
returns a CStdioFile pointer
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
If I do a ...
CStdioFile* remotefile = mysession.OpenURL(url, 1, INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);
I still have a memory leak...
|
|
|
|
|
you still need to delete the remotefile pointer
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Ahhhhhh.. Ok thanks.. that fixed it
Thanks,
Rob
|
|
|
|
|
I'm looking for some code examples for using SCP to transfer files. I'm going to throw together a dialog for browsing remote directories using SCP [basic version of WinSCP[^]] if a MFC one doesn't already exist out there as I'll need this feature in a project I'll do in the near future.
I was just wondering if anybody knows of something similar or if it's been implemented elsewhere. I can't seem to find anything but I'm probably just being blind and it's probably right under my nose.
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
You can't really browse anything with scp AFAIK. You can only do transfers.
But here's a link to PuTTY which is a set of ssh-tools for windows. Sources are available. http://www.chiark.greenend.org.uk/~sgtatham/putty/[^]
--
Eventhough the forrest is full of trees, there's still no tree between the trees.
|
|
|
|
|
Jörgen Sigvardsson wrote:
You can't really browse anything with scp AFAIK. You can only do transfers.
But here's a link to PuTTY which is a set of ssh-tools for windows. Sources are available.
Yep... I was going to use the putty code to help with browsing etc. Have it for a while now.. Just need to get some time to have a look at it.
Thanks Jörgen
Regards,
Brian Dela
Run naked in the snow until you're sweating like a stuck pig and can't seem to catch your breath. When the flu becomes pneumonia, they can cure that with a shot. - Roger Wright
|
|
|
|
|
Hi All,
I have an app that uses splitter windows. How can I get the size of a pane in the splitter? Can I just use CsplitterClass->GetRect(&rect) ??
Problem is how do I get the handle for the that pane. any suggestions?
Thank you.
Dan Willis
|
|
|
|
|
Never mind. It was a simple solution once I thought about it for a moment. LOL. Thanks anyways.
Dan Willis
|
|
|
|
|
Hi all,
does anyone know a tool to create a Class-Graph out of the Source-Code of a VC++ 6 project? I need to show up all the references to a class.
It also would help a lot if it lists all references in a textfile. Then I can draw the Class-Graph myself.
Thanks.
--
karl
|
|
|
|
|
have a look at Doxygen, it does not offer a graphical graph, but it shows you this;
maybe with the DOT (GraphViz extension) it can do it. I was about to try it this week.
Max.
|
|
|
|
|
Hi, everyone!
I want to know where does the precomplier directive
__Win32__ defined? Defined in the compiler?
Another question, is it C/C++ standard or is it
only defined in Microsoft Visual C++ compiler?
Thanks in advance,
George
|
|
|
|
|
As far as I know __Win32__ is not standard define. I think it is specific to your project. WIN32 on another hand usually defined through compiler settings, or like in case of "ole2.h" in some header. As for the second part - Windows unfortunately is not part of C++ standard, so there is no way WIN32 could be there.
|
|
|
|
|
Thanks, AlexO pal!
Is there a C/C++ standard precompile directive that
can be used to identify on which OS the project is
compiled.
Thanks in advance,
George
|
|
|
|
|
Correction _WIN32 (according to MSDN) is the macro defined by VC compiler. It could be used to id the compiler/target for portable code
|
|
|
|
|
Thanks, AlexO pal!
George
|
|
|
|
|
_WIN32 is defined by the compiler automatically when you do a compile for a WIN32 application.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks, Smith.
Do you mean _WIN32 or __Win32__?
Thanks in advance,
George
|
|
|
|
|
I can find no reference to a __Win32__. However, looking at STLPort, _WIN32, __WIN32, WIN32, and __WIN32__ were generated at different points by different compilers.
Currenty, only _WIN32 is defined by the compiler.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|