![]() |
Blt to another window - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Blt to another window (/showthread.php?tid=673) |
Blt to another window - Tosuxo - 23-01-2007 Ok, for my game, Monster Trainer, I'm changing from using picboxes to blting the monsters in the battle window... I've hit a snag... that I don't know how exactly to blt to another form's picbox haha Could anyone give me any pointers? I'm not very good with bitblt, if you didn't guess haha. Cheers. - Robin - 23-01-2007 Have fun having 2 backbuffers. Become a real man and only use one form. - Misunderstood - 23-01-2007 You can use blttohdc from a surface. Or create a new clip like what MS does for the main pic box. - Robin - 23-01-2007 Won't that blt the same thing? He wants to blt two different things. - Tosuxo - 23-01-2007 my problem is i have a battle window already set up, i can't be arsed transfering it to mirage.frm 'cos it wouldn't look right i'll try blttohdc... cheers for the replies ![]() - Tosuxo - 24-01-2007 Ok, i'm really confused now haha, right.. so i'm using Bitblt to do it with, i'm using the following code: Code: Call BitBlt(frmBattleWindow.picScreen.hdc, M1X, M1Y, 127, 127, frmGFX.picMonsters.hdc, 0, 0, vbSrcCopy) but this happens: ![]() it like... draws the map below... anyone have any ideas? :S Edit: sorted that Now I have come accross the problem of that bitblt won't let me have black transparent... I need a specific colour to be transparent... can someone please give me pointers to a way I can blt stuff into a picbox... even if i need to make 2 backbuffers and stuff and make 1 backbuffer for the main game window, and the 2nd for the battle window i hate blting lol cheers ![]() - Tosuxo - 24-01-2007 ok, this may help, here's the code I've used up to now (except the dims, saving time): InitDirectX Code: Sub InitDirectX() Initsurfaces2 Code: Sub InitSurfaces2() Now the jumbled up bit, a sub that's called when battle window is open, containing these things: Code: 'Rec Place Anyone see any problems? :S[/code] - Tosuxo - 01-02-2007 I still ain't got this to work, but in all honesty I haven't had much time, essay due in tomorrow and had 2 tests this week... been really busy can anyone give me any pointers? cheers - Tosuxo - 04-02-2007 I've had a thought... would there be a way to use the bitblt sub to draw it but WITH transparent black? I don't know much about bitblt so I can't really say I know how to, could anyone please give me some pointers? |