|
...found out. During the update of the ultimate toolbox to Version 9.3 (Update 05) I missed one line in OXCoolToolBar.h in 1722. Instead of #define CToolBar COXMFCToolBar there was a #define CToolBar CMFCToolBar, which lead to the confusion. As I was close to getting nuts and calling for the priest I recognized this new line in the new code base of 9.3.
|
|
|
|
|
Hello, I need to rotate 90° my "graphical objects" on screen (text, lines, rect....)
Is it possible to do it just by changing any VIEW properties or anything similar ?
thanks
|
|
|
|
|
|
Thanks for your suggestion, I'll try.
Don't you know if there is any MFC similar function ?
|
|
|
|
|
|
Many thanks again
It was simple !!!
But I just have VisualStudio 2003.
I think I need an upgrade !
thanks Chris
|
|
|
|
|
|
Hi all,
i want to identify when user type other than The 7 bit default alphabet character in EditBox.
or
find after end of typing the editbox value contains other than 7 bit default alphabet character or not.
please tell me how can i find this.
thanks in advance.
|
|
|
|
|
Two things:
1. Is that even possible? Most windows (including most type of edit boxes or other input controls) don't even accept nonprintable characters, and printable ones should always be 7 bit, unless you're using some exotic alphabet like chinese - in which case you most likely have wide characters (2 byte) anyway.
(Honest question - I do not know the answer)
2. Check the characters for high order bit like this:
bool is7bit(const std::string& input) {
bool result(true);
for (std::string::const_iterator it = input.begin(); it != input.end() && result; ++it)
if (0x80 & *it)
result = false;
return result;
}
Note: obviously won't work if translated for multibyte characters since then std::string will contain wide chars as well!
|
|
|
|
|
You are really an ignorant one - isn't it ???
Ever heard of languages like france, spanish, german ???
They all have umlauts (german are ÄäÖöÜüß) and all of them have Bit8 set ...
Grrrr..
|
|
|
|
|
I'm sorry, I didn't recall what localized characters are mapped to. Probably because I never care about ASCII encoding when I write a letter in german. And when I care about encoding, it's somehow always english text - if it is language related at all...
|
|
|
|
|
Hmm - I'm a litte confused. Because of your name I assumed you're from Germany, and if you are a programmer you should know your primary language encoding (sorting algorhitms and such stuff
|
|
|
|
|
1. So am I.
2. Yes I am
3. see 1
|
|
|
|
|
I have an menu : &Refresh , separator , &Modify and Suspen&d
In some cases , I want to append an menu dynamically :
and I try this :
pContextMenu->AppendMenu(MF_SEPARATOR,NULL,"-");
pContextMenu->AppendMenu(MF_POPUP,NULL,"&Export");
and does function , but not in the way that I want , I mean , at 'Export' item , I want to append other popup items , etc.
Ok, further , I don't know how to map handlers on this dynamically menu items ?
Thank you .
|
|
|
|
|
Here is image of what I want to do :
Existing item
Existing item
Existing item
create separtor
Create popup item
-----------------Create new item
-----------------Create new item
Create new item
Create new item
and , after that , where I should put code on the new create menu items ?
|
|
|
|
|
Means you want to add pop up menu to "Export" menu.
Then create a sub menu like,
CMenu SubMenu;
SubMenu.CreatePopupMenu();
SubMenu.AppendMenu(MF_STRING, IDM_EXPORT_PDF, _T("To Pdf");
SubMenu.AppendMenu(MF_STRING, IDM_EXPORT_WORD, _T("To Word");
Then Create Export Menu as,
pContextMenu->AppendMenu(MF_POPUP, SubMenu.m_hMenu,"Export");
|
|
|
|
|
Depending on the scope of pContextMenu , you might have to detach the underlying HMENU from SubMenu to avoid having it destroyed by the destructor of CMenu .
pContextMenu->AppendMenu(MF_POPUP, SubMenu.Detach(), "Export");
|
|
|
|
|
So , can I write code on IDM_EXPORT_PDF handler , if I want ?
|
|
|
|
|
I think I know ... I map IDM_EXPORT_PDF in message map ... I will try .
|
|
|
|
|
But if I want to append 2 menus , one of that have an popup menu ?
I try in this way , without succes :
CMenu menu,menuInEx;
menu.LoadMenu(IDR_MENU_RCLICK1);
menuInEx.LoadMenu(IDR_MENU_RCLICK_INEX);
CMenu* pContextMenu = menu.GetSubMenu(0);
POINT point;
point.x = pt.x;
point.y = pt.y;
::ClientToScreen(pNMHDR->hwndFrom,&point);
pContextMenu->AppendMenu(MF_SEPARATOR,NULL,_T("-"));
pContextMenu->AppendMenu(MF_POPUP,reinterpret_cast<UINT_PTR>(menuInEx.m_hMenu),_T("--"));
|
|
|
|
|
Flaviu 2 wrote: I try in this way , without succes :
Does any pop menu displayed.If then Where is the problem.Does IDR_MENU_RCLICK1, IDR_MENU_RCLICK_INEX are valid resources?
|
|
|
|
|
The fact is , if I have an valid IDR_MENU_RCLICK1 and IDR_MENU_RCLICK_INEX resources , how can I append both ?
|
|
|
|
|
I think that what I want it's a stupid thing !?
|
|
|
|
|
To Merge two menus use the following code,
Merging Two Menus[^]
And You can do merging Like this,
CMenu menu,menuInEx;
menu.LoadMenu(IDR_MENU_RCLICK1);
menuInEx.LoadMenu(IDR_MENU_RCLICK2);
ClientToScreen(&point);
CMenu* pContextMenu = menu.GetSubMenu(0);
MergeMenu(pContextMenu, &menuInEx, false);
pContextMenu->TrackPopupMenu(TPM_RIGHTALIGN, point.x, point.y, this);
CWnd::OnRButtonUp(nFlags, point);
|
|
|
|
|
May be it's easier for us to answer your question if you show us the wanted menu structure ...
|
|
|
|