Author Topic: BCX_SPLITTER  (Read 503 times)

airr

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
BCX_SPLITTER
« on: November 04, 2024, 05:24:17 PM »
Hi, Kevin.

Would it be possible to add WM_CONTEXTMENU to the "SplitterWndProc" so that it gets passed to the Parent hWnd?

This would be around line 33342 in BC.bas

Code: [Select]
        FPRINT FP_WRITE, "    if (msg==WM_COMMAND || msg==WM_NOTIFY || msg==WM_HSCROLL || msg==WM_VSCROLL || msg==WM_CTLCOLOREDIT ||"
        FPRINT FP_WRITE, "        msg==WM_CTLCOLORSTATIC || msg==WM_CTLCOLORBTN || msg==WM_CTLCOLORLISTBOX ||msg==WM_CTLCOLORSCROLLBAR ||"
        FPRINT FP_WRITE, "        msg==WM_MEASUREITEM || msg==WM_DRAWITEM)"
        FPRINT FP_WRITE, "    {"
        FPRINT FP_WRITE, "      return SendMessage(GetParent(hwnd), (UINT_PTR)msg, (WPARAM)wParam, (LPARAM)lParam);"
        FPRINT FP_WRITE, "    }"

I'm working with the Splitter object in a project, and it almost drove me crazy as to why I couldn't display a context menu, until I looked at the generated C source.

Sneak peak of what I'm working on is attached.  :)

AIR.


MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2476
    • View Profile
Re: BCX_SPLITTER
« Reply #1 on: November 04, 2024, 08:18:15 PM »
Hi Armando -- yes, I've done as you requested. 

The sneak peak looks great and should be a useful utility when completed.


jbk

  • Sr. Member
  • ****
  • Posts: 298
    • View Profile
Re: BCX_SPLITTER
« Reply #2 on: November 05, 2024, 06:47:41 AM »
airr, I look forward to your completed snippet manager, I like what I see 👍😁

airr

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
Re: BCX_SPLITTER
« Reply #3 on: November 11, 2024, 05:28:05 PM »
Still need to cleanup some of the code, so this is a binary-only preview which I ordinarily don't do.  Source will be released under a MIT license once it's cleaned up/refactored. And will be posted in a different area of this forum.  ;D

To add a new snippet, hit ctrl-n, enter the snippet name, and then paste your code into the editor.  Then hit ctrl-s to save.

To delete a snippet, right click on it and select 'Delete' from the popup-menu.

I'm posting this preview in the hopes of getting some feedback...

AIR.