Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to clean contents of a file Pin
Cedric Moonen22-Mar-09 23:44
Cedric Moonen22-Mar-09 23:44 
GeneralRe: How to clean contents of a file Pin
«_Superman_»22-Mar-09 23:44
professional«_Superman_»22-Mar-09 23:44 
GeneralRe: How to clean contents of a file Pin
PankajB22-Mar-09 23:49
PankajB22-Mar-09 23:49 
GeneralRe: How to clean contents of a file Pin
«_Superman_»23-Mar-09 0:02
professional«_Superman_»23-Mar-09 0:02 
AnswerRe: How to clean contents of a file Pin
Eytukan23-Mar-09 0:34
Eytukan23-Mar-09 0:34 
QuestionRe: How to clean contents of a file Pin
David Crow23-Mar-09 3:29
David Crow23-Mar-09 3:29 
QuestionCan we create a Toolbar without MenuBar? Pin
Abhijit D. Babar22-Mar-09 22:46
Abhijit D. Babar22-Mar-09 22:46 
AnswerRe: Can we create a Toolbar without MenuBar? Pin
Iain Clarke, Warrior Programmer22-Mar-09 23:32
Iain Clarke, Warrior Programmer22-Mar-09 23:32 
Don't you just sent the menu to NULL to make it go away?

Will be a little bit fiddly, but early in CMainFrame::OnCreate, just call SetMenu(NULL)...

MSDN wrote:
BOOL CWnd::SetMenu( CMenu* pMenu );
Identifies the new menu. If this parameter is NULL, the current menu is removed.


So:
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (baseCMainFrame::OnCreate(lpCreateStruct) == -1)
        return -1;

    SetMenu (NULL); // turn off the menu...

    ...

    return 0;
}


Just had another thought... Could you just remove the menu resource from your resources?

None of this is tested, and I assume MFC hasn't changed fundamentally from VC6 (which is a fairly safe assumption)

Good luck,

Iain.

In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!

GeneralRe: Can we create a Toolbar without MenuBar? Pin
Abhijit D. Babar23-Mar-09 0:19
Abhijit D. Babar23-Mar-09 0:19 
GeneralRe: Can we create a Toolbar without MenuBar? Pin
Iain Clarke, Warrior Programmer23-Mar-09 0:28
Iain Clarke, Warrior Programmer23-Mar-09 0:28 
Questionfloating point exceptions instead of INF, NaN Pin
sor73naf22-Mar-09 22:42
sor73naf22-Mar-09 22:42 
AnswerRe: floating point exceptions instead of INF, NaN Pin
Dominik Reichl22-Mar-09 23:59
Dominik Reichl22-Mar-09 23:59 
GeneralRe: floating point exceptions instead of INF, NaN Pin
sor73naf23-Mar-09 3:03
sor73naf23-Mar-09 3:03 
QuestionWinInet - INTERNET_CACHE_ENTRY_INFO - Header Info [modified] Pin
CString(0xcccccccc)22-Mar-09 22:33
CString(0xcccccccc)22-Mar-09 22:33 
QuestionWhat is the SEH in release build VS2008 with fclose()? Pin
Chesnokov Yuriy22-Mar-09 22:32
professionalChesnokov Yuriy22-Mar-09 22:32 
AnswerRe: What is the SEH in release build VS2008 with fclose()? Pin
Eytukan23-Mar-09 0:26
Eytukan23-Mar-09 0:26 
QuestionRe: What is the SEH in release build VS2008 with fclose()? Pin
Chesnokov Yuriy23-Mar-09 2:10
professionalChesnokov Yuriy23-Mar-09 2:10 
AnswerRe: What is the SEH in release build VS2008 with fclose()? Pin
Eytukan23-Mar-09 2:47
Eytukan23-Mar-09 2:47 
QuestionDMA access from user-mode Pin
Maxwell Chen22-Mar-09 21:58
Maxwell Chen22-Mar-09 21:58 
AnswerRe: DMA access from user-mode Pin
Iain Clarke, Warrior Programmer22-Mar-09 23:35
Iain Clarke, Warrior Programmer22-Mar-09 23:35 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 3:58
Maxwell Chen23-Mar-09 3:58 
AnswerRe: DMA access from user-mode Pin
Eytukan23-Mar-09 0:41
Eytukan23-Mar-09 0:41 
GeneralRe: DMA access from user-mode Pin
CPallini23-Mar-09 1:32
mveCPallini23-Mar-09 1:32 
GeneralRe: DMA access from user-mode Pin
Eytukan23-Mar-09 2:48
Eytukan23-Mar-09 2:48 
GeneralRe: DMA access from user-mode Pin
Maxwell Chen23-Mar-09 4:13
Maxwell Chen23-Mar-09 4:13 

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.