Using MapPoint Print Dialog in Delphi application

Microsoft MapPoint

Is there a way to utilize the MapPoint Print dialog in Delphi? Using the
ActiveX from MP 2004.

tia,

Bob M..
Ok, figured it out myself with some help from the MP2K site. Figured I'd
share it here:

procedure TfrmMap.Print1Click(Sender: TObject);
var vHandle: HWND;
vClassName: string;

function GetClassNameFromHandle(AHandle: HWND): string;
var vName: array[0..MAX_PATH] of char;
i: Integer;
begin
i := GetClassName(AHandle, vName, MAX_PATH);
result := vName;
SetLength(result, i);
end;

begin
vHandle := FMapPointControl.Handle;
while vHandle <> 0 do begin
vClassName := GetClassNameFromHandle(vHandle);
if vClassName = 'AfxFrameOrView42' then begin
PostMessage(vHandle, WM_COMMAND, 55955, 0);
exit;
end;
vHandle := GetWindow(vHandle, GW_CHILD);
end; // while
//do error message here
end;
What page did you find it on? in the forum or an article?

Eric
Eric,

It was an article:
http://www.mp2kmag.com/a88--ActiveX.MapPoint.extend.mappoint.html


Bob M..