Search Results

Search found 5 results on 1 pages for 'omatai'.

Page 1/1 | 1 

  • Safe mode boot with no change on screen but ongoing hard disk activity - why?

    - by omatai
    I have a machine with a dying hard drive - bad sectors are starting to multiply :-( The first sign (24 hours ago) was that it had an unmountable boot volume. At this time, I tried booting to safe mode with command prompt, which worked, after which I rebooted normally and ran a chkdsk. It has since been working as well as I could expect, but slowly getting less reliable. So I scheduled another chkdsk on both partitions (C: - boot, D: - data), having freed up a lot of space on both partitions to give Windows a little more scope for repairs (hopefully?). I then rebooted. On reboot, it protested about the unmountable boot volume again, so I booted to safe mode. I got the same list of drivers loaded as yesterday, and then no change to the screen for the past 2 hours. However, I see a flickering hard drive indicator light - not always on, but seldom ever off. What is happening? Is the chkdsk that runs in safe mode one which produces nothing on the screen and so chkdsk could be doing its thing... or is Windows still trying (but failing) to boot into Safe Mode?

    Read the article

  • Adding click/double-click events to static group box controls

    - by omatai
    Having realised my own reasons were way too dubious, I've now gone about this a different way. But I'm still curious... For reasons of nostalgia, familiarity and laziness, I'm coding a UI with MFC. For dubious reasons (as if those were not enough), I wanted to add a (double-)click event to a group box. Naturally, the group box contains things - in fact, it contains another static item, to which I can successfully add a (double-)click event handler. Is there any reason I cannot get an event handler to work for clicks on my group box the same way I can do that for the simple text static item? No amount of clicking on, in or near the control fires the event. Note - I've read through http://www.codeproject.com/KB/static/staticctrl_tut.aspx and tried responding to both ON_STN_... events and ON_BN_... messages, setting the notify style (BS_NOTIFY appears in the rc file)... and still I'm missing something - what is it? Is it even possible? Most of what I've googled suggests it is... but without clear answers for C++/MFC. Since first posting this question, I've found reference to a WM_NCHITTEST message, and hints that you have to create a handler for this message to override the group box default behaviour of responding with HT_TRANSPARENT... despite having its transparent property in ClassWizard set to false. Hmmm. Can anyone confirm that this is indeed the key?

    Read the article

  • syntax help required on templated static member function

    - by omatai
    I have a bunch of containers of object pointers that I want to iterate through in different contexts to produce diagnostics for them. I'm struggling with the syntax required to define the functions... which, on account of these objects filtering through diverse parts of my application, seem best encapsulated in a dedicated diagnostics class thus: // Code sketch only - detail fleshed out below... class ObjectListDiagnoser { public: static void GenerateDiagnostics( /* help required here! */ ); }; ... // Elsewhere in the system... ObjectListDiagnoser::GenerateDiagnostics( /* help required here! */ ); What I'd like to be able to do (in places across my application) is at least this: std::vector<MyObject *> objGroup1; std::list<MyObject *> objGroup2; ObjectListDiagnoser::GenerateDiagnostics( objGroup1.begin(), objGroup1.end() ); ObjectListDiagnoser::GenerateDiagnostics( objGroup2.begin(), objGroup2.end() ); ObjectListDiagnoser::GenerateDiagnostics( objGroup1.rbegin(), objGroup1.rend() ); I have tried to template my function in two ways, with no success: class ObjectListDiagnoser { public: // 1 - nope. template <class ObjIter> static void GenerateDiagnostics( ObjIter first, ObjIter last ); // 2. - nope. template <class Container, class ObjIter> static void GenerateDiagnostics( Container<MyObject *>::ObjIter first, Container<MyObject *>::ObjIter last ); }; Can someone provide the correct syntax for this? The container type will vary, and the direction of iteration will vary, but always for the same type of object.

    Read the article

  • Coupling an MFC CListCtrl and CTreeCtrl to get a view of the whole tree, not just one node at a time

    - by omatai
    Consider Windows Explorer (or regedit or similar). To the left side, there is a tree view, and to the right, a list view. In all cases I know of, the contents of the right view reflect the attributes of the selected node from the left pane. This is all well and good... but just not what I want. The nodes of the tree I want to display have a very few attributes (2-3) associated with each node - a reasonable amount to display horizontally as a row in a table. Rather than waste all that list view space on a single node with very few properties, I would like to have my list view display a table of the whole tree's properties (as the part of the tree currently expanded). So the nth line in the left view (tree) will correspond directly to the nth line in the right view (list/table), and I will get a decent overview of the properties of my tree. Does anyone know of code that does this? I am guessing that slaving a CListCtrl to a CTreeCtrl would be the way to go, and somehow overriding the vertical scrolling functions so that they are locked together. I'm just not sure that it is possible to lock the scrolls together like this... among other things! All advice gratefully welcomed :-)

    Read the article

  • When is a bool not a bool (compiler warning C4800)

    - by omatai
    Consider this being compiled in MS Visual Studio 2005 (and probably others): CPoint point1( 1, 2 ); CPoint point2( 3, 4 ); const bool point1And2Identical( point1 == point2 ); // C4800 warning const bool point1And2TheSame( ( point1 == point2 ) == TRUE ); // no warning What the...? Is the MSVC compiler brain-dead? As far as I can tell, TRUE is #defined as 1, without any type information. So by what magic is there any difference between these two lines? Surely the type of the expression inside the brackets is the same in both cases? [This part of the question now satisfactorily answered in the comments just below] Personally, I think that avoiding the warning by using the == TRUE option is ugly (though less ugly than the != 0 alternative, despite being more strictly correct), and it is better to use #pragma warning( disable:4800 ) to imply "my code is good, the compiler is an ass". Agree? Note - I have seen all manner of discussion on C4800 talking about assigning ints to bools, or casting a burger combo with large fries (hold the onions) to a bool, and wondering why there are strange results. I can't find a clear answer on what seems like a much simpler question... that might just shine line on C4800 in general.

    Read the article

1