Author Topic: Add a border to a main window (IBM's Cs)  (Read 6143 times)

xynixme

  • Guest
Add a border to a main window (IBM's Cs)
« on: January 19, 2017, 11:45:46 am »
C/Set++ code, to be renewed to VAC3: how do you "add a (specific) border to a main window"? I've tried to insert a pasted and apparently required "| FCF_DLGBORDER" somewhere (and executed "RC -r ..." and "RC ..."), but still no border.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Add a border to a main window (IBM's Cs)
« Reply #1 on: January 19, 2017, 08:11:02 pm »
Do want a resizable border (FCF_SIZEBORDER) or non-sizeable (FCF_BORDER) or (FCF_DLGBORDER)?

xynixme

  • Guest
Re: Add a border to a main window (IBM's Cs)
« Reply #2 on: January 22, 2017, 03:06:38 am »
Do want a resizable border (FCF_SIZEBORDER) or non-sizeable (FCF_BORDER) or (FCF_DLGBORDER)?

Non, hence FCF_DLGBORDER?. There's an assumption that the original author wasn't aware of the availablity of non-sizeable, so he didn't use a border. It's better to "add a border", but that's a bit too cryptic. Just OR'ing FCF_DLGBORDER didn't work.
« Last Edit: January 22, 2017, 03:11:46 am by André Heldoorn »

Pete

  • Hero Member
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • View Profile
Re: Add a border to a main window (IBM's Cs)
« Reply #3 on: January 22, 2017, 03:27:04 am »
Hi

I'm not a "c" programmer but is FCF_DLGBORDER a border for a dialog window not a main window? - or does that not make a difference in "c"?


Regards

Pete

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
Re: Add a border to a main window (IBM's Cs)
« Reply #4 on: January 22, 2017, 05:02:06 am »
@Pete, the difference with FCF_DLGBORDER is that it is thicker then FCF_BORDER, it'll work for any frame.
@André, what's the full call to flFrameOpts()? I notice you mention rc in your original post, I'm not sure if you can change the frame with a resource though I'll admit to not knowing much about resources yet.

xynixme

  • Guest
Re: Add a border to a main window (IBM's Cs)
« Reply #5 on: January 22, 2017, 09:21:19 pm »
@Pete, the difference with FCF_DLGBORDER is that it is thicker then FCF_BORDER, it'll work for any frame.
@André, what's the full call to flFrameOpts()? I notice you mention rc in your original post, I'm not sure if you can change the frame with a resource though I'll admit to not knowing much about resources yet.
Solved... Good questions... The FCF_DLGBORDER was actually proposed by a rather well-known author of PM apps, but the instruction to add a frame was as clear as telling to using a pragma to thunk the pointer to a C++ function wrapper.

Dave's "call" refers to a function and not to a resource. I finally found this function, appended FCF_DLGBORDER, recompiled *.*, and it works. I assumed it was harder, because the well-known author didn't change this single line of code. I didn't append any other FCF_* setting:


FCF_SYSMENU | FCF_MINBUTTON | FCF_ICON | FCF_MENU | FCF_TASKLIST |
FCF_TITLEBAR | FCF_ACCELTABLE | FCF_DLGBORDER


So I've learned that specific resources weren't involved in this case. I did mention using RC to avoid that the community had to ask if I had recompiled a changed resource file too.