Now I have another problem with ” OnPrintToHdcNewPage”.
When I enter to this event, my parameter apageno=1 – always!
In the “gant.printToHdc” func. I have ‘theStopDate’ parameter more then may see on the screen,and I have item in this invisible on the screen’period.
What I must define for getting 2 page?
The page breaking functionality of the phGantTimePackage will help you to break up your data in pages over the Y axis (ie the Grid rows).
Bad news: The OnPrintToHdcNewPage will be of much use if you only want to break pages over the x-axis (ie time axis)
Good news: Splitting a print over the X-Axis is much easier than splitting over the Y-axis. You simply call PrintToHdc twice. First one time, then update your Start and Stop time interval, possibly change the grid width, then call printToHdc with the same devicecontext (hdc) again.
If you want to combine a split of pages for both X and Y axis you simple implement the OnPrintToHdcNewPage and handle the more complex Y-axis split.
You get page one all the time in OnPrintToHdcNewPage because you do not have enough data in the grid to flow over your bounds of printing one page.