Crash o.o
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
geronimo




int SourceWindow;

int SourceImage;
int SourceImageWidth;
int SourceImageHeight;

void Autoexec()
{
Main();
Exit("");
}



void Main()
{
WindowHide(gameWindow);

SourceImage=GetImageFromClipboard();
if(!SourceImage)
{
MessageBox("No image in clipboard THX");
return;
}
SourceImageWidth=ImageWidth(SourceImage);
SourceImageHeight=ImageHeight(SourceImage);

SourceWindow=WindowCreate(10,10,SourceImageWidth,SourceImageHeight,"Source Image");
ShowPage();

Blit(0,0,SourceImage,SourceWindow);
ShowPage();

MessageBox("wxup");
}


verge3 crashes if there's an image in the clipboard, after showing the new window but before showing the image

Posted on 2004-08-24 02:18:36

vecna

The problem is that you're blitting to a window handle and not to a image handle.

do something like...

SourceWindow=WindowCreate(10,10,SourceImageWidth,SourceImageHeight,"Source Image");
int SrcWinImg=WindowGetImage(SourceWindow);

Blit(0,0,SourceImage,SrcWinImage);
ShowPage();


Haven't tried it cause my comp is kinda in limbo, but it should work.

Also this business about doing WindowHide(GameWindow) strikes me as rather odd o_O

Posted on 2004-08-24 03:37:10

geronimo

oh :} thank you
i saw that screen==gameWindow and was thus mislead
like such a fool

well, about hiding the gameWindow
it seems windows created using WindowCreate end up having the same resolution as the windows desktop... so if you created a 100x100 window you have a 100x100 drawing area
and that's what i wanted!

instead of having graphics get scaled down, or decide on a resolution and go full-screen

Posted on 2004-08-24 04:07:35 (last edited on 2004-08-24 04:09:16)


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.