News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Handling bitmaps

Started by Vortex, May 29, 2018, 04:29:54 AM

Previous topic - Next topic

Vortex

Sorry felipe. My apologies. I could not understand the image you posted. What are those symbols? Everything is fine. Sorry again.

zedd151

Quote from: Vortex on May 30, 2018, 03:05:53 AM
Thanks for the feedback.....
New upload at the top.

You're the man,  Vortex.    :t. Thank you very much, your correction is exactly what I had in mind.

I'll check it out.  when I get home

zedd151

#17
Quote from: zedd151

I'll check it out.  when I get home

yup, it works very well now.   :bgrin:

attached jpg reduced in size 50%. The full bmp is perfect in every respect.

felipe

Oh i see Vortex, it's just i didn't wanted to show my desktop (is a mess, you don't want to see it  :redface:), so i did a snapshot of a stupid program that i did before (not trying to promete it, really... :idea:). Yes this app is real fantastic, it not only make snapshots of the desktop, it can do snapshots of running apps (as zedd151 show us too)!  :greenclp:

zedd151

Quote from: felipe on May 30, 2018, 10:32:20 AM.... Yes this app is real fantastic, it not only make snapshots of the desktop, it can do snapshots of running apps...

Yes, it is perfect now.  H e knew exactly the fixes I was talking about.   :t


Quote from: felipeof a stupid program that i did

Nothing is stupid if you gained experience from it. And besides it was one of the catalysts for hutch opening the Game Development forum

zedd151

#20
@ Vortex.

I made an sfx (self-extracting) executable for your screen capture tool. Now a shortcut for it can be placed on the taskbar. (That is how I use it)

The sfx executable contains your original program and a batch file to run it. The resulting .bmp is placed on the %userprofile%\Desktop.

To use:

Click on the 'VortexScrCap.exe' file and it unzips in your Temp folder, runs the batch file which in turn runs your program to make a screen capture. After the screen capture is done, it automatically deletes the files from the Temp folder. - and places the resulting .bmp on the current users Desktop.   8)

And thans again, this is a very handy tool.

Vortex

Hi zedd,

Thanks but the tool didn't save the captured image in my system. Could I propose some small modifications?

SaveDesktop.exe "%USERPROFILE%\desktop\capture.bmp"

The double quotes should solve the problems in Windows XP. For example :

C:\Documents and Settings\Administrator\Desktop

zedd151

#22
QuoteC:\Documents and Settings\Administrator\Desktop

What OS are you runnin? xp?

I only Have Windows 7 and WIndows 10 here. I made the sfx so I could have an easy shortcut on my taskbar. I have no way of testing it on older systems

I could post another with the double quotes lemme see...

Okay here it is, try this one...

Vortex

Hi zedd,

Yes, my operating system is XP but no worries. I can try your SFX archive on Windows 7. Here is another version of my application rebuilt as Windows GUI application. No any annoying console window.

zedd151

Doesn't work for me. Windows 7 Ultimate SP1   :(

I even tried running it from a batch file as in the previous version...

Nope, I take that back it runs from the batch file as the previous. I overlooked specifying the output file name.  ::)

No GUI though. Did you post the right version? I'm looking at your source code right now...

zedd151

Must be a mistake on your part...


    lea     rsi,buffer
    invoke  ParseCmdLine,rsi
    cmp     rax,2
    jnb     @f
    invoke  StdOut,ADDR message  <--- not Window GUI.
    ret


:(

Vortex

Here is how I am testing :

H:\coding\savedesktop\savedesktop.exe H:\coding\savedesktop\desktop.bmp

The application is built as GUI but it has no any graphical interface like a dialog box. An easy trick :

Changed from :

\masm32\bin\polink /SUBSYSTEM:CONSOLE /LARGEADDRESSAWARE /ENTRY:start SaveDesktop.obj ParseCmdLine.obj

to

\masm32\bin\polink /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /ENTRY:start SaveDesktop.obj ParseCmdLine.obj

This method avoids the flashing console screen.


Vortex

Hi zedd,

invoke  StdOut,ADDR message  <--- not Window GUI.

You can omit that line. It has no any meaning for the version without console.

zedd151

Duh! WHen you said GUI, I was expecting a window.   :redface:

So it is still a console 'type' program that still needs the CommandLine arg...  Now I got it. I know I didn't see CreateWindow anywhere,
I thouhgt you posted the wrong version inadvertantly. You just removed the console window from the mix.

So then it works as advertised.   :t

zedd151

#29
I just tried using the new version in an sfx archive. It captures not the command window from your program but now the command window from the batch file.  :(   I think I like the 'b' version better.