c:\Path_to_CB\codeblocks.exe file.cpp
It works here on XP (will test on win7 with latest trunk later).
Are both checkboxes in "Settings -> Environment... -> General settings -> Dynamic Data Exchange" active ?
Yeah, both ticked... But, I'm not using DDE when I call it from the command line, am I?
EDIT:
It works if C::B is in back, but maximized... However, if C::B is minimized, then it only get maximized when double-clicking in a file in Explorer, not when using the command-line...
Thanks for the second hint, that should be easy to fix (hopefully).
No, I doubt that forcing the maximizing is the right thing to do, but you should provide a patch there, where the context is correct.
Btw: Instead of IsMaximized() you should check for !IsIconised() and issue a Show() then... IMHO that's the better option. Notice the Iconised, not Iconized... ;-)
Attached is a patch to fix it...Great, will try...
Thanks MortenMacFly for the suggestion, I also think that IsIconized() is the right check here. However, instead of Show(), I'am issuing a Iconize(false), since the documentation (http://docs.wxwidgets.org/2.8/wx_wxwindow.html#wxwindowshow) says that Show() is the opposite of Hide(), whereas here (http://docs.wxwidgets.org/2.8/wx_wxtoplevelwindow.html#wxtoplevelwindowiconize) I've found that Iconize(false) is what I want.That is true. I didn't consult the docs, but from what I see now it is the right thing to do.
Do you have another version of wxWidgets?? :oNo, all methods of wxWidgets are usually available in British and American English. We had this discussion just recently that we agreed to use the British English variant, if available. Documented are generally only the American versions... IMHO... To check, you have to open the interface (header) file, or just try if the compiler complains when using the British one... ;-)
No, all methods of wxWidgets are usually available in British and American English. We had this discussion just recently that we agreed to use the British English variant, if available. Documented are generally only the American versions... IMHO... To check, you have to open the interface (header) file, or just try if the compiler complains when using the British one... ;-)
C:\Work\codeblocks_trunk\src\src\app.cpp:139:26: error: 'class MainFrame' has no member named 'IsIconised'
C:\Work\codeblocks_trunk\src\src\app.cpp:140:14: error: 'class MainFrame' has no member named 'Iconise'
It seems that this time, only American versions are available... ;)OK - so it seems the wx guys are in-consequent or changed their philosophy. Nevermind.
if (m_Frame)
{
if (m_Frame->IsIconized())
m_Frame->Iconize(false);
else
m_Frame->Raise();
}
if (m_Frame)
{
if (m_Frame->IsIconized())
m_Frame->Iconize(false);
m_Frame->Raise();
}
Or does Iconize(false) also raises the window automatically?As far as I can see/test, it also raises the window automatically.
do you have any other idea/concern/suggestion/test case? ;)No, but I know that iconising and raising are two different things. So to be on the safe side, I would always raise. This might be a platform / configuration thing, too. For example, on Windows there is a switch to (dis-) allow stealing the focus of windows globally which affects Raise().
Ok, as I said I have no experience in this area, so I accept your suggestion.do you have any other idea/concern/suggestion/test case? ;)No, but I know that iconising and raising are two different things. So to be on the safe side, I would always raise. This might be a platform / configuration thing, too. For example, on Windows there is a switch to (dis-) allow stealing the focus of windows globally which affects Raise().
Attached is a patch with "always raise"....and applied in SVN after testing. Seems really to fix the bug.