Click here to Skip to main content
16,007,504 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about ToolBar Pin
Christian Graus18-Dec-01 17:31
protectorChristian Graus18-Dec-01 17:31 
GeneralRe: about ToolBar Pin
BigMouth18-Dec-01 21:52
BigMouth18-Dec-01 21:52 
GeneralRe: about ToolBar Pin
Christian Graus19-Dec-01 0:59
protectorChristian Graus19-Dec-01 0:59 
GeneralRe: about ToolBar Pin
BigMouth21-Dec-01 23:49
BigMouth21-Dec-01 23:49 
GeneralRe: about ToolBar Pin
BigMouth21-Dec-01 23:55
BigMouth21-Dec-01 23:55 
GeneralRe: about ToolBar Pin
Christian Graus22-Dec-01 12:53
protectorChristian Graus22-Dec-01 12:53 
GeneralRe: about ToolBar Pin
BigMouth22-Dec-01 21:35
BigMouth22-Dec-01 21:35 
GeneralRe: about ToolBar Pin
Christian Graus23-Dec-01 10:20
protectorChristian Graus23-Dec-01 10:20 
You need to run it when CMainFrame has been constructed and not destroyed.

When does it crash ?

You can do this:

CMainframe * pMain = dynamic_cast<cmainframe*>(AfxGetMainWnd());

if (pMain)
{
// use it here
}

This is how C++ does run time type information, and although it should *always* work in this case, it gives us a chance to catch if it doesn't. Whenever you request a pointer you should check it first, even if it's just with ASSERT.



Christian

After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001

Sonork ID 100.10002:MeanManOz
I live in Bob's HungOut now

GeneralRe: about ToolBar Pin
BigMouth24-Dec-01 2:41
BigMouth24-Dec-01 2:41 
GeneralDialog Box Problem Pin
mvworld11-Dec-01 22:42
mvworld11-Dec-01 22:42 
GeneralRe: Dialog Box Problem Pin
Joaquín M López Muñoz12-Dec-01 1:28
Joaquín M López Muñoz12-Dec-01 1:28 
GeneralRe: Dialog Box Problem Pin
mvworld12-Dec-01 1:35
mvworld12-Dec-01 1:35 
GeneralRe: Dialog Box Problem Pin
Joaquín M López Muñoz12-Dec-01 4:42
Joaquín M López Muñoz12-Dec-01 4:42 
Generalchange window shape Pin
Orbital^11-Dec-01 22:42
Orbital^11-Dec-01 22:42 
GeneralRe: change window shape Pin
Joaquín M López Muñoz11-Dec-01 22:54
Joaquín M López Muñoz11-Dec-01 22:54 
GeneralRe: change window shape Pin
Ernest Laurentin12-Dec-01 3:54
Ernest Laurentin12-Dec-01 3:54 
GeneralUNICODE and ifstream Pin
11-Dec-01 22:01
suss11-Dec-01 22:01 
GeneralRe: UNICODE and ifstream Pin
Joaquín M López Muñoz11-Dec-01 22:17
Joaquín M López Muñoz11-Dec-01 22:17 
GeneralRe: UNICODE and ifstream Pin
11-Dec-01 22:36
suss11-Dec-01 22:36 
GeneralShowing window contents while dragging.. Pin
11-Dec-01 20:01
suss11-Dec-01 20:01 
GeneralRe: Showing window contents while dragging.. Pin
Erik Funkenbusch11-Dec-01 21:56
Erik Funkenbusch11-Dec-01 21:56 
GeneralRe: Showing window contents while dragging.. Pin
11-Dec-01 22:11
suss11-Dec-01 22:11 
GeneralRe: Showing window contents while dragging.. Pin
11-Dec-01 22:22
suss11-Dec-01 22:22 
GeneralYou change this Registry key... Pin
Atul Dharne11-Dec-01 23:26
Atul Dharne11-Dec-01 23:26 
GeneralRe: Showing window contents while dragging.. Pin
Michael Dunn12-Dec-01 9:03
sitebuilderMichael Dunn12-Dec-01 9:03 

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.