Click here to Skip to main content
15,891,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to send a shortcut from a program to the desktop Pin
Larry Mills Sr13-Jan-06 14:26
Larry Mills Sr13-Jan-06 14:26 
AnswerRe: How to send a shortcut from a program to the desktop Pin
KellyR13-Jan-06 14:51
KellyR13-Jan-06 14:51 
QuestionAccessing MFC classes in VB Pin
mohanrajh13-Jan-06 14:14
mohanrajh13-Jan-06 14:14 
AnswerRe: Accessing MFC classes in VB Pin
includeh1013-Jan-06 18:02
includeh1013-Jan-06 18:02 
GeneralRe: Accessing MFC classes in VB Pin
mohanrajh14-Jan-06 0:13
mohanrajh14-Jan-06 0:13 
QuestionVS2005 Dialog Editor -> Add Variable - Control Id field is blank Pin
Yak7713-Jan-06 12:47
Yak7713-Jan-06 12:47 
QuestionQuestion when writing an Assert function Pin
Nacho Chip13-Jan-06 12:30
Nacho Chip13-Jan-06 12:30 
AnswerRe: Question when writing an Assert function Pin
Stephen Hewitt13-Jan-06 18:58
Stephen Hewitt13-Jan-06 18:58 
1. How can I know the file name of the code that cause the assert?
  A: The "__FILE__" macro.
2. How can I know the line number of the code that cause the assert?
  A: The "__LINE__" macro.
3. How can I know the function name of the code that cause the assert?
  A: Possible but hard - See 4.
4. How can I print out the call stack when I get the assert?
  A: There are article on the codeproject and else where on this - It is a bit involved.
5. Can I get the PC and SP register information when I get the asset?
  A: Inline assembler:
#pragma optimize("y", on) // Force use of frame pointers
DWORD GetMyReturnAddress()
{
    DWORD ReturnAddress;
    __asm
    {
        mov eax, [ebp+4]
        mov dword ptr[ReturnAddress], eax
    }
    return ReturnAddress;
}
#pragma optimize("", on) // Resets the optimizations

// To get EIP and ESP.
DWORD _ESP;
__asm
{
    mov dword ptr[_ESP], ESP
}
DWORD _EIP = GetMyReturnAddress(); // Return address of statement after "GetMyReturnAddress()"


Steve
AnswerRe: Question when writing an Assert function Pin
Gary R. Wheeler15-Jan-06 5:24
Gary R. Wheeler15-Jan-06 5:24 
GeneralRe: Question when writing an Assert function Pin
Harold Bamford16-Jan-06 11:52
Harold Bamford16-Jan-06 11:52 
GeneralRe: Question when writing an Assert function Pin
Gary R. Wheeler17-Jan-06 16:13
Gary R. Wheeler17-Jan-06 16:13 
GeneralRe: Question when writing an Assert function Pin
Harold Bamford19-Jan-06 4:40
Harold Bamford19-Jan-06 4:40 
QuestionLAN API Pin
Allad13-Jan-06 11:52
Allad13-Jan-06 11:52 
AnswerRe: LAN API Pin
zubair_ahmed13-Jan-06 19:46
zubair_ahmed13-Jan-06 19:46 
GeneralRe: LAN API Pin
ThatsAlok15-Jan-06 19:12
ThatsAlok15-Jan-06 19:12 
AnswerRe: LAN API Pin
ThatsAlok15-Jan-06 19:10
ThatsAlok15-Jan-06 19:10 
QuestionHow to call CView::OnUpdate Pin
elephantstar13-Jan-06 8:10
elephantstar13-Jan-06 8:10 
AnswerRe: How to call CView::OnUpdate Pin
John M. Drescher13-Jan-06 11:30
John M. Drescher13-Jan-06 11:30 
AnswerRe: How to call CView::OnUpdate Pin
FarPointer13-Jan-06 23:51
FarPointer13-Jan-06 23:51 
QuestionCComboBox GetItemDataPtr ( problem found ) Pin
Maximilien13-Jan-06 5:35
Maximilien13-Jan-06 5:35 
QuestionCOleVariant Empty bstrval Pin
TWS_Dave13-Jan-06 5:34
TWS_Dave13-Jan-06 5:34 
AnswerRe: COleVariant Empty bstrval Pin
James R. Twine13-Jan-06 6:58
James R. Twine13-Jan-06 6:58 
AnswerRe: COleVariant Empty bstrval Pin
Stephen Hewitt14-Jan-06 2:22
Stephen Hewitt14-Jan-06 2:22 
AnswerRe: COleVariant Empty bstrval Pin
TWS_Dave14-Jan-06 4:57
TWS_Dave14-Jan-06 4:57 
QuestionShockwave Flash Control Pin
zubair_ahmed13-Jan-06 3:31
zubair_ahmed13-Jan-06 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.