
365 S.E.2d 662 (1988)
Ruth S. MOORE and Robert Moore, Jr.
v.
Richard Lee MOORE and Carol Wood Moore.
No. 8721DC658.
Court of Appeals of North Carolina.
March 15, 1988.
Victor M. Lefkowitz, Winston-Salem, for plaintiffs-appellants.
Cofer, Mitchell and Tisdale by Eddie C. Mitchell and Maureen T. Orbock, Winston-Salem, for defendants-appellees.
PHILLIPS, Judge.
Plaintiffs sued to obtain an order permitting them to visit defendants' minor children on a regular basis and the court dismissed the action pursuant to defendants' motion. Though the order is phrased as one of summary judgment under Rule 56, N.C. Rules of Civil Procedure, since it is based only upon an examination of the complaint, we treat it as a judgment on the pleadings pursuant to Rule 12(b)(6), N.C. Rules of Civil Procedure. Town of Bladenboro v. McKeithan, 44 N.C.App. 459, 261 S.E.2d 260, appeal dismissed, 300 N.C. 202, 282 S.E.2d 228 (1980). In substance the complaint alleges the following: Defendants, married for ten years, are living together with their three children and are fit and proper persons to have their custody; defendants' custody of their children *663 has never been challenged and is not challenged by plaintiffs who are the paternal grandparents of the children; in September, 1986 because of differences about a business matter defendants stopped plaintiffs from visiting the children; before then plaintiffs visited the children often and the children often visited them; the children greatly benefited from the visits and their best interests would be served by the court entering an order confirming defendants' custody of the children and permitting plaintiffs to resume visiting them on a regular basis.
The allegations do not state a claim for which our law authorizes relief, Rule 12(b)(6), N.C. Rules of Civil Procedure, and the order dismissing the complaint is affirmed. It is fundamental that parents who have lawful custody of their minor children have the prerogative of determining with whom their children shall associate, and in a similar case a grandmother's action to enforce her claimed visitation rights was dismissed. Acker v. Barnes, 33 N.C.App. 750, 236 S.E.2d 715, cert. denied, 293 N.C. 360, 238 S.E.2d 149 (1977). The only possible authority for plaintiffs' claim is that since Acker was decided the General Assembly amended the statutes governing the custody of children to provide that "[a]n order for custody of a minor child may provide visitation rights for any grandparent of the child as the court, in its discretion, deems appropriate." G.S. 50-13.2(b1). While this provision authorizes the court to provide for the visitation rights of grandparents when the custody of minor children is being litigated, it does not authorize the court to enter such an order when the custody of the children is not even in issue. That the children would benefit from the visits, as we must assume that they would, Smith v. Ford Motor Co., 289 N.C. 71, 221 S.E.2d 282 (1976), is not enough by itself to make the action enforceable. For our courts have no blanket commission from the law to control children for their benefit, but can only exercise dominion over them as the law authorizes, and the trial judge had no authority to exercise dominion over defendants' children in this instance.
Affirmed.
WELLS and PARKER, JJ., concur.
