waldemarlima Posted December 20, 2015 Posted December 20, 2015 hi everyone , i have problems with width and height , how i do to get width and height and apply to window ? screenshot > http://prntscr.com/9gkg53 Quote
macklebee Posted December 20, 2015 Posted December 20, 2015 hi everyone , i have problems with width and height , how i do to get width and height and apply to window ? Are you asking about the lines that you have commented out? int width = Context::GetWidth() int height = Context::GetHeight() or are you asking about the System:GetProperty()? If the former, I assume that will not work (if uncommented) due to the fact that the context is not created yet so there is nothing to get. If the latter, then look at the System:GetProperty() in the documentation. That is driven by adding properties to the application command line. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
waldemarlima Posted December 21, 2015 Author Posted December 21, 2015 dont return nothing ... when i call System::GetProperties("screenwidth"); screenshot : http://prntscr.com/9glqi3 Quote
macklebee Posted December 21, 2015 Posted December 21, 2015 Did you specify a command line property when you ran the application? If not, then it will not return anything. That is why 'System::GetProperty()' allows for you to set a default value in case the specified property is not found. static std::string GetProperty(const std::string& key, const std::string defaultvalue="") example: string w = System::GetProperty("screenwidth", "768"); And FYI, if you are just posting code, it would be easier if you just posted it in the forum using code tags. 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.