|
Where/how are you referencing msxml4.dll?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Thank you for your reply.
It is in my stdafx.h file but I have been looking for information and I have seen that it is provided as part of the operating system I think. I think my problem is that I am on Windows 2K so the version is not the one I am making a reference to. I have changed it now to msxml3.dll and it now builds. I wonder how easy it is now to upgrade to msxml4.dll. Is this just installing MS XML Parser 4.0?
|
|
|
|
|
Hi,
I would like to know if there is any function (while reusing the webBrowser control) that give me the ability to add headers in every request that makes my application using the webBrowser control.
I would appreciate any help..
Thanks in advance!
-Manos Moschous
|
|
|
|
|
why nobody answered in my question....???
please any help..??
Thanx
|
|
|
|
|
Can someone show me an example of how to use a critical section object, EnterCriticalSection, etc. Just a simple example is fine.
Jerry
|
|
|
|
|
read the SDK
Don't try it, just do it!
|
|
|
|
|
CRITICAL_SECTION m_criticalsection;
InitializeCriticalSection(&m_criticalsection);
EnterCriticalSection(&m_criticalsection);
..
..
LeaveCriticalSection(&m_crticalsection);
hope it makes sense
i can't even remember what my point is now, but anyway, i'm correct
Barring unforeseen acts of God and Adminstrators, my server will be up tomorrow. I'm more worried about the Adminstrators.
|
|
|
|
|
class CriticalSection
{
private :
CRITICAL_SECTION cs_ ;
public :
CriticalSection ()
{
::InitializeCriticalSection ( &cs_ ) ;
}
~CriticalSection ()
{
::UninitializeCriticalSection ( &cs_ ) ;
}
operator CRITICAL_SECTION* ()
{
return &cs_ ;
}
} ;
class CriticalSectionGuard
{
private :
CRITICAL_SECTION * pcs_ ;
public :
CriticalSectionGuard ( CRITICAL_SECTION * pcs ) : pcs_ ( pcs )
{
::EnterCriticalSection ( pcs_ ) ;
}
~CriticalSectionGuard ()
{
::LeaveCriticalSection ( pcs_ ) ;
}
} ;
class SharingSomeResource
{
private :
CriticalSection cs_ ;
...
public :
SomeMethodRequiringSynchronisation ()
{
CriticalSectionGuard csg ( cs_ ) ;
}
...
} ;
Above not compiled so probably rife with typos. Also not considered copy construction and operator=, as one ought. But should give the general idea.
Paul
|
|
|
|
|
Hi,
I have a child window that can only be sized by integral multiples of a given size.
I would like to have the parent window leave exactly enough room for the child window but cannot find a successfull way of doing it.
I have tried handling WM_WINDOWPOSCHANGING on the parent, resizing the child, and then getting the updated child dimensions, but that doesn't work as expected.
Any ideas?
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Try handling the WM_SIZING message of the parent. The LPARAM is a pointer to a RECT structure that you fill to represent the size of the window.
Inside the handler, once you determine the proper client size, try using the AdjustWindowRect API to set the RECT structure. I've never used the API myself so I'm not sure of the intricacies, I just came across it recently in MSDN.
From MSDN: "The AdjustWindowRect function calculates the required size of the window rectangle, based on the desired client-rectangle size."
It takes the window style and a menu-present flag as input. You may have to do some additional calculations if your window has toolbars.
Hope this helps. Sorry I'm not more familiar with the API, as I said, I just came across it last week, but it seems like a useful one in your case.
|
|
|
|
|
Hi,
Thanks for the ::AdjustWindowRect() API that I was not aware of. It makes things a little less clunky to actually calculate the required client area.
However, the problem doesn't lie in the calculation of the required client area. The problem is to actually update the size of the parent window by constraints on the size of the child window. Handling the WM_SIZING message as you suggest does not seem to work for me...
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Maxime Labelle wrote:
Handling the WM_SIZING message as you suggest does not seem to work for me...
What behavior are you seeing?
- Nothing happening
- Resizing to an unexpected size
- Moving to an unexpected location
- something else?
|
|
|
|
|
Is ResizeParentToFit() what you are after?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
You might also investigate: WM_WINDOWPOSCHANGING, CWnd::OnWindowPosChanging
|
|
|
|
|
I have a home network with two PCs. One PC has a modem connection to the Internet. The other computer connects using Internet Connection Sharing (ICS). Is there anyway that the gateway computer can determine whether the client PC has a connection to the internet.
I can determine whether the gateway computer has a connection to the internet using InternetGetConnectedState, but the flags returned are the same wther it is connected on its own or in conjunction with the other PC.
|
|
|
|
|
you can't.
Don't try it, just do it!
|
|
|
|
|
Their is an API just for ICS, however I was not able to get it working properly.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/intconnsharingfirewall.asp
ms-help://MS.VSCC/MS.MSDNVS/ics/ics_port_2fmt.htm
Jory
|
|
|
|
|
I am trying to use CRITICAL_SECTION for a resource that is shared in my application. I am not sure how to specify the shared resource. If I have a simple value Y...how would I specify it to be shared and initialize it using InitializeCriticalSection(&CriticalSection);
Thanks,
Jerry
|
|
|
|
|
misunderstood.....
the critical section does not protect a variable! you have to use it to do it by entering the cs every time you access the variable and leave it then. only one part of the app can enter the cs, so other threads have to wait.
Don't try it, just do it!
|
|
|
|
|
Hello,
Can anyone help me to understand the following error I get while running my program:
" This instruction at "0x10213035" referenced memory at "0x00000065". The memory could not be read.
Click on OK to terminate the program"
and
" This instruction at "0x102125fe" referenced memory at "0x00000092". The memory could not be written.
Click on OK to terminate the program".
lvidot
|
|
|
|
|
your info is very interesting, but there is just one little problem... WHAT ABOUT DETAILED INFORMATION!?!?
Don't try it, just do it!
|
|
|
|
|
the structure representing different feature points on a face, which is extracted from a video frame.
struct Face
{
int Mouth;
int Eye;
int nose
int FrameNo;
};
When I press the Apply button on my FormView, it save my Structure to my vector called 'Feat'.
This is save function the save structure to the vector:
Please note that I need to save(push) several Face structure in the vector.
that is each time I press the Apply button, I need to push a different set of Face to the vector:
void saveFeatures (std::vector < Face > & Feat)
{
Feat.push_back(FaceFeat);
return;
}
I manage to save the first frame, but when I try to save another frame I get the following error.
" This instruction at "0x102125fe" referenced memory at "0x00000092". The memory could not be written.
Click on OK to terminate the program".
lvidot
|
|
|
|
|
Seems like you are accessing memory addresses that are not allocated.
Try hitting the debug button when this happens, or run it under the debugger, and you get the call stack.
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
In Win32, you cannot address the lowest 64k of memory. (0x00000000-0x0000ffff.) (Kernel objects, like drivers, cannot address the highest 64k of memory: 0xffff0000-0xffffffff.) This causes an exception when dereferencing a NULL pointer and when using an indexed NULL pointer.
In other words if char* pBuffer were NULL, *pBuffer and pBuffer[0x65] would throw memory exceptions. I suspect the errors you are seeing are the latter.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
This is save function that save the structure to the vector:
Please note that I need to save(push) several Face structure in the vector.
that is each time I press the Apply button, I need to push a different set of Face to the vector:
code:--------------------------------------------------------------------------------
void CFeature::saveFeatures (std::vector < Face > & Feat)
{
Feat.push_back(FaceFeat);
return;
}
--------------------------------------------------------------------------------
Then I have a button (Saveft) on my FormView to save the Vector to a file:
code:--------------------------------------------------------------------------------
void CFeature::OnSaveft()
{
CMFFADoc* pDoc = GetDocument();
// Synchronize all other views
pDoc->UpdateAllViews( this );
WriteFaceVector(ftname , Feat);
}
--------------------------------------------------------------------------------
This function write the vector to the file.
I'm taking info (Structure) from a video file(.vid) and save them in a new file with the same name as the video file but with (.fea) ext:
code:--------------------------------------------------------------------------------
bool CFeature::WriteFaceVector( char * ftname , const vector<face> & v)
{
m_FtFileName = VC.m_VidFileName;
//Need to convert file name from CString to Char*
ftname = m_FtFileName.GetBuffer(m_FtFileName.GetLength());
char* pos;
pos = strrchr(ftname,'.');//Find the ext
*(pos+1) = 0;
strcat(ftname,"fea"); //Create new ext
ofstream m_FeatureFile(ftname,ios::binary);
if (!m_FeatureFile) return false;
std::vector<face>::size_type size(v.size());
m_FeatureFile.write(reinterpret_cast<const char*="">(&size), sizeof (std::vector<face>::size_type));
for(std::vector<face>::size_type i =0; i < size; ++i)
{
if(0 != size)
m_FeatureFile.write(reinterpret_cast<const char*="">(&v[i]), size * sizeof (Face));
}
return true;
}
|
|
|
|