|
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;
}
|
|
|
|
|
All I can suggest is for you to step through your code AND STL (no matter how nightmarish it is) line by line. You are dereferencing a bad pointer; maybe you didn't allocate something, maybe a destructor is being called; maybe a copy constructor isn't doing what you think it's doing. It could be a myriad of things. (STL itself is likely not at fault, just how it's being used. It may not even be STL.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi to everyone reading this!
I have noticed a "strange" behavior with the Edit control.
|
|
|
|
|
Anonymous wrote:
I have noticed a "strange" behavior with the Edit control.
And that "strange behavior" would be what?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
lolol....
I find it strange to even have an answer to what i wrote because i accidentally pressed a button and what i was trying to write got add to the message board before even start writting anything....
But anyway today i wrote again the hall matter so u can find info about the strange behavior....
|
|
|
|
|
I've an application that use RichEdit. Right now, I want to add a functions that can let users choose different zooming factors like 50%, 100%, 200%, etc. like those work in winword. However, I've no idea how to start. Could any experts help me? Thanks!
BlueSimon
|
|
|
|
|
change the font and the window size according to the zoom settings
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.
|
|
|
|
|
Convert long to SYSTEMTIME
long day =24,mm =4,year =1976;
I need to convert day ,month,year to SYSTEMTIME.
How?
|
|
|
|
|
long day =24,mm =4,year =1976;<br />
SYSTEMTIME st;<br />
<br />
ZeroMemory(&st, sizeof(SYSTEMTIME));<br />
st.wYear = (WORD)year;<br />
st.wMonth = (WORD)mm;<br />
st.wDay = (WORD)day;
Best regards,
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
you mean, day,mm,year are stored in one long ?
asume year is stored in high word and day+month in low word:
systime.wDay= (BYTE)lDate; // low byte low word
systime.wMonth= (WORD)(lDate>>8)&0xFF; // hi byte
systime.wYear= (WORD)(lDate>>16)&0xFFFF; //hi word
you may change it depending on
sequence in which values are stored in long
|
|
|
|
|
Guys,
i want my program to read the username and password from an edit box (this is the easy part) in order to login to the msn (any version, say 6)..
is this possible?
|
|
|
|