|
What exactly is your question ... ??
|
|
|
|
|
Sorry, if the question is unclear, Just to reiterate, in short what "address mapping" means and does my previous assumption about it right.
|
|
|
|
|
Your assumption is correct. This is what happens when an executable calls a function from a DLL directly.
With "GetProcAddress()", the DLL is loaded to memory (and mapped to addresses) when you call "LoadLibrary()". After the DLL is mapped, the call to "GetProcAddress()" will return the address that is mapped to that specific function.
Hope this answers your question ...
|
|
|
|
|
Thanks for the reply, So, there's a address translation involved. From exe address space to the dll address space. I wonder is there any "official" reference?
|
|
|
|
|
Hi
Can anyone answer
What are the steps/procedure to convert and SDI application to MDI
Thanks
|
|
|
|
|
Personaly, I would create a new (MDI) project and copy in the relevant parts from the old project.
This is because it is not so straight-forward to convert a project from SDI to MDI.
You need to:
1. Change your CMainFrame class so that is derives from CMDIFrameWnd and not CFrameWnd.
2. Create a CChildFrame class that derives from CMDIChildWnd.
3. Assuming you're using Document/View architecture, you'll need to modify your CSingleDocTemplate to CMultiDocTemplate.
4. A few more little stuff that I can't really think of right now ...
Hope this helps ...
|
|
|
|
|
Hello,
If I have my base class files in one directory say e:\base where I have a .cpp file of the name tableframe.cpp
In the tableframe.cpp I want to include a .h file of the name MainFrm.h from the project directory say e:\planning then how do I include it. because when I try to include MainFrm.h in TableFrame.cpp I get complie error file not found.
I think the compiler is searching in the base directory.
How do I divert it to the project directory planning.
Prithaa
|
|
|
|
|
Did you insert path to Additional Include Directories on the Property of your project.
Right click on the project and select Property and on the C/C++ enter path to Additional Include Directories
|
|
|
|
|
Or, you could enter
#include "..\planning\MainFrm.h"
instead, which would tell the compiler that the include file is in e:\planning rather than e:\base
This would be more efficient if it was just this include file that is located in e:\planning. If you have lots of include files in e:\planning, it would be more efficient to use the method described by "WhiteSky".
hope this helps!
--PerspX
|
|
|
|
|
Hello,
Thanks for your replies
Prithaa
|
|
|
|
|
I have completely forgotton how to do this. I want to grab a single word from anywhere on the screen ie. not limited to my applications window. Many moons ago I found a project on sourceforge that had this ability but have since lost the link and forgotton the name. Hope somebody could put me back on track.
|
|
|
|
|
|
It's close to what I want, but that snippet retrieves the whole text, I need to retrieve the individual word.
|
|
|
|
|
Hi,
The following is the code block in one of my function>
Analysis* pOap = new Analysis(szTemp);
if(pOap)
{ // get the analysis header from the LCQ file.
if(!pOap->Open((const char*)szTemp,FileWriteMode))
}
On executing Open statement i am getting the following error.
tcscpy_s.inl
line:18
Expression _Dst)!= NULL && ((_SizeinBytes))>0
What could be the error?
Any help is appreciated.
Regards
|
|
|
|
|
What does the constructor of Analysis do with szTemp ?
Could it be that the constructor deletes (frees) this pointer ?
|
|
|
|
|
Here,I create a object(CWnd subclass) successfully,but it could not or should not be display on its parent object's client area,So I must destroy it but leave its parent works well(but can not use this object)?
BEST REGARDS
|
|
|
|
|
?????
If you need a new window without parent, add a new view and make a new frame. Then you can switch between them and use them independantly.
And about your question... what are you asking for?
To destroy the window. From VC++ Help:
CWnd::DestroyWindow
virtual BOOL DestroyWindow( );
Return Value: Nonzero if the window is destroyed; otherwise 0.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
What I want is to destroy a childwnd of a Dialog(for example),because the child has been created successfully,but because some reason it could not be draw and show,so,if it exist remainly,it would result a exception when its parent and other elements is about to be draw.
So,all the thing I want to do is destroy a child window before its parent would be drawn.
Thanks.
Best Regards
|
|
|
|
|
kcynic wrote: I want to do is destroy a child window before its parent would be drawn.
Why create the child window if you want to destroy it before the parent is drawn?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I am sorry I did not explain it clearly.
The child window should be destroyed because it has some initialization did not be done successfully although it was create successfully.
So I must destroy it ,otherwise ,there would be an exception when its parent is about to be drawn.
GOOD LUCK
|
|
|
|
|
CWnd::DestroyWindow() takes care of destroying the HWND associated with the CWnd.
If you want to wait until initialization of the child window succeeds/fails before showing the
child window then create the child without the WS_VISIBLE style. If initialization succeeds call
ShowWindow(SW_SHOW). If it fails, maybe post a message to the parent and let the parent use
DestroyWindow() to destroy the child and also free the CWnd-derived object as well.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Yes,it works well,now.Thanks
|
|
|
|
|
Hi all
I am trying to learn few things like
- remote network management using VC++ . How to manage network elements like routers, masks LAN groups ? (Does WMI provide any classes for it ? I searched Win32 classes and found no reference to such things but I can see more monitoring classes. If not WMI what else gives us the facility ?)
- remote management using WMI . I would like to create/remove user accounts on remote PCs , create/delete folders etc.
Any ideas pls ?
redindian
|
|
|
|
|
|
Hi all.
I have problem wen I try to start process, wen I write:
<br />
try<br />
{<br />
STARTUPINFO lpStartupInfo;<br />
PROCESS_INFORMATION lpProcessInformation;<br />
<br />
memset(&lpStartupInfo,0,sizeof(STARTUPINFO));<br />
lpStartupInfo.cb = sizeof(lpStartupInfo);<br />
<br />
CreateProcess(<br />
L"C:\\vaxo\\My.exe",<br />
NULL,<br />
NULL,<br />
NULL,<br />
FALSE,<br />
CREATE_NEW_CONSOLE,<br />
NULL,<br />
NULL,<br />
LPSTARTUPINFO lpStartupInfo,<br />
LPPROCESS_INFORMATION lpProcessInformation<br />
);<br />
}<br />
<br />
catch()<br />
{<br />
}<br />
<br />
in this code my program starts new process, but if I try to set console string I get some debag error:
"Unhandled exception at 0x77e4ae84 in Process.exe: 0xC0000005: Access violation writing location 0x00418312."
Console string is "C:\\vaxo\\My.exe", I try "C:\vaxo\My.exe", but I stile get this error message
|
|
|
|