|
Assertions have nothing to do with the debugger. When an assertion fires, you'll see:
Assertion Failed: File %hs, Line %d
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
atlmfc\include\afxwin1.inl: Line 900
Thanks,
|
|
|
|
|
So did you look at line 900 of afxwin1.inl to see what condition is asserting?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
{ ASSERT(this == NULL || m_hMenu == NULL || ::IsMenu(m_hMenu));
I think the menu was destroyed.
|
|
|
|
|
transoft wrote: CMenu* pMenu = GetMenu();
Does not return a CMenu* . You should be calling CWnd::GetMenu() .
|
|
|
|
|
Richard MacCutchan wrote: Does not return a CMenu*.
It does if called in the context of a CWnd -derived class.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
DavidCrow wrote: It does if called in the context of a CWnd-derived class.
My (mis-)reading of the documentation implied that you had to call this on a CWnd object reference.
Mr brain thought he was on holiday ...
|
|
|
|
|
Richard MacCutchan wrote: Mr brain thought he was on holiday ...
Ask Rajesh for a new monkey.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
After the call to SetMenu() you need to call mu.Detach() so the destructor does not destroy the handle.
|
|
|
|
|
I am not quite familar with this search engine!
|
|
|
|
|
Although not a C++ question: go to your home page and click on messages.
|
|
|
|
|
Hello,
I am developing multilingual MFC application.
My application has very heavy GUI, and I want to create resource DLL for each language, which my application load at run time when needed.
So I want to make resource DLL for application per language which just contain "string table" nothing else, and remaining resource should use from application default resource.
Basic requirement:
1) Don't want to redundant Image, Dialog and Menus in each resource DLL.
Can anyone suggest way for same?
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
ParagPatel wrote: Don't want to redundant Image, Dialog and Menus in each resource DLL.
You just need to create a resource set comprising strings only. If there are any other auto-generated items they can be deleted.
|
|
|
|
|
Thanks Richard,
But I want to in a way so I no need to do any compilation and code change to support new language. Thats way i was preferring separate resource DLL.
What is your view/solution?
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
ParagPatel wrote: Thats way i was preferring separate resource DLL.
That's what I was suggesting; create a DLL composed of all the string table resources and a simple function to return the relevant string table according to the language selected by the caller.
|
|
|
|
|
Yes same I want to do,
MFC provide API to load resource "SetResourceInstance", but I am confuge here that how can i set tow resource instance. one for default resource instance (Dialog, Image etc) and second for string table?
Thanks
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|
|
ParagPatel wrote: MFC provide API to load resource "SetResourceInstance"
I cannot find the MFC reference, only the one pertaining to ATL, which I have no experience of. I think you may need to look at how you access the resources, and whether to use pure Win32 to access them through the DLL.
|
|
|
|
|
Hello Sir
Recently i downloaded this source code from this link ..
MAPIEx: Extended MAPI Wrapper[^]
i can tested this code outlook 2003 and 2007 ..when i install outlook 2002..its not working ..i dont know why its not running ??
kindly help me Sir!!
Thanks
Raju !!!
|
|
|
|
|
Try posting your question in the article's Q&A section so the author sees it.
|
|
|
|
|
Thanks for your replay ..
Already ..that kind of question is there ..but its not there in relevant answer ..so that i posted in this section ..
Raju !!!
|
|
|
|
|
Your original question gives no information as to what may be wrong; "not working" tells us nothing. You will have to do some debugging and narrow it down to the area of code that is failing, and then post the lines of code that fail, and any error messages that you see.
|
|
|
|
|
I have a dialog that has to be shown both as a part of a property sheet and as a standalone dialog (in which case it must have an OK/Cancel buttons which in the property sheet it shouldn't have). As I don't want to keep two resources and two classes for essentially the same dialog except for two buttons, I'm wondering if anyone here can recommend a solution.
I've seen that CPropertyPage is derived from CDialog, so I'm considering keeping a dialog resource with OK/Cancel buttons which I somehow hide before adding it to the property sheet, and when I want to use it as a standalone dialog I call its DoModal method, but will that work? Are there better solutions to this problem?
[Edit]
I've seen now that when I call CPropertyPage::DoModal the resulting dialog doesn't close when OK/Cancel or the close button is pressed.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Wednesday, November 18, 2009 5:35 AM
|
|
|
|
|
Why not just have a one-page property sheet when you need a standalone dialog?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for the reply, DavidCrow!
That could work but right now I actually succeeded in making my original idea work, by creating a helper class that derives from CPropertyPage and overrides OnOK , OnCancel and OnInitDialog, and deriving the pages in question from it.
It's a bit convoluted as a solution but it has the added benefit that the resulting dialogs really look like ordinary dialogs, whereas with your solution they wouldn't be standard, instead they'd look like a single-tab property sheet (I haven't tested that though so correct me if I'm wrong).
But if you have an idea how to make it look like an ordinary dialog, I'd rather use your idea because it would be simpler.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
i want to draw hicon onto 3d-layer surface, and i can use a interface function that is CreatePictureFromMemory.
how to retrieve the memory data from the hicon?
thank you very much
|
|
|
|