News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Get PictureW and PictureH form DIALOG

Started by hfheatherfox07, May 06, 2011, 10:36:24 PM

Previous topic - Next topic

hfheatherfox07

LOL for a second I was excited I got some help with my attachments  :dazzled: 

hfheatherfox07

Quote from: hfheatherfox07 on May 08, 2011, 01:42:10 AM
@ qWord I noticed that you replaced the contents of WM_TIMER with the contents of  WM_PAINT from the original example by Tom ....I was wondering the reason for this...


LOL I was at this all night last night , I had the widows open and suddenly I heard Birds Chirping I went to sleep at 6am....

I converted  the second example by Tom to work with a resource file ...how ever my stars came out RED, why???

I also tried to convert the original example of starfield ( which is the one I wanted LOL ) I got the stars on the screen but they freeze , the screen is in complete for some reason...
I assemble using RADASM (Love it) when the exe pops up on the screen , it takes a while for the stars to show , than it works in frames , any thought???





Any thing I try I still get RED stars??? :(

qWord

Quote from: hfheatherfox07 on May 08, 2011, 06:50:04 PM
Quote from: hfheatherfox07 on May 08, 2011, 01:42:10 AM
@ qWord I noticed that you replaced the contents of WM_TIMER with the contents of  WM_PAINT from the original example by Tom ....I was wondering the reason for this...
IMO the painting should appear while handling WM_TIMER - WM_PAINT should be used to copy an backbuffer to the screen when windows request it. However, this is my opinion - you can surely do the drawing stuff while processing WM_PAINT.

Quote from: hfheatherfox07 on May 08, 2011, 06:50:04 PM
Any thing I try I still get RED stars??? :(
Die you understand the code your are modifying? Also: did you know Iczelion's Tutorials?

qWord
FPU in a trice: SmplMath
It's that simple!

hfheatherfox07

Thank you for explaining that switch in between the two...

I do not recall which one of Iczelion's Tutorials actually deals with this ( I have them all)... but I hit a dead end...

and the original starfiled that I tried to convert has no WM_TIMER ....

Oh well back to the drawing board  ::)




hfheatherfox07

 :( Again....

This time I tried....

API:

SM_CXFULLSCREEN,
SM_CYFULLSCREEN,

Width and height of the client area for a full-screen window.
To get the coordinates of the portion of the screen not obscured by the tray,
call the SystemParametersInfo function with the SPI_GETWORKAREA value.


So I did:

.code

Start:

invoke GetSystemMetrics, SM_CXFULLSCREEN
mov Xfenetre, eax
shr eax, 1
mov Xfenetrediv2, eax
invoke GetSystemMetrics, SM_CYFULLSCREEN
mov Yfenetre, eax
shr eax, 1
mov Yfenetrediv2, eax   

I still get the same freezing results of the stars... at least I fixed the full screen problem an now the [ESC] works as well

I also had another go at the rotation one...  I think I isolated  the problem to the actual rotate 2D butt but what???

If anybody has some free time to look at this .... I would appropriate that... I hit a wall

hfheatherfox07

Success  :bg

If anybody wants it.....