|
hehe
After adding a new menu resource it's ID is IDR_MENU1. If I select the menu in the Resource Tree I can change the ID (Name) in the Properties window.
Not sure that is what you are looking for.
led mike
|
|
|
|
|
Any WinCE mfc developers around?
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
My son's PDA is an M249 SAW.
My other son commutes in an M1A2 Abrams
|
|
|
|
|
I have a legacy system that I want to add a new dialog to. Whenever I create the new dialog through the resource tab, it creates my .H file in the 'externals' directory. Even if I move it from the exeternals directory to it's normal place with the .CPP, I still get errors that it can't find the IDD_DIALOG even though I have included the resource.h header file. Anyone have any clues as to what is happening? This is drivig me crazy! BTW, this is VC++ 6.0
Thanks
John P.
|
|
|
|
|
Try to find the IDD_DIALOG in resource.h
may be it not automatic add into resource.h
|
|
|
|
|
I'm hosting web browser control in my MFC dialog application (modified di lascia's CHtmlCtrl).
I need to Navigate to some url and wait for browser to complete and after this do some actions.
I'm using this code:
m_html.Navigate(url);
MSHTML::IHTMLDocument2Ptr doc;
doc = m_html.GetHtmlDocument();
while(1)
{
if (!_tcsicmp(doc->readyState,"complete"))
break;
Sleep(200);
}
but it never break the loop. I think it's because IE is in the same thread and
I have to precess it's messages or something. How to solve this?
I've tried to implement some GetMessage/dispatch message calls in my loop but it didn't work.
I cannot wait for OnDocumentComplete message because I need to run some function with multiple navigations, waiting and DOM processing.
Anybody have experienced this? Is it normal IE behaviour or am I missing something?
Thank you.
rrrado
|
|
|
|
|
rrrado wrote: I cannot wait for OnDocumentComplete message because I need to run some function with multiple navigations, waiting and DOM processing.
Using OnDocumentComplete is the correct way to do what you need. I don't understand your stated reason that you cannot use it.
led mike
|
|
|
|
|
I need to do something like this
start:
Navigate()
Wait()
parse page, decide what to do
goto start
the OnDocComplete handler cannot jump back to my function (using also some local variables) and continue.
rrrado
|
|
|
|
|
rrrado wrote: goto start
Your problem is you are using arcane design and code structure. Learn some modern development techniques like Object Oriented Design. In there you will find the solution to your problem.
led mike
|
|
|
|
|
This is very rough pseudo code. I don't really use goto but there are nested loops and relatively compicated alghoritm implemented in my function so I'd like to keep it as it is without adding some unneccessary synchronisation frameworks (only because of implementation details of IE) which would break readibility of the code. As response to OnDocumentComplete I could only post some messages to my dialog which would be running some pieces od alghoritm and I would also need many member variables to keep state of the function. This would make my code very complicated.
Ok I'll figure something out I just hoped I'll get some tips.
rrrado
|
|
|
|
|
ODC can post a message back to your view window, or set an event, or set a flag, etc. to tell the view that navigation is complete and something else needs to happen.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
The WebBrowser is an ActiveX control and so you should be running message pump as opposed to calling Sleep . As another poster mentioned, the DocumentComplete event will be fired when the page loading is complete.
Steve
|
|
|
|
|
I have a static lib that we no longer can find the source code for. We want to continue to use the library, but have problems with it in the context of Visual Studio 2005. It uses I/O routines that are no longer supported. I would like to build a mini DLL around this library exposing the functions from the library that we use, but I'm not sure how to do this. I have a static library and an include file that contains export statements for the library. I thought about using dumpbin to get the symbols out of the library, but there are a lot of symbols and I'm not sure what out of the symbols I'm suppose to pull for a .def file.
Any one have ideas?
Mike
|
|
|
|
|
wrote: I have a static library and an include file that contains export statements for the library. I thought about using dumpbin to get the symbols out of the library, but there are a lot of symbols and I'm not sure what out of the symbols I'm suppose to pull for a .def file.
you only need the names (and declarations) of the functions and variables you're going to actually use.... right ?
|
|
|
|
|
Correct. The static library is already in use and could be used as is in Visual Studio 6.0. However, with changes made in Visual Studio 2003 and above to remove the _io routines, I can no longer link the static libary directly into VS2005. To solve this I assume that I can create a wrapper DLL/import lib on top of the static lib using Visual Studio 6.0, but I'm not sure I understand what I need to do to accomplish this. I only wish to expose the functions that I use. There are about 40 of them.
Mike
|
|
|
|
|
here's how i usually do it:
first, create a "DLL that exports some symbols" project in VC6.
for each function you want to export from the DLL, write a function that goes like this:
Whatever_API_return_Type MyDLLFunction1(params)
{
return MyLibFunction1(params);
}
Whatever_API return_Type MyDLLFunction2(params)
{
return MyLibFunction2(params);
}
etc.
then write headers for those functions:
_Whatever_API return_Type MyDLLFunction1(params);
_Whatever_API return_Type MyDLLFunction2(params);
...
_Whatever_API return_Type MyDLLFunction40(params);
build the DLL, being sure to set the proper #define flag to turn on function exporting (see the main header file for your DLL project).
then replace all your MyLibFunction* calls with the corresponding MyDLLFunction* call. link to the DLL's static lib, and that's that...
|
|
|
|
|
I was trying to avoid this, because I wanted to preserve the function names. However, this seems like a reasonable workflow, I will just cross my fingers that these functions are not used all over the place. Thanks for your help.
Mike
|
|
|
|
|
Hi
I know that there are some products that convert DLL to lib, but in your case I think you rigth with your idea.
The steps could be the following:
1. Build a new dll project in vs2005.
2. In your stdafx.cpp add #pragma comment(lib,"mylib.lib")
3. Include your .lib header file in the project.
4. Declare the new functions, maybe with new names.
I expect this steps help you
Regards
David Leyva
|
|
|
|
|
Hi friends .
How possible deleting some char from middle of a very large file ?
thanks a'lot .
|
|
|
|
|
Copy the bytes from the file, up to the byte in question, into a temporary file. Then copy the remainder of the file into the temporary file. Close both files. Delete the original file. Rename the temporary file. Make sense?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Copy the bytes from the file, up to the byte in question, into a temporary file. Then copy the remainder of the file into the temporary file. Close both files. Delete the original file. Rename the temporary file. Make sense?
Yes, it's even safer than an 'in place' solution.
(BTW, I'm not 'A_Fa')
|
|
|
|
|
hi friends
Can i can Windiws Handle(HWND) from ProcessID ?
thanks in Advance
|
|
|
|
|
I don't know a direct way.
As workaround, you may enumerate windows and call GetWindowThreadProcessId in your callback.
hope that helps
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
A process can have many windows. Can you be more specific?
Steve
|
|
|
|
|
yes , i can give specifi ProcessId
|
|
|
|
|
I don't think you understood me properly. A process ID represents a process. A process can have many windows, and generally does. Which of the process’s many windows are you after?
Steve
|
|
|
|