Ive run into a few problems and need help!

Started by
3 comments, last by nooblet 15 years, 5 months ago
Ok, so yeah ive got a few problems here i wanted to know how to fix them, so here they are: 1) because i have set up a windows class with windows procedure as a static method inside the class i cant call any of the functions inside the windows class. this is particularly anoyying because now the windows procedure has become useless.. and i cant really pass a pointer to an object of its own class so what can i do here? 2) i have a d3d font class set up which automaticly sets the width and height of the textbox to draw text in, to the size of the client area but when i call my pWnd->Update() (updates the client and window rect) the textbox gets completely thrown off.. i dont know how to explain it but the text box is not the size of the client area. my solution was to use the size of the back buffers in d3d instead, But why does this happen? 3) Ok so i want to be able to use the mouse to operate on my GUI (which i will eventually make). I used GetCursorPos() and ScreenToClient() to do this, but when i again, rezise my window teh size of the backbuffer differs so it screws up the positioning.. How can i compensate for the size of backbuffer so that no mater the size of the window my cursor will hit the right position Im sorry i couldnt explain any better if you dont understand. Thanks for reading ~Reegan PS: if any further explaination/code is needed just let me know :) [Edited by - Reegan on November 16, 2008 3:48:50 PM]
Advertisement
Quote:Original post by Reegan
1) because i have set up a windows class with windows procedure as a static method inside the class i cant call any of the functions inside the windows class. this is particularly anoyying because now the windows procedure has become useless.. and i cant really pass a pointer to an object of its own class so what can i do here?


Link.
Thanks! thats one problem solved [smile]

still need answers to 2 and 3

thanks again [grin]

[Edited by - Reegan on November 16, 2008 5:52:52 PM]
I'm not sure if this will help but I googled "resizing back buffers directx" and found this.

Hope this helps.
"All you have to decide is what to do with the time that is given to you." - Gandalf
Quote: Original post by Reegan
3) Ok so i want to be able to use the mouse to operate on my GUI (which i will eventually make). I used GetCursorPos() and ScreenToClient() to do this, but when i again, rezise my window teh size of the backbuffer differs so it screws up the positioning.. How can i compensate for the size of backbuffer so that no mater the size of the window my cursor will hit the right position


Link.

This topic is closed to new replies.

Advertisement