Hi :) I have a CTreeCtrl in a window which is the child window of another window (main window). When I deselect (with SelectItem(NULL)) my selection when my CTreeCtrl window has the focus, the result is as expected. However when I deselect my selection when the main window has the focus, my CTreeCtrl clears selection but sets the selection to the first visible item as soon as the window with the CTreeCtrl gets the focus again. Is this intended or a Windows bug? This is very annoying and I can't find a workaround :(( Anyone knows how to deal with this? By the way I set the option "Show selection always", so my problem isn't linked to that
Mr Freeze
Posts
-
CTreeCtrl selects item by itself!!! -
From CWnd to CFrameWnd: menu items appear disabled!I finally got it to work, but I don't really understand it: I now intercept the WM_INITMENUPOPUP-message and simply return 0. By doing so the menus appear as enabled! How come I have to do this? (I didn't do it in my message loop of my CWnd-window I had first and the menus didn't appear as disabled)
-
From CWnd to CFrameWnd: menu items appear disabled!Hi, I rewrote my main window (originally derived from CWnd) as an object derived from CFrameWnd. How come that all my menu items appear as disabled now?? I can't make any selection! Same with my pop-up menu. I create my menu in the exact same way as before: CMenu myMenu; myMenu.LoadMenu(IDR_MAIN_MENU); SetMenu(&myMenu); myMenu.Detach(); Only sub-menus appear as enabled. Also when the command ID for an item is set to 0, it appears as enabled... Any idea what went wrong? Thanks :)
-
How to get dimensions of client area without toolbars?That's just perfect Chris, thanks a lot :rose: It is working very nicely now :cool:
-
Dynamic Object Creation, ok. What about destruction?In debug mode I checked if the destructor is called, and it is not called.
-
Dynamic Object Creation, ok. What about destruction?Thank you for your reply. I also thought that the window would automatically get destroyed, but in debug mode it tells me that it detected memory leaks (the CFrameWnd and its toolbar)
-
How to get dimensions of client area without toolbars?Thanks again Christian, I guess I'll be able to do it with that! :-D
-
Dynamic Object Creation, ok. What about destruction?Hi, I created an instance of my CFrameWnd-derived class with: CRuntimeClass* pRuntimeClass=RUNTIME_CLASS(CMainWindow); CObject* pObject=pRuntimeClass->CreateObject(); ASSERT(pObject->IsKindOf(RUNTIME_CLASS(CMainWindow))); CMainWindow* mainWindow=(CMainWindow*)pObject; How can I destroy this object at the end of my application? delete mainWindow does obviously not work. Is there maybe a function similar to CreateObject() which destroys it? Thank you :)
-
How to get dimensions of client area without toolbars?Thank you Christian, I tried that, but when the toolBar is docked, it seems that the dimensions obtained with GetClientRect don't match the docking area. Also if I have several toolBars I have to check each single toolBar's status (docked or floating) and then its dimensions. Also what happens if several toolBars dock together on more than one row?
-
How to get dimensions of client area without toolbars?Hi, How can I get the position and dimension of my client area inside of my CFrameWnd without including the area of docked tool bars or status bars? Thanks :)
-
Cannot create member variable of radio button...Thank you a lot Max :)
-
Cannot create member variable of radio button...Hi, I have radio buttons in my dialog and want to disable some of them according to the state of other radio buttons. The problem is that it seems impossible to add a member variable for radio buttons in MVC++6! (but check boxes are ok) I basically want to do the following: m_radioButton1.EnableWindow(false); Thanks :)
-
Easier Tab control?Hi, I have an application with many tab controls (and in many of them I have other sub-tab controls) and I feel that it is heavy/troublesome to create new tabs or to maintain the existing ones. Is there a way where I could just edit new tab controls visualy without having to create a new dialog for its content everytime? I imaging being able to add a tab control to my dialog. Then I would simply specify the labels for my different sheets and by clicking a specific label, its content would be displayed and editable. Now I always have to create a new dialog for every tiny sheet, then programatically set up everything and see the result only when running the application. Thanks for your help :)
-
A notepad-like class...Thank you Christian :)
-
A notepad-like class...Hi, I would like to display and edit a text (a simple multi-line text) from a file like notepad does. Is there an easy-to-use class somewhere? I was told I should use an edit-box control, but this seems a bit complicated... I have to implement all the serialization stuff and so on and I might not implement it in an efficent way. Thanks for any help :)
-
Again a callback question... m(__)mHello Joaquin, Thanks for your reply to my problem which gave me a small hope to solve the problem very quickly and easily. It seems that I'll have to take to more difficult route anyway (RPC,...) ;) Best regards, Marc
-
Again a callback question... m(__)mHello Bio, Thanks a lot for your clarification and your precious help :) Best regards, Marc
-
Again a callback question... m(__)mThanks again Bio:rose: I am quite new to all this and might be a bit slow understanding... but a last question: The dll linking my two applications has a shared data segment. Does this simplify something? What about just overriding an unused window function in application2 and then, in application1 calling : FromHandle(app2WindowHandle)->the_overrided_function() ?? Best regards
-
Again a callback question... m(__)mThanks for your reply :) When I install a callback with "glutDisplayFunc(functionAddress)" (it's a function which installs a callback to render a scene in OpenGL), is that function also using RPC??
-
Again a callback question... m(__)mThanks, but my problem is much more "how to write the code": I don't need the registry because each application registers itself inside of the dll everytime they are launched. I just want to know how my interfaces have to look like, eg: ********** Application2 ****************** installTheCallback(callbackAddress); ... LResult callback callbackAddress(???) { ... } ********** DLL ************** BOOL declspec(dllexport) __stdcall installTheCallback(???) { ??? } BOOL declspec(dllexport) __stdcall jumpToTheCallbackRoutine() { ??? } ************** Application1 ****************** jumpToTheCallbackRoutine(); Basicaly I don't know what is needed where I put "???"