Commit Graph
11 Commits
Author SHA1 Message Date
Claude 9c122b551d Merge main into claude/project-thread-jmt4ab
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-17 15:18:22 +00:00
Claude 84ebbc4ed6 Native WinInet, and inettest on Linux and macOS
port/src/wininet.cpp implements WinInet over BSD sockets: sessions,
connections and status callbacks, URL cracking, HTTP requests with
headers, chunked bodies, redirects and cookies, and FTP with passive
and active transfers and listings. HTTPS fails to connect for now, and
Gopher stays a stub. FormatMessage knows the Internet error texts.

The winsock wrappers take a size_t length, so a call with sizeof is no
longer ambiguous with the system's. inettest and ctltest find the
program's directory with either separator, and build file URLs from
absolute POSIX paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-17 15:18:06 +00:00
Claude d927f0e410 Save controls and OLE documents in Visual C++ MFC's formats
COleControl's stream (IPersistStreamInit, IPersistStorage) now has the
layout Visual C++ MFC writes: the version, extents, a stock-property
mask, the stock properties in MFC's order, and objects as a presence
byte (00, or FF for none) followed by OleSaveToStream's data. Property
bags use MFC's types (unsigned values as signed, blobs as a blob object
with MFC's class ID). A stream that fails to load leaves the control as
new.

COleClientItem writes MFC's item record: fixed fields, the item number
and the draw aspect, with flat or compound storage chosen by the
document.

The tests load a stream saved by MFC 4.2 and save it back byte for byte,
and check the property bag and document layouts.

Also adds CArchiveException::generic and CFileException::generic, the
names Visual C++ 6 used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-17 14:08:51 +00:00
Claude a50b9d7958 Finish control containment: property frames, drawing flags, pointer inactivity
- COleControlSite::ShowPropertyFrame shows a contained control's
  property pages, and IOleControlSite::ShowPropertyFrame lets a control
  ask its container for them.
- COleControl implements IViewObjectEx (hit testing, GetRect, view
  status) and IPointerInactive for controls with the pointerInactive
  flag, and honors the clipPaintDC, canOptimizeDraw and
  noFlickerActivate flags.
- An asynchronous moniker file's bind status callback can be
  aggregated by the pUnkControlling of CreateBindStatusCallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-11 13:46:07 +00:00
Claude 66c267dd0f Add CPictureHolder, PX_Picture and the stock property pages
CPictureHolder wraps a control's picture property (empty, bitmap,
metafile or icon), and PX_Picture saves it through the picture's own
persistence. CColorPropPage, CFontPropPage and CPicturePropPage (on
CStockPropPage) list the objects' properties of their kind and set them
on Apply. Their templates are built in memory. Where the system has no
pages for the stock CLSIDs, as under Wine, COleControl::OnProperties
registers these for its property frame while the frame is up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-08 04:24:38 +00:00
Claude 153863a747 IPrint for DocObjects, and extended controls
CDocObjectServer's IPrint now prints: GetPageInfo asks the document's
view for its pages, and Print runs the view's printing to the
container's printer, with page sets, the continue callback, counting
only (PRINTFLAG_DONTACTUALLYPRINT) and printing to a file.
COleDocObjectItem::DoDefaultPrinting prints through IPrint, or else
through the object's Print command.

COleControlSite gives its control an extended control
(IOleControlSite::GetExtendedControl): Name, Object, Parent, Left,
Top, Width, Height, Visible and ID, with the control's own properties
and methods through the same IDispatch. COleControl::GetExtendedControl
asks the container for it.

Tests: docobtest prints through IPrint; ctltest uses the extended
control. The test programs' stray logs in the top folder are ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-07 20:13:49 +00:00
Claude b5453ae454 Data path properties and moniker files
CMonikerFile reads what a URL or moniker names through URL monikers;
CAsyncMonikerFile does it while the program runs, reporting through
OnStartBinding, OnProgress, OnDataAvailable and OnStopBinding.
CDataPathProperty and CCachedDataPathProperty build on it for controls,
with the container's bind host from the client site; PX_DataPath saves
the path and starts the download on load, and COleControl::Load starts
one from a new path. ctltest downloads a local file all three ways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-07 13:54:57 +00:00
Claude 26931b9c97 Controls: AfxVerifyLicFile, and tests of control licensing
AfxVerifyLicFile checks that a license file beside the module starts
with the expected text. A factory now checks again for a license that
was missing, so one installed while the program runs is seen. ctltest
covers a licensed control through IClassFactory2 (with and without the
file, with the right and a wrong run-time key) and through
CreateControl with a key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-07 13:20:45 +00:00
Claude 1ffb844f68 Controls: verb maps, IPerPropertyBrowsing and IQuickActivate
ON_OLEVERB and ON_STDOLEVERB entries in a control's message map handle
IOleObject::DoVerb, and IOleObject::EnumVerbs lists the custom verbs
(plus Properties when the control has pages). The control also answers
IPerPropertyBrowsing (display strings, property-to-page mapping,
predefined values) and IQuickActivate. ctltest covers all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-07 12:50:51 +00:00
Claude 1aa53e0159 Add COlePropertyPage and the DDP_ functions
COlePropertyPage implements IPropertyPage2 over an ordinary dialog
template, made a child window of the property frame, with its size from
the template's font, dirty tracking of its controls (radio groups by
their first button), IgnoreApply, and Apply writing the changed values
to every object. The DDP_ functions read the first object's properties
by name when the page loads and queue the changed ones for
DDP_PostProcessing.

ctltest's control gains a page, checked through IPropertyPage and in
the frame of the Properties verb (Wine's frame never calls Apply).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-07 12:16:25 +00:00
Claude 611f73fe9c Add COleControl for writing ActiveX controls
afxctl.h gains COleControl (the OLE control interfaces, in-place
activation, stock properties, methods and events, ambient properties,
IViewObject drawing, and persistence through streams, storages and
property bags), COleControlModule, event maps, DECLARE_OLECREATE_EX,
DECLARE_OLECTLTYPE, DECLARE_PROPPAGEIDS, CFontHolder, CPropExchange
with the PX_ functions, and the registration helpers.

ctltest hosts a COleControl subclass through the containment code and
checks properties, events, drawing, persistence and registration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUqfQ3sTcDCMdNCGGs
2026-11-07 10:49:31 +00:00