Through Laplace transforms, we study the extremes of a continuoustime Markov-additive process with one-sided jumps and a finite-state background Markovian state-space, jointly with the epoch at which the extreme is 'attained'. For this, we investigate discrete-time Markov-additive processes and use an embedding to relate these to the continuous-time setting. The resulting Laplace transforms are given in terms of two matrices, which can be determined either through solving a nonlinear matrix equation or through a spectral method. Our results on extremes are first applied to determine the steady-state buffer-content distribution of several single-station queueing systems. We show that our framework comprises many models dealt with earlier, but, importantly, it also enables us to derive various new results. At the same time, our setup offers interesting insights into the connections between the approaches developed so far, including matrix-analytic techniques, martingale methods, the rate-conservation approach, and the occupation-measure method. We also study networks of fluid queues, and show how the results on single queues can be used to find the Laplace transform of the steady-state buffer-content vector; it has a matrix quasi-product form. Fluid-driven priority systems also have this property.