1. No, it is not the Express. It is the full professional version. 2. I do not receive any error message. Even more strange: I started a new project in order to test this issue. It is the simple dialog with the default buttons, I have not done anything yet. The dialog editor has been started automatically, and it works as supposed to - however, the resource tab is still empty in the new project as well. I added a bitmap resource; I could edit it, but after having closed it, the recource tab is still empty. Moreover, the class view tab too is empty, both in the converted and in the new project.
Vancouver
Posts
-
Resource view with converted project -
Resource view with converted project1. I created a project with VC6. Now I opened it with VC8, which converted the project. However, the resource tab is empty. The resource file is there, the program is running, but I don't see the resources (and can't edit them). 2. How does one start the dialog editor in VC8? The help is crap; it contains everything about the dialog editor but not how to start it. Thanks
-
Directories of the current processThanks, it was very quick.
-
Directories of the current processHow can I get the paths of the directories from which the application has been loaded, and the "current" directory (the one, which is specified in the "Start in" of the properties)?
-
Mouse event pecularity in vertical scrollbarThe scrollbars are children of the dialog.
-
Mouse event pecularity in vertical scrollbarThe scroll bars are separate controls. I'm sorry, I did not mention this, because I thought the fact that the mouse movement over the horizontal scroll bar will be reported makes this clear.
-
Mouse event pecularity in vertical scrollbarI have a static control with horizontal and vertical scrollbars. Both scrollbars are enabled and effective (i.e. there is scrolling amount), working fine. The static control is a subclass of CStatic. I am monitoring the mouse actions in this static control with OnLButtonUp, OnLButtonDown, OnRButtonUp, OnRbuttonDown and OnMouseMove. Additionally, there is an OnMouseMove in the parent window of the static control (which is the dialog). This monitors if the mouse leaves the rectangle of the static control. Everything works fine, EXCEPT when the mouse moves from the static control over the vertical scroll bar rectangle, this will not be reported to the parent's OnMouseMove However, there is no problem with the horizontal scroll bar, and if the vertical scrollbar is disabled, then the mouse move will be reported. What can be the reason to this behaviour?
-
Accessing the parent's data membersThis appeared to be all right, at least syntactically. However,
CMyOwnDlg *Parent = dynamic_cast (GetParent());
in the function of the control caused an error: RTDynamicCast threw an exception. -
Accessing the parent's data membersclass *Parent;
is in CMyOwnCtl.h. If it was not there, I would not have any problem: in the function itself CMyOwnDlg can be used. because both headers are known there (and then John M. Drescher's suggestion works). -
Accessing the parent's data membersSorry, I mistyped it in the post. Of course I declared it as a pointer and it created the mentioned error.
-
Accessing the parent's data membersI tried this already before asking, but it causes an error, when assigning the address of the parent to the pointer. If ctl_MyControl is the member variable of the instance of the subclassed control, and Parent is defined in MyOwnCtl.h as
class Parent;
thenctl_MyControl.Parent = this;
in the parent's OnInitDialog causes error C2440: '=' : cannot convert from 'class CMyOwnDlg *const ' to 'class $S217 *' However, if the pointer is defined (in the globals) asCMyOwnDlg *Parent;
thenParent = this;
works fine from OnInitDialog. -
Accessing the parent's data membersI subclassed a control (actually, a CStatic) and want to access from it's functions some data members of the parent. Let's say the new class of the control is CMyOwnCtl, and the parent, the main dialog, is CMyOwnDlg. I am defining a pointer to the parent in CMyOwnCtl.h: CMyOwnDlg *Parent; This works only with #include "CMyOwnDlg.h" #include "CMyOwnCtl.h" in this sequence. However, CMyOwnDlg.h requires the definition of CMyOwnCtl, i.e. the includes have to be in the other sequence. I solved this by placing the pointer to the parent in the global definitions. However, I wonder if it could be done more elegantly.
-
ON_LBUTTONDOWNMark, I have to disappoint you. I am in the middle(?) of a program, many thousands of code lines. I don't intend to go back in time and in code. I had come to the idea, that it would be nice to have a feature controlled with the mouse button hold down. (No, I don't need any suggestions, how to realize that. I only need "my cursor" back.)
-
ON_LBUTTONDOWNAs I posted, it worked yesterday, before I subclassed the control, and it is not working any more. I can't claim, that the subclassing is to blame, as it is not working in the main window either. The questions indicate, that there is no point to discuss this subject here and now. I have to work backwards and see, at which point the problem appears respectively disappears.
-
ON_LBUTTONDOWNIt was not MUCH trouble, for sure, but it increases the amount of code, it requires two new source files, it requires duplicating some handlers. I am not lazy to do that, but I like compact code, the smaller the better. Plus, my SetCursor is not working any more, not only in the new handlers, but not even in the main window, and I don't see the connection.
-
ON_LBUTTONDOWNThat's what I too believed, however, that is not so. I had an ON_BN_CLICKED handler for this control, which worked, but as it turned out, SS_NOTIFY does not cause the xBUTTONxxx events pass to the parent.
-
ON_LBUTTONDOWNI was afraid of this answer, I thought I can somehow avoid the trouble. Anyway, thanks.
-
ON_LBUTTONDOWNHi, I have defined handlers for WM_LBUTTONDOWN and WM_LBUTTONUP. The routines do receive control when pressing/releasing the button, EXCEPT if the mouse is over a static control - and I want to gain control exactly in that situation. In fact, the handlers don't receive the control if the mouse is over any control on the main window, only if the mouse is over an area of the main window, where there is no control. I can process the CLICKED event for that control, but that's not what I need. This particular control does not have any message handler. The documentation states If the mouse is not captured, the message is posted to the window beneath the cursor but ON_WM_LBUTTONDOWN and LBUTTONUP don't accept a specification of the control. How can I catch this event related to a specific control?
-
Handling of ESCAPE and RETURNThanks, it works with KEYDOWN
-
Handling of ESCAPE and RETURNI want to handle the ESCAPE key in certain situation; I try to catch it in PreTranslateMessage with WM_KEYUP. Pressing ESCAPE leads always to the "cancel" result. If I have a control named IDCANCEL, the OnClicked handler receives the control, whenever ESACPE has been pressed, but I can not differentiate between clicking on that control and the "true ESCAPE". Is there a way I can separate the "escape" key from the CANCEL button and from "exit" ("X" in the system menu)? Actually, I need it in a CEdit control.