Are Foundation Classes supported in the latest version of Visual Studio 2016 (or whatever version of Visual Studio is currently being published? Thanks, Barry
BarryPearlman
Posts
-
Visual Studio 2016 & MFC -
Tooltips Won't DisplayI found it. I was creating the CMFCTooltipCtrl class improperly. Thanks for the effort, Barry
-
Tooltips Won't DisplayThe application (CFrameWndEx) creates a dialog box (CDialogEx) with future ambitions of adding CMFCTooltipCtrl etc. I am trying to just get CTooltipCtrl to work first. In the dialog class I have: .h - CToolTipCtrl* p_TTCtrl; .ccp -
p_TTCtrl = new CToolTipCtrl;
ASSERT(p_TTCtrl->Create(this));CWnd* p_Wnd = this->GetDlgItem(IDCTL_Pref_CB_Exit);
VERIFY(p_TTCtrl->AddTool(p_Wnd, IDCTL_Pref_CB_Exit, NULL, 0));
p_TTCtrl->Activate(TRUE);When I run the debugger, there are no ASSERT or Verify errors. If I hover over IDCtrl_Pref_CB which is a checkbox created from the .rc file, nothing happens. Can someone please point out what I am missing or have wrong. Thanks, Barry
-
Question for you audiophilesSpeakers are constructed in a manner such that they don't care which direction the cone points. Most people really don't "hear" a subwoofer anyway, but rather feel the vast (as compared to mid-range & tweeter speakers) amount of air that the sub woofer moves. Speakers respond to their enclosures, vents etc. according to something called the Thiele/Small equations. See Wikipedia under Thiele/Small. When I built my stereo system years ago, I had access to the engineers at Electro Voice. I got a 18" subwoofer and built a stand-alone cabinet according to the equations. It wound up at approximately 2' x 2' x 4'. It has its own dedicated 500 watt amplifier and if I play Michael Jackson's "Billy Jean" and stand next to the speaker, my pants legs move on the downbeat. Bottom line is that you aren't going to hear or feel the difference. If the base seems a little lacking, turn it up until it sounds like you want it to sound. Barry
-
TrackMouseEventI am trying to use TrackMouseEvent with a button on a dialog box created using the Resource Editor. I have tried the various sample codes examples available here on this site and on the internet. I get some results, but not all. I keep coming up with references to subclassing the button in the literature, yet I do get WM_MOUSEMOVE & WM_MOUSELEAVE messages. When I try to subclass the button, I get an error which I interpret to mean that the button is already sub classed. Isn't the button automatically subclassed when you use the template generated by the Resource Editor? If not and the button has to be subclassed, how do I do this. Thanks, Barry
-
VC++ SnippetsThanks everyone!
-
VC++ SnippetsBecause its part of the VC 12 IDE package, which millions use to write C++ with! I am looking for someone with more experience than I. Isn't that part of the purpose of Code Project?
-
VC++ SnippetsCan anyone direct me to an article or book that covers Snippets. It seem like Microsoft had a good idea, but no one wrote down the instructions............Again! I understand the concept, but not the details. I would also like to know if the snippet is copied and pasted into the IDE or are the snippets linked to as a library at build time? Thanks, Barry
-
Missing Button Click MessageYou may be on the right class concerning who belongs to which class and hence the missing events. I will get back to this project later on in the week and thanks to you have some new avenues to explore. Thanks & Happy Holidays, Barry
-
Missing Button Click MessageI always do. That is how I found out that the code that the Event Wizard Handler was writing code that wasn't working in the first place. The question still remains why can't I get the event to fire in p_MSCls->? Thanks, Barry
-
Missing Button Click MessageThis post dealt with missing events, not a request for the difference between ASSERT() and VERIFY()! Frankly, I am hard pressed to find a decent explanation of the fine nuances between them, except their use during runtime and debug. It is my own personal philosophy that the end user should never see the arcane messages these macros produce. An error at a hex address means absolutely nothing to a user except that there is an error and that the developer has failed to take something into account. Perhaps a philosophical dissertation/lecture is in order here??
-
Missing Button Click MessageSorry about that! Ideally the button click event should be handled first in p_MsgCls since p_MsgCls-> is intended to handle all of the messages for the entire application. Second choice is CMainFrameEx. Using the Event Handler Wizard for p_MsgCls I get: //.h DECLARE_MESSAGE_MAP() public: afx_msg void OnBnClicked_MB_Btn2(); //.cpp
BEGIN_MESSAGE_MAP(CJBK_Msg, CWnd)
..........................
ON_BN_CLICKED(ID_MB_Btn_2, &CJBK_Msg::OnBnClicked_MB_Btn2)
END_MESSAGE_MAP()void CJBK_Msg::OnBnClicked_MB_Btn2()
{
// TODO: Add your control notification handler code here
}I am working under the assumption that if the Event Handler Wizard (in general) presents me with a choice, it is a valid one and will work. Thanks, Barry
-
Missing Button Click MessageThe objective is to create a class that contains the methods to create and gather messages from a series of message dialogs by means of a series of buttons on a dialog created with the resource editor. The app is being written with VS 2010 and the classes, events etc. utilizing the supplied Wizards. This is an SDI app with p_MFCls-> pointing to the MainFrameEx* object and p->MsgCls being the child of p_MFCls-> and a CWnd* object. p_Dlg-> is a pointer to the actual dialog box and is a CDialog* object parented by the p_MsgCls object. FWIW: Windows 8.1 I have the following code (partial): In p_MFCls: //.h
CJBK_Msg* p_MsgCls;
//.cpp
p_MsgCls = new CJBK_Msg;
ASSERT(p_MsgCls->Create(NULL, NULL, 0, CRect(0, 0, 0, 0), this, IDCls_Msg));In p_MsgCls, when the appropriate message is received, we have:
//.h
CDialog* p_DlgBox;//.cpp
p_DlgBox = new CDialog;
ASSERT(p_DlgBox->Create(p_strMsgBox->nDlgBoxResID, this));For the button(s), I used the Event Handler Wizard but whether I tell it to send the event to p_MFCls or p_MsgCls, it never gets there when I click the button control. Can anyone spot something that I have missed? Thanks and Happy Holidays to all, Barry
-
CJBK_View::OnDraw(CDC* p_DC)This solved the problem. Thanks. Just under what conditions would one call ->UpdateWindow?:cool:
Barry
-
CJBK_View::OnDraw(CDC* p_DC)I am trying to use the "OnDraw" message to respond to the left mouse button click. The "Button Up" triggers ->Invalidate(TRUE); and -> UpdateWindow(); which then calls "OnDraw". Once "OnDraw" is called, a long series of graphics functions are used to draw what I want to display, using the DC supplied by "OnDraw". This all works and draws what I want, however: "OnDraw" seems to be called 3 consecutive times, each with a different DC for the same hwnd. This causes the graphics (which don't change) to be calculated and drawn 3 times producing an annoying flicker and waste of application processing time. Is there a way to get just one call to "OnDraw"? WM_PAINT seems to also be sent 3 times. Any suggestions to different methods or approaches will be welcome. Thanks and Happy Thanksgiving to those who celebrate. Barry :confused:
-
VS 12 Macro EditorI was just getting used to saving time with the macro recorder, playback etc. in VS 10. Then I migrated to VS 12 and no macros. Somewhere I read that MS left it out because no one was using it. Maybe I missed the survey! Is there anything out there that does basically the same thing? Free would be nice! Thanks, Barry
-
Old Farts Know How to CodePunch cards were fun (I started with the too) but a bitch when you dropped a box of source deck all over the floor 1 hr. before deadline. :omg:
-
Visual Studio 10 LinkerI am working on a solution that has only 1 project. If I build the selection, all runs well. If I try to build the Solution (F7), I get an 1120 linker error. I can see the names of previous functions/classes that have come and gone; I think that the linker is trying to find them to link to them. I have even done a character search of the machine but can't find these functions or the classes that used to contain them. I am a newbee and this is above my pay grade, all the other hieroglyphics in the error message mean something to someone, but I am afraid that I am lost. Anyone have any ideas on how to correct this situation? Is there a file(s) that I can "dump" and then just rebuild? Thanks, Barry
-
DOC/View/Mainframe or does it matter?I am working on an SDI application (MFC) using the standard DOC/View/Mainframe created by Visual Studio 10. The application requires a special type of "Switchboard" consisting of basically CButtons. For whatever reason, I do not want to place the buttons in a conventional Dialog Box, but rather have them as children of DOC or View or Mainframe. This is my first time using DOC/View/Mainframe and my question is: Who should be the parent of these buttons, or does it matter at all from a program architecture convention standpoint? I am sure that Microsoft has this detailed, but I haven't a clue as to where to start looking. Thanks, Barry :confused:
-
CMap question.Please allow me to take this to the next level. The map is used to hold class pointers cast to (DWORD)*. When retrieved (CMap->Lookup(...)), they are cast back to theit original type and used. The number of elements at any given point in time in the map varies depending upon how many classes have been created or destroyed. When the application closes, the remaining map entries are cast back to their original pointers then deleted; the map is then destroyed. Obviously, if I just destroy the map, I am left with memory leaks of varying classes. The question occurs when I am down to just one map entry and it is time to close the application and destroy the last pointer cast DWORD*. How do I retrieve the last remaining item in the map?