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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
T

Tre K Renegade

@Tre K Renegade
About
Posts
12
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • getting notifications from child controls...
    T Tre K Renegade

    Thanks but no luck, The Notify property was enabled and the dialog is indeed the parent. (I checked with: m_cMyListCtrl.GetParent()->m_hWnd == this->m_hWnd )

    C / C++ / MFC question

  • getting notifications from child controls...
    T Tre K Renegade

    Hi, I've got a dialog with a simple listbox on it and I want my dialog class to be notified when the user rightclicks on the listbox. TN061 says to add ON_NOTIFY to the message map: ON_NOTIFY(NM_RCLICK, IDC_LIST1, OnListRightClick) and add a handler function with this prototype: afx_msg void OnListRightClick( NMHDR * pNotifyStruct, LRESULT * result ); That's what I did, but it doesn't seem to work. The handler function is never called. Anyone? Thanks, ren.

    C / C++ / MFC question

  • Bug in Visual C++ 6.0 MFC Appwizard
    T Tre K Renegade

    I just wanted to report this bug and check if anyone else has come across it: In Visual C++ 6.0, when using the MFC Appwizard to create an MFC project with the following settings: - single doc & NO doc/view support - NO toolbar & NO statusbar And then compiling the skeleton program code without applying any changes, the resulting exe crashes on startup. Apparently the child window for the view is not created correctly, because when the frame window tries to set the focus to it, it's window handle is invalid. This only seems to happen with the exact settings described above.

    C / C++ / MFC c++ help

  • CListCtrl - stop headers from being resized
    T Tre K Renegade

    I have to admit I don't really understand everything being explained in the thread, but no worries: it works now. I'll just give a short report for any interested parties too lazy to check the thread you mentioned: PROBLEM: Stop CListCtrl column headers from being resized. SOLUTION: Let your view handle the HDN_BEGINTRACK message and have it return TRUE. void CMyList::OnBegintrack(NMHDR* pNMHDR, LRESULT* pResult) { HD_NOTIFY *phdn = (HD_NOTIFY *) pNMHDR; *pResult = TRUE; } BUG: Something about the class wizard messing up and another thing about unicode and ansi, which results in your handler never being called. FIX: Edit your message map manually. First remove: ON_NOTIFY_REFLECT(HDN_BEGINTRACK,OnBeginTrack) And instead add: ON_NOTIFY(HDN_BEGINTRACKW, 0, OnBegintrack) ON_NOTIFY(HDN_BEGINTRACKA, 0, OnBegintrack) That's it. Thanks 4 the help, guys.

    C / C++ / MFC question

  • CListCtrl - stop headers from being resized
    T Tre K Renegade

    Sorry guys, but it's still not working. I've tried changing the message map as directed, but nothing happens. The message is still not sent. (I've checked with a messagebox.) I noticed that the MSDN article refers to CListView while I'm working with a CListCtrl. Could this have anything to do with it?

    C / C++ / MFC question

  • CListCtrl - stop headers from being resized
    T Tre K Renegade

    Hi, I tried this, but nothing seems to happen. Resizing is still possible. I just used the classwizard to add a handler for =HDN_BEGINTRACK and made the change you suggested, like this: void CMyList::OnBegintrack(NMHDR* pNMHDR, LRESULT* pResult) { HD_NOTIFY *phdn = (HD_NOTIFY *) pNMHDR; *pResult = TRUE; } Perhaps there is something else I'm doing that's preventing your solution from working. But I can't find anything out of the ordinary. I just SubClassDlgItem() and set the extended style to include gridlines and fullrowselect. Any ideas? Thanks. Ren.

    C / C++ / MFC question

  • CListCtrl - stop headers from being resized
    T Tre K Renegade

    Hi everybody, For a CListCtrl with the report style, is there an easy way to prevent the user from resizing the column headers? I was hoping there would be a style setting for this, but I can't find it. Thanks a lot. Ren

    C / C++ / MFC question

  • rollover buttons & WM_MOUSEMOVE & stuff
    T Tre K Renegade

    Thanks. This was exactly the type of solution I was looking for. Just a note though: I had to use _TrackMouseEvent instead of TrackMouseEvent. Apparently the regular TrackMouseEvent is not supported on all Windows platforms (mine is XP and the compiler threw an 'undeclared identifier'). But you can still use _TrackMouseEvent; it just calls TrackMouseEvent if it is defined and emulates it if not. Thanks again.

    C / C++ / MFC database help tutorial question

  • rollover buttons & WM_MOUSEMOVE & stuff
    T Tre K Renegade

    Hi, Anyone have any suggestions on how to solve the following prob? The interface of my app is built out of several different child windows and one of those contains a small coloured square. When you move the mouse over it some text is displayed. The problem is that when you move the mouse out of the square AND out of the child window too fast the text doesn't disappear, because the WM_MOUSEMOVE message doesn't fire fast enough. I suppose I could solve it by letting the rollover trigger a timer loop that keeps checking whether the mouse is still over the square, but that seems like a difficult solution. Perhaps there is a more graceful solution; like an event that fires when the mouse leaves the child window or something? Thanks, ren

    C / C++ / MFC database help tutorial question

  • How to implement a 'please wait' dialog..
    T Tre K Renegade

    Hi people, Does anyone have any suggestions on how to implement the following: I've made a three page wizard and after the user clicks finish on the third page, I want to pop up a small dialog with nothing but a cancel button and a "Please wait while the data is being saved." message. My initial plan was to let that dialog do the saving, although that means I'll need to make some detours to access the data that needs to be saved. The problem with that is that I can't seem to find the right windows message handler to start the saving procedure in. Basically, I can't find a WM that fires right after the dialog is shown on screen. Another approach would be to let the wizard itself handle the saving, but in that case I'd have to make my 'please wait' dialog non-modal. And naturally, I don't want the user tampering with the wizard while it's saving. On top of that, it becomes more complicated to implement the cancel button. I can't see that happening without setting up separate threads. That somehow seems too complicated. Anyone feel like pointing out the simple path that I'm sure is there somewhere? Thanks a lot... ren

    C / C++ / MFC help tutorial question

  • Modal dialogs fon't show after main dialog shuts down
    T Tre K Renegade

    Perfect. Thanks a lot.

    C / C++ / MFC question help

  • Modal dialogs fon't show after main dialog shuts down
    T Tre K Renegade

    Hi people, A small question. In a dialog-based app, why is it impossible to start up a new dialog after the main dialog closes? (i.e. right after the DoModal returns in the app's InitInstance handler) Even when you try to pop up a simple MessageBox it doesn't show. You can just hear the typical MessageBox 'Bling', but then the app shuts down. Can anyone explain why this is the case? And what I should do to achieve my goal: showing a 'saving, please wait' dialog after the users hits finish in my wizard. Thanks a lot for your help, ren

    C / C++ / MFC question help
  • Login

  • Don't have an account? Register

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