Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - Invalidating | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Lenophis Super Koopa Level: 44 Posts: 495/830 EXP: 584360 For next: 26925 Since: 03-15-04 From: Duluth, MN Since last post: 4 hours Last activity: 3 hours |
| ||
Ok, got the HPEN thing out of the way, now I have a new problem, but much more minor. The dialog with my tiles is the parent, the map dialog is the child, and when the user selects a tile with the right click on the map, the info is updated, but the parent doesn't refresh the box if it needs to. Looking through some WndProc, I noticed that WM_NCPAINT, WM_NCRBUTTONDOWN and WM_NCLBUTTDOWN would work for me, but they aren't. I basically need to redraw the parent when the user clicks the right mouse button on the child, so it'll redraw properly. I thought by sticking an InvalidateRect in that case would do the trick, but it hasn't. Is there something else I'm missing? |
|||
sloat Level: 16 Posts: 62/85 EXP: 18044 For next: 2212 Since: 05-21-04 From: South Central Delaware Since last post: 19 days Last activity: 5 hours |
| ||
the NC messages mean non-client area (ie, the titlebar, borders, etc.). InvalidateRect should work. Make sure you have the correct window handle and make sure you set the last param of InvalidateRect to TRUE. If it's still not working, try also specifying NULL for the lpRect param. If that's still not working, you might have something wrong with your repainting code. InvalidateRect will cause a WM_PAINT message to get sent, though not always immediately. If possible, you should just reblit the tile to the parent, especially if you have to use NULL for lpRect. |
|||
Lenophis Super Koopa Level: 44 Posts: 499/830 EXP: 584360 For next: 26925 Since: 03-15-04 From: Duluth, MN Since last post: 4 hours Last activity: 3 hours |
| ||
Originally posted by sloat I managed to get it to work, in the child, just have it do the Invalidating, but using the parentwnd as the handle. No biggie, but now it flickers. As for the lpRect, the only way it has been able to work so far is if I pass NULL to it. If it wasn't NULL, not everything was drawn at once. But now that the Invalidating issue is solved, one more problem! I'm also not going to make another thread for it either. I'll let the screenshot do the talking: Funny how everything comes back to FFHackster... Anyway, when you scroll around on Hackster's map editor, it'll keep the position of the tile you had clicked on, and that's what I've been trying to do with Jade. If the scroll bars start at the left and top positions, place and scroll, everything works fine. If I scroll one tile in either direction, place, and scroll again, it's off. I tripled checked my X/Y tile placing coordinates, those are fine. I know my problem is the position of the scroll bars, because my calculations have been off everytime. I'd rather get this in place, and then after that it's map compression! (whoo-hoo........) Anyone have an idea on how I can persue this one? --Edit-- Although I probably shouldn't, you can get a good idea as to what I'm talking about here. And I've come prepared:
(edited by Lenophis on 06-23-05 05:14 AM) |
|||
beneficii Lakitu Level: 36 Posts: 182/567 EXP: 299656 For next: 8454 Since: 06-27-04 From: Cordova, TN, USA Since last post: 14 hours Last activity: 6 hours |
| ||
...And if you're totally desperate on getting the window redrawn, like me in my editor, send a WM_SETREDRAW message to the window, and then have the drawing code under the WM_SETREDRAW case in the WndProc. Works for me. Oh, and remember to use GetDC/ReleaseDC for WM_SETREDRAW. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - Invalidating | | | |