Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

nickel & dime performance gains

$
0
0

In my Win32 shell, its designed to print results from any task. Makes it a native Windows program and looks better than a console project.

So far...

LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {...}


is now well past 1000 lines of code to handle all possible events needed to be able to scroll up and down, wheel mouse and even two finger drag with a touch screen

never bothered with horizontal stuff as TextOut is easily over 132 columns which is more than needed for any print outs

one technique I like, is the embedded argument.

SetScrollRange (hwnd, SB_VERT, 0, activelist.size()*rowheight, TRUE);

this way the result is still on the stack ready for the windows call

sometimes such calls can spawn a monstrous amount of code depending on the number of arguments etc.

so it pays to keep everything on the stack and not have to move stuff on and off all the time



Corsair Carbide 300R with window & Corsair TX850V2 70A@12V

Asus M5A99FX PRO R2.0 CFX/SLI & AMD Phenom II 965 C3 Black Edition @ 4.0 GHz & G.SKILL RipjawsX DDR3-2133 8 GB 

GTX 260 SLI 216 core (GT200 Tesla) & Asus PA238QR IPS LED HDMI DP 1080p

ST2000DM001 & Windows 7 x64 Enterprise

Microsoft Wireless Desktop 2000 & Wacom Bamboo CHT470M

Place your rig specifics into your signature like I have, makes it 100x easier to understand!


Hardcore Games, Legendary is the Only Way to Play


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>