Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Peter Jones

@Peter Jones
About
Posts
9
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MFC MDI 2nd main window problem
    P Peter Jones

    I have an MFC MDI application that works fine. I'm trying to add another window, outside of the main MDI window. When I create the child view for this 2nd window, a new blank view appears in the main MDI window, leaving the 2nd window frame blank. The frame, and view class are different for the 2nd window. I've tried tracing through the code and I can't figure out how the main window takes my new child window. There's something built into MFC that is causing this. What am I missing, how can I work around it? Naturally, I can create the window and ignore the frame/document/view architecture, but I'd rather not do that. If the following looks a bit strange, I'm following the example of an MFC wizard generated app without document and view support (the document isn't needed). I'm using this approach to try and reduce the ties to frame/document/view and make this work. Tried it the standard way and it didn't go either. { CMDIFrameWnd* pFrame2 = new CCalendarFrame; // create secondary MDI frame window if (!pFrame2->LoadFrame(IDR_CALENDARTYPE)) return; // create a new MDI child window pFrame2->CreateNewChild( RUNTIME_CLASS(CCalChildFrm), IDR_CALENDARTYPE, NULL, NULL); // The main window has been initialized, so show and update it. pFrame2->ShowWindow(SW_SHOWNORMAL); pFrame2->UpdateWindow(); } Thanks!

    C / C++ / MFC

  • Where will be in 10 years?
    P Peter Jones

    Years ago, the chairman of IBM declared that there was only a market for few dozen machines in the US. I'm sure that someone else, in a better position than you or I to see the future, declared that computers would be good for mathematical research, word processing and little more. Neither of those have proven accurate, seeing the future is very difficult. Capitalism is all about creating a product to fill a need. If there isn't the need, deep pocketed companies like Microsoft and Intel will create that need. Case in point, Microsoft's recent upgrade policy for Office XP. People hardly use a fraction of the capabilities of Office 97 or Office 2000, but they still worry about the price for upgrading to the version AFTER the up-coming Office XP! Regarding an earlier post on power-failures, I assume you're talking about California. While I'm sure the problems came as a surprise to some, I find it hard to believe that the big companies didn't see this coming. Let's see... increasing demand for power, fixed rates, NIMBY (Not In My Back Yard) attitude to building power plants... yeah, this will work. ;) See, what you need to do is follow the example of Washington State. You build power plants that you don't need far away from your population centers. Yes, right on the border of another country, let's call it "Canada" for argument sake. Right next to their major population center in that area. See, no problem with lack of power, no problem with your own population! :( Peter

    The Lounge

  • CListCtrl and selected rows in a dialog
    P Peter Jones

    Yes, that's exactly what I was looking for. Thanks! Peter

    C / C++ / MFC

  • Forcing the system tray clock to redraw
    P Peter Jones

    After more searches, I found it. ::SendMessage(HWND_TOPMOST, WM_TIMECHANGE, 0, 0); Peter

    C / C++ / MFC

  • Forcing the system tray clock to redraw
    P Peter Jones

    I've tried various pieces of sample code to find the system tray window, and the system clock window, but none of them seem to work. I even tried searching for the window by title, creating a title from the current time. No go. What I want to do it force the clock to redraw after I've updated the time. Anybody had success in this area? Peter

    C / C++ / MFC

  • CListCtrl and selected rows in a dialog
    P Peter Jones

    Thanks, that pointed me in the right direction. It doesn't quite work that way, so I need to do something like this: CMyDialog:OnInitDialog... CRect rcWin; m_ListCtrl.GetWindowRect(&rcWin); ScreenToClient(&rcWin); DWORD nStyle = m_ListCtrl.GetStyle(); UINT nID = ::GetWindowLong(m_ListCtrl.m_hWnd,GWL_ID); long nExStyle = m_ListCtrl.GetExtendedStyle(); m_ListCtrl.DestroyWindow(); m_ListCtrl.Create(nStyle | WS_BORDER | LVS_SHOWSELALWAYS, rcWin, this, nID); m_ListCtrl.SetExtendedStyle(nExStyle | WS_EX_WINDOWEDGE); Still haven't figured out how to get the standard 3-d border on the listcontrol. Tried all sorts of WS_ and WS_EX_ but it doesn't seem to go. May have to leave it that way. Peter

    C / C++ / MFC

  • CListCtrl and selected rows in a dialog
    P Peter Jones

    I've got a CListCtrl in a dialog that selects a row. The problem is that the selection disappears when I click on a another control in the dialog and the focus moves there. How can I make the CListCtrl continually show the selected row, without going to custom draw, etc? Thanks. Peter

    C / C++ / MFC

  • "Cannot open file mfc42u.lib"
    P Peter Jones

    Thanks!

    C / C++ / MFC

  • "Cannot open file mfc42u.lib"
    P Peter Jones

    I read about some clock synchronizing classes at http://www.codeproject.com/internet/csntp.asp and wanted to give them a try. When building, Visual Studio 6.0 gave an error 'LINK : fatal error LNK1104: cannot open file "mfc42u.lib"'. I then downloaded service pack 5 for Visual Studio 6.0 and tried again. The same error. I've scanned my Studio directory and sub-directories and that file is not on my drive. Has anyone else come across this problem? Peter

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups