|
This tells us which function called the latest one right? What then?
I think I need to learn about what the call stack tells us. Any pointers to some goood info on what the call stack reveals, and how to use it?
Thanks,
ns
|
|
|
|
|
ns wrote:
This tells us which function called the latest one right?
Call stack shows all stack trace. Just open the window in VC and you'll immediately get the concept. You may set the debugger context for each function displayed and check local variables.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Just to add to Tomasz's note, you can also navigate to any frame of the stack (by selecting the frame from the combo box). By doing so, you can examine local vars in the previous frames. This is very handy for finding out why your program crashed, since the problem may have actually occured "n" functions before the one that crashed (eg: a NULL pointer being passed to a function that expected a non-NULL one). As usual, ASSERTs help identify these problems early on. Good luck!
PS: Have a safe round-trip. I'm off to NYC to visit friends for the weekend. Might jam with them[^] if I get there in time!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ok, this one has me stumped (I'm sure you guys are going to be laughing soon ), if you create a new MFC exe and drag a rich edit control onto your form (dialog based app.), hit the build button everything compiles fine, however when I hit the execute program button the form doesn't appear, nothing happens at all. What little thing did I miss here?
Nick Parker
|
|
|
|
|
Nick Parker wrote:
What little thing did I miss here?
AfxInitRichEdit before your dialog is shown.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
Check to see the if the visible property of the dialog and/or controls are set to true.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
are you calling AfxInitRichEdit(); in you CWinApp InitInstance ?
you should
-c
Though the cough, hough and hiccough so unsought would plough me through,
enough that I o'er life's dark lough my thorough course pursue.
--Stuart Kidd
|
|
|
|
|
Anywhere in particular, this is what mine looks like which I assume is pretty plain for a new application. I am guessing that I should call it before dlg.DoModal(); or before CFileViewerDlg dlg; is called, does it matter?
BOOL CFileViewerApp::InitInstance()
{
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CFileViewerDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
Nick Parker
|
|
|
|
|
I placed it right before CFileViewerDlg dlg; and everything showed up. Thanks again Chris
Nick Parker
|
|
|
|
|
AfxInitRichEdit(); you have to put this line into your apps initinstance.
|
|
|
|
|
Is there a complete listing the all VC++ data types and their definitions. I am going through the Programming Windows with MFC book and it is a little pain (until I memorize them) looking some of these types up that I don't recognize as I go through the book.
Example:
--------------------------------------
DWORD --- 32 bit unsigned integer
Nick Parker
|
|
|
|
|
|
Thanks Tomasz, that's exactly what I was looking for.
Nick Parker
|
|
|
|
|
Could someone explain to me how
BYTE buffer[0x1000];
Constitutes a 4kb buffer? I know this sounds stupid but what I don't understand right now is the 0x1000 portion, everything else makes sense. Thanks in advance.
Nick Parker
|
|
|
|
|
0x1000 is a hex number (base 16). and, it just happens to equal 4096 in decimal.
-c
Though the cough, hough and hiccough so unsought would plough me through,
enough that I o'er life's dark lough my thorough course pursue.
--Stuart Kidd
|
|
|
|
|
|
Open up Calculator
View Scientific
Click on Hex
Punch in 1000
Click on Dec
Answer = 4096
Todd Smith
|
|
|
|
|
Hi guys, I'm new on windows programming so I'm seeking a little bit help here regarding to ::SendMessage API.
<br />
LRESULT SendMessage(<br />
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
The first two parameters are clear and good, but the 3rd and 4th? MSDN says they both "Specifies additional message-specific information", so it's confusing, why there are two if they do exactly the same thing?
Also is there any documents I can find that gives some details on the format/contents of wParam/lParam? For example if I wanna send a key-down message "alt + ctrl + f3", what should be the wParam/lParam value? I just cannot find any explicit explanation from MSDN.
Any help are appreciated.
|
|
|
|
|
The meaning of wParam and lParam depends on value of 2nd argument. Each WM_xxx message is documented with description of what wParam and lParam mean.
Tomasz Sowinski -- http://www.shooltz.com
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
|
|
|
|
|
In Windows 2000 and XP, how do you check if the user logged in has access to write to a certain directory... this must be done withOUT writing a file because it is being used in a TreeCtrl browser. Any help is appreciated.
<><><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
Try the GetFileSecurity function
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
|
|
|
|
|
Hi!
I have a windows 2000 computer with exchange on it.
I need to block the port 25 and replace it with another(any non useful)
Can I do it through exchange or windows?
If not, what can I do!?
Thanks!
Coding is a family business
|
|
|
|
|
You could always buy a router. this allows you to block or redirect ports to specific PCs on your network.. or if you have only one PC then.. your PC.
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|
|
and if i want to implement a software solution?
Thanks
|
|
|
|
|
Almost sounds like something that firewall software (or hardware) can do. just a guess though.
There are three types of people in this world: those who can count, and those who can't.
|
|
|
|