Friday, October 15, 2010

The Dell notebook battery recall a few questions and answers


August 16 News Dell has announced a worldwide recall of 4.1 million notebook computer batteries because of the existence of these cells led to occurrence of a fire. Many consumers want to know whether their recall of the list system, as well as how to deal with the Associated Press this question on the consumer may be the answer:

Q: What kind of danger exists in the end?

A: Although there is no report of injuries, but the battery maker Sony said, but had occurred in the United States from about 6 incidents of fire or smoke. The reason is obvious is that, when tiny metal particles cause the battery to short circuit, the battery will overheat.

Q: What Dell products are affected?

A: Dell said the batteries of these issues mainly in the April 1, 2004 to July 18 this year, shipments of Dell notebook computers, including Latitude, Inspiron, XPS and Precision mobile workstation notebooks.

Q: how do I know if my laptop battery has been recalled?

A: Dell has launched a Web site, http://www.dellbatteryprogram.com for user consultation. On the site, you can enter your battery's product ID, you can quickly know whether your battery has been recalled.

Q: If my battery is recalled, and I how?

A: If you check out the site you have a faulty battery, you will be asked to fill out a free replacement in the above subscribers a single form.

Dell also said it would return the issue to provide the battery means to correct these problems handling the battery.

Dell said consumers also can call its technical support line (U.S. area 866-342-0011) to seek further assistance.

Q: I am waiting for a new battery during the how to use computer?

A: Dell recommends that users stop using these batteries. In the meantime, users have on hand if AC power adapter, of course, can continue to use their laptop.






Recommended links:



Blog you need to Fundamentalism



Storage Telephony



CDP: Super snapshots - the ultimate ownership



Comments: Haier bid for Maytag out of mountains and Rivers to be epigenetic re-



PHOTOSHOP round with your dream car (directory)



OGM to MKV



Symantec said the new storm worm detected



Drug storehouse management system



Knowledge need to update staff training IS not losing money "trading"



How I sold 1,000 cars, 200 sets of villas



Simple Music Composers



MOV to iPod



ASF To MPG



Monday, October 11, 2010

Compilation of various source - break


title Control-Break handler for Lattice C programs
name break
include dos.mac

;
; Control-Break Interrupt Handler for Lattice C programs
; Running on IBM PCs (and ROM BIOS compatibles)
;
; Ray Duncan, May 1985
;
; This module allows C programs running on the IBM PC
; To retain control when the user enters a Control-Break
; Or Control-C. This is accomplished by taking over the
; Int 23H (MS-DOS Control-Break) and Int 1BH (IBM PC
; ROM BIOS Keyboard Driver Control-Break) interrupt
; Vectors. The interrupt handler sets an internal
; Flag (which must be declared STATIC INT) to TRUE within
; The C program; the C program can poll or ignore this
; Flag as it wishes.
;
; The module follows the Lattice C parameter passing
; Conventions, and also relies on the Lattice file DOS.MAC
; For the definition of certain constants and macros.
;
; The Int 23H Control-Break handler is a function of MS-DOS
; And is present on all MS-DOS machines, however, the Int 1BH
; Handler is a function of the IBM PC ROM BIOS and will not
; Necessarily be present on other machines.
;
if lprog
args equ 6; offset of arguments, Large models
else
args聽聽聽 equ聽聽聽聽 4聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;offset of arguments, Small models
聽聽聽聽聽聽聽 endif

cr equ 0dh; ASCII carriage return
lf equ 0ah; ASCII line feed

聽聽聽聽聽聽聽 pseg

聽聽聽聽聽聽聽 public聽 capture,release ;function names for C

;
; The function CAPTURE is called by the C program to
; take over the MS-DOS and keyboard driver Control-
; Break interrupts (1BH and 23H).聽 It is passed the
; address of a flag within the C program which is set
; to TRUE whenever a Control-Break or Control-C
; is detected.聽 The function is used in the form:
;
;聽聽聽聽聽聽聽聽聽聽聽聽聽聽 static int flag;
;聽聽聽聽聽聽聽聽聽聽聽聽聽聽 capture(&flag)
;

capture proc聽聽聽 near聽聽聽聽聽聽聽聽聽聽聽 ;take over Control-Break

聽聽聽聽聽聽聽 push聽聽聽 bp聽聽聽聽聽聽聽聽聽聽聽聽聽 ;interrupt vectors
聽聽聽聽聽聽聽 mov聽聽聽聽 bp,sp
聽聽聽聽聽聽聽 push聽聽聽 ds

聽聽聽聽聽聽聽 mov聽聽聽聽 ax,word ptr [bp+args]
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:flag,ax聽聽聽聽聽 ;save address of integer
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:flag+2,ds聽聽聽 ;flag variable in C program

聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;pick up original vector contents
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,3523h聽聽聽聽聽聽聽 ;for interrupt 23H (MS-DOS
聽聽聽聽聽聽聽 int聽聽聽聽 21h聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break handler)
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int23,bx
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int23+2,es

聽聽聽聽聽聽聽 mov聽聽聽聽 ax,351bh聽聽聽聽聽聽聽 ;and interrupt 1BH
聽聽聽聽聽聽聽 int聽聽聽聽 21h聽聽聽聽聽聽聽聽聽聽聽聽 ;(IBM PC ROM BIOS keyboard driver
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int1b,bx聽聽聽聽 ;Control-Break interrupt handler)
聽聽聽聽聽聽聽 mov聽聽聽聽 cs:int1b+2,es

聽聽聽聽聽聽聽 push聽聽聽 cs聽聽聽聽聽聽聽聽聽聽聽聽聽 ;set address of new handler聽聽聽聽
聽聽聽聽聽聽聽 pop聽聽聽聽 ds
聽聽聽聽聽聽聽 mov聽聽聽聽 dx,offset ctrlbrk
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,02523H聽聽聽聽聽聽 ;for interrupt 23H
int 21h
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,0251bH聽聽聽聽聽聽 ;and interrupt 1BH
int 21h

聽聽聽聽聽聽聽 pop聽聽聽聽 ds聽聽聽聽聽聽聽聽聽聽聽聽聽 ;restore registers and
聽聽聽聽聽聽聽 pop聽聽聽聽 bp聽聽聽聽聽聽聽聽聽聽聽聽聽 ;return to C program
ret

capture endp


;
; The function RELEASE is called by the C program to
; return the MS-DOS and keyboard driver Control-Break
; interrupt vectors to their original state.聽 Int 23h is
; also automatically restored by MS-DOS upon the termination
; of a process, however, calling RELEASE allows the C
; program to restore the default action of a Control-C
; without terminating.聽 The function is used in the form:
;
;聽聽聽聽聽聽聽聽聽聽聽聽聽聽 release()
;

release proc聽聽聽 near聽聽聽聽聽聽聽聽聽聽聽 ;restore Control-Break interrupt
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;vectors to their original state聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 push聽聽聽 bp
聽聽聽聽聽聽聽 mov聽聽聽聽 bp,sp
聽聽聽聽聽聽聽 push聽聽聽 ds

聽聽聽聽聽聽聽 mov聽聽聽聽 dx,cs:int1b聽聽聽聽 ;set interrupt 1BH
聽聽聽聽聽聽聽 mov聽聽聽聽 ds,cs:int1b+2聽聽 ;(MS-DOS Control-Break
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,251bh聽聽聽聽聽聽聽 ;interrupt handler)聽聽聽聽
int 21h

聽聽聽聽聽聽聽 mov聽聽聽聽 dx,cs:int23聽聽聽聽 ;set interrupt 23H
聽聽聽聽聽聽聽 mov聽聽聽聽 ds,cs:int23+2聽聽 ;(IBM PC ROM BIOS keyboard driver
聽聽聽聽聽聽聽 mov聽聽聽聽 ax,2523h聽聽聽聽聽聽聽 ;Control-Break interrupt handler)
int 21h

聽聽聽聽聽聽聽 pop聽聽聽聽 ds聽聽聽聽聽聽聽聽聽聽聽聽聽 ;restore registers and
聽聽聽聽聽聽聽 pop聽聽聽聽 bp聽聽聽聽聽聽聽聽聽聽聽聽聽 ;return to C program
ret

release endp

;
; This is the actual interrupt handler which is called by
; the ROM BIOS keyboard driver or by MS-DOS when a Control-C
; or Control-Break is detected.聽 Since the interrupt handler
; may be called asynchronously by the keyboard driver, it
; is severely restricted in what it may do without crashing
; the system (e.g. no calls on DOS allowed).聽 In this
; version, it simply sets a flag within the C program to
; TRUE to indicate that a Control-C or Control-Break has
; been detected; the address of this flag was passed
; by the C program during the call to the CAPTURE function.
;

ctrlbrk proc聽聽聽 far聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break interrupt handler

聽聽聽聽聽聽聽 push聽聽聽 bx聽聽聽聽聽聽聽聽聽聽聽聽聽 ;save affected registers
聽聽聽聽聽聽聽 push聽聽聽 ds

聽聽聽聽聽聽聽 mov聽聽聽聽 bx,cs:flag聽聽聽聽聽 ;set flag within C program
聽聽聽聽聽聽聽 mov聽聽聽聽 ds,cs:flag+2聽聽聽 ;to "True"
聽聽聽聽聽聽聽 mov聽聽聽聽 word ptr ds:[bx],-1

聽聽聽聽聽聽聽 pop聽聽聽聽 ds聽聽聽聽聽聽聽聽聽聽聽聽聽 ;restore registers and exit
聽聽聽聽聽聽聽 pop聽聽聽聽 bx

聽聽聽聽聽聽聽 iret

ctrlbrk endp


flag聽聽聽 dw聽聽聽聽聽 0,0聽聽聽聽聽聽聽聽聽聽聽聽 ;long address of C program''s
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break detected flag

int23聽聽 dw聽聽聽聽聽 0,0聽聽聽聽聽聽聽聽聽聽聽聽 ;original contents of MS-DOS
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;Control-Break Interrupt 23H
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;vector

int1b聽聽 dw聽聽聽聽聽 0,0聽聽聽聽聽聽聽聽聽聽聽聽 ;original contents of ROM BIOS
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;keyboard driver Control-Break
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 ;Interrupt 1BH vector


聽聽聽聽聽聽聽 endps

end






相关链接:



U.S. will send Experts want to increase overseas trade negotiations to combat piracy weight



XviD To MP4



MKV to Zune



In-depth analysis Of ASP.NET 2.0 buffer system (2)



Good Audio CD Players



Hart governance "disease" Hewlett-Packard



Evaluation Management And Distribution



M2TS To MKV



Higher Heat Blow, "Kabbah Wind" Paper Submitted Until 15th Of The Month



Who in the sale of national sentiment!



Test emergency response capacity of cities: urban emergency on the road



Lists Mathematics Education



Intel Strikes started



s.m.a.r.t. failure how to correct This hard



Storage Inventory And Barcoding



Symantec said the new storm worm detected



Monday, September 27, 2010

3G is not a cover


With several major 3G operator's specific position on the Chinese 3G start-up idea has become increasingly clear, up to now, China has already launched 3G into the basic facts, then we need to explore is how a previous law, how to send license , operators on how the layout.

In fact, the topic of the 3G I have talked a lot, and the reason turned out one more time again, is to see a lot of comments recently out of which more representative is: According to China Mobile's 3G development ideas, even if its to build TD-SCDMA network equipment vendors may be difficult to get short-term relatively large income; In addition, some people think that China Mobile has recently launched upgrade EDGE and TD may have conflicts.

For these remarks, I would like on to the next one of my basic viewpoints: from the present perspective, skip the 3G De Xiang Fa yes impossible, WiMax 绛?technology is difficult to enter the market short-term Huan mainstream, Gang Gang I am in a blog 涓?Yijingxiangxi expounded on this point, 4G technologies such as standardization is not clear, but industrialization is take a long time, in this based on the 3G launch has become inevitable.

In addition, I would like to stress that the input is on the 3G, this is equipment manufacturers are most concerned about the global 3G long-term slump, a large number of major equipment manufacturers have invested in 3G at a lot of money, after the update has made the rapid 3G equipment manufacturers must continue to invest, which is able to eventually recover input costs, the only way to 3G, so in the evolution of 3G technology, the equipment manufacturers to upgrade to a passive race.

Recently, China Mobile boss Wang on the 2G network to rely on local building 3G networks think so many people worried, 3G investment in the end is there? I think this is not necessary to worry about, according to Wang's idea, through the transformation of 2G 3G core network to achieve a shared purpose and, in fact, this attitude is one thing to be happy, description, led by China Mobile China 3G war is likely to be staged in advance, while in the long ago, China Mobile is also non-public Xing said it would consider upgrading nationwide EDGE, equipment manufacturers from this progressive strategy to move benefit, because the quick success of the entire pie is no good 3G, 3G pie made the larger, individual cake higher interest.

In addition, there is no escaping the fact that, at present it from the network construction cost, there is a polarization of the situation, it is said very little, a few hundred million people say a lot, to hundreds of billions. In fact, these figures are correct, the key to it is not at once put into the. Network construction costs from the point of view, including two wireless networks and most of the core network, including wireless network investment in basic accounting for about 75%, even if the 2G operators to transform the core network and location, resources, and a large number of inputs is also necessary .

From the above, I think that China's 3G is not a cover, it is hard cash to prop up the market, hold and cultivate the market demand will benefit operators, equipment manufacturers will be assigned to the of that one. But, the 3G, should also include a 2.5G, 2.75G and 3G market after.

Data from the current Chinese market demands, large market demand for 3G has not formed, 3G licensing policy has not yet enacted, in this case, before the development of 3G technology will be the main force, and in possession of a very long time substantial part of the share, such as moving from GPRS to EDGE in the transition; the former is bound to promote the development of 3G, 3G directness back forward, but you can not deny that they are 3G.

A month ago, I wrote a chapter blog: 3G narrowly on the interests of China telecommunications market, now look, this line of thinking is the need of our operators and equipment manufacturers to think carefully, and only a narrow 3G excluding simple argument, a comprehensive understanding of 3G meaning, can be better to guide and nurture the market may be in a very long period of time, we do not find the killer application of 3G.






相关链接:



VOB to MP4



MII further notice IRREGULARITIES SP will be ordered to stop



DVD-ROM disc maintenance tips



Architect is dead



Log Analysers Specialist



Joan Chen: "Nuclear high-based" special to be drying faster



Contact Home Linkist THEN the new tactics: to provide professional exhibition space



LYING XML (directory)



My Favorite Food And Drink



ASF CONVERTER



kingdee be listed WITHIN 3 years to build an e



Simple DESKTOP



Tianjin Ninghe HOTEL selection Maxima



Top RELIGION



Hutchison 3G gains and losses



MKV To IPod



jsp, servlet talk about Chinese issues



Thursday, September 16, 2010

Customer is not his wife is a lover of God is



Customers are wives, need we can really operate, required to achieve life-long service. Customer is not just customer transactions occurred, including the potential development of the customer. For the latter, we have to careful management, that should be the same as the lover in hot pursuit, so I think the customers are his wife, need life-long service, and potential customers, they have to like Valentine's, requires hot pursuit!

Treatment of customers, we usually deal depending on whether he happened into two categories, namely, customers (closing) and potential customers (not traded). Turnover value of customers based on their own are divided into small, medium, large, VIP customers; no transaction sales transactions according to the possibility of customers, divided into A, B, C, D four grades.

Customers are his wife, need life-long service, and why?

Because often men and women after marriage, marriage will remain for some time. Maybe 2-3 years, both sides lost their passion and vitality for life, merely to maintain, and perhaps it is for kids. At this point, if you do not operate her, and usually there will be a number of complaints, grievances, nagging, complain, or even for each other, having an affair and so on. You have Haikudanlan between, eachother, life service will be gone. If you do not check and do not reflect, not aware, the service is always at a standstill, never hesitate, never creative. You will only make one lose out, lose power, results of your customers will really separate.

So, as customers like the wife, if you treat the customer is always static, content and form is almost no difference, let alone to help customers create value, generate new opportunities, let her and you build relationships with high loyalty , also just maintain the status quo, very easy to incite defection of your competitors.

Even if she does not leave you, you will not develop his values, or even a loss. For enterprises, the value is not particularly large. This customer loyalty is not even very concerned about your customers.

Potential customers, like lovers, need to chase the plane, why?

Because the potential customers for each company are looking forward to the development, while the two major potential customers is not a measure of business strength of protection. Development of potential customers the most important purpose is to let her be your real customers, which hope to become your life-long lover of his wife. But the deal lover, you can not see a simple chat will be your wife. You need to give your lover the performance of the stage, let her have a little favor for you, hand in hand chance to own their love is, and finally walked down the red carpet, into the wedding hall. This four-step needs at least the middle of the development. Similarly, treatment of lovers, according to the closeness of her relationship with you to determine the possibility of its development, which is necessary, but also in the process of service need to continue to serve, to provide a feat she was very surprised, very exciting time activities, a happy honeymoon and so on.鍙湁涓嶆柇鍒涢?鏂般?濂囥?鐗圭殑涓滆タ锛屾墠浼氭劅鍒颁綘涓庡叾浠栦汉涓嶄竴鏍凤紝鍚﹀垯浣犺儨绠楃殑鏈虹巼杈冨皬銆傚洜涓哄ス涓嶅儚鑰佸﹩锛屽ぉ缁忓湴涔夛紝娉曞緥瑙勫畾锛屼綘鑷冲皯涓?鏃堕棿鍙互楂樻灂鏃犲咖锛岀劧鑰屾儏浜轰笉琛岋紝鍙湁绱х揣鍦版姄浣忎竴娆℃満浼氾紝鐢ㄥ績鍦颁负鍏舵湇鍔★紝鐪熷績鍦板叧蹇冨ス锛屾墠浼氭湁鍙兘鎴愪负鑰佸﹩銆?br />
銆??鎵?互锛屾綔鍦ㄩ【瀹㈠儚鎯呬汉锛岀揣杩戒笉鑸?

銆??鏂囧姏鍐?瀹炴垬钀ラ攢涓撳;缁堢寤鸿绠$悊閿?敭涓撳;缁堢鍥㈣喘涓撳;鍥介檯鑱屼笟鍩硅甯堣涓氬崗浼氫笁鏄熷煿璁笀;缇庡浗ICQAC鍥介檯鑱屼笟鍩硅甯堛?澶氬鍩硅鍜ㄨ鏈烘瀯鐗硅仒鍏艰亴鍩硅璁插笀;涓浗鍩硅澶ц仈鐩熴?鍥介檯鑱屼笟鍩硅甯堣涓氫細鍛樸?涓浗鎬昏鍩硅浼氬憳......锛屾湁7骞寸粓绔攢鍞粡楠?浜斿勾涓氫綑鍩硅缁忓巻;







相关链接:



Fully Compatible With And Support The Collection Of Thunder Win7 New Trial



Rising harm the user did not APOLOGIZE for doing odd tiger, said to be practical



3gp to Avi converter



Articles about Desktop



The battle with Ninetowns of Warcraft account



My Gmail so cool, custom domain Gmail login



Ghost 20 little-known PRACTICAL parameters



mov to mpeg converter



Local PR PK International Public Relations: PR triggered a confrontation between Wahaha



.mov Converter



Simple Text Or Document Editors



avc CONVERTER



Paladin examination and topics for 4 years (1)



Thursday, July 29, 2010

Initial bitmap


In this lesson we will learn how to use bitmap in the program. More precisely, we have to learn is how the client area of a window to display the bitmap.
Theory
Bitmap is stored in a computer in the picture. A considerable number of bitmap file format (Translation: If. BMP.JPG.GIF.PIC, etc.), but Windows only supports Windows Bitmap Graphics Format, or BMP file. This course is also referred to bitmap BMP files. Use bitmap easiest way is to define it in the resource file (. Rc) in the. There are two methods defined. The first method is to macro it is defined as an integer, as follows:

# Define IDB_MYB99vMAP 100
IDB_MYB99vMAP B99vMAP "c: projectexample.bmp"
The first line we define an integer with a value of 100 macros. The second line we have to point this macro to be defined integer bitmap, so the compiler will know where the path of the bitmap.
Another method is to give it a name, that is, it is defined as a string, as follows:
MyBitMap B99vMAP "c: projectexample.bmp"
Effects of two methods is the same. Choose a method, depending on the program you like to use integer or string to point to Macro bitmap.
Now that we have the bitmap defined in the resource file, the next step is to make it appear in the window client area.
In the process, we use the API function to obtain the bitmap handle LoadBitmap. Here is the complete LoadBitmap function type:
LoadBitmap proto hInstance: HINSTANCE, lpBitmapName: LPSTR

The function returns a bitmap handle. Function has two parameters, which is the process handle hInstance. lpBitmapName is a pointer to a bitmap name (for the second definition of method). If you use the first definition of method, you can fill point or integer values of a bitmap macro (this value corresponds to the example above is 100, an integer macro is IDB_MYB99vMAP). Here is a simple example:


The first method:
.386
. Model flat, stdcall
................
. Const
IDB_MYB99vMAP equ 100
...............
. Data?
hInstance dd?
..............
. Code
.............
invoke GetModuleHandle, NULL
mov hInstance, eax
............
invoke LoadBitmap, hInstance, IDB_MYB99vMAP
...........

The second method:

.386
. Model flat, stdcall
................
. Data
BitmapName db "MyBitMap", 0
...............
. Data?
hInstance dd?
..............
. Code
.............
invoke GetModuleHandle, NULL
mov hInstance, eax
............
invoke LoadBitmap, hInstance, addr BitmapName
...........

Text access to a device (DC) handle. You can respond to WM_PAINT message received through the API function BeginPaint. If the other message, you can use the API function GetDC access.
Create the memory DC image. The aim is to establish a "hidden drawing paper", the bit map "painted" on it, for buffer purposes. After the completion of this work, we adopted a function of "drawing paper" on the bitmap copy of the real DC. This is quickly displayed on the screen image of the double-buffering technique. (Translation: You can reduce image jitter) this "drawing paper," with the API function CreateCompatibleDC established, following the completion of its type:
CreateCompatibleDC proto hdc: HDC

If the function succeeds, will return to DC memory image that is "drawing paper," the handle.

Now we have the "drawing paper," could place a picture on it. SelectObject API function that can be completed, the first parameter is the "drawing paper," the handle, the second parameter is a bitmap handle, here is the function of the complete type:
SelectObject proto hdc: HDC, hGdiObject: DWORD
Now the bitmap has been drawn in the "drawing paper" has gone. Next we want to copy the bitmap in the real DC. There are many API functions can finish the job, such as BitBlt and StretchBlt. Function BitBlt the contents of only one DC to another DC simply copy, while the function is to automatically adjust StretchBlt copy the contents of the size of the source DC has the purpose to adapt the size of DC's output area, so the former than the latter faster. Here, we only use the function BitBlt, following the completion of its type:
BitBlt proto hdcDest: DWORD, nxDest: DWORD, nyDest: DWORD, nWidth: DWORD, nHeight: DWORD, hdcSrc: DWORD, nxSrc: DWORD, nySrc: DWORD, dwROP: DWORD

hdcDest purpose DC handle.
nxDest, nyDest purpose DC output area of the upper-left corner coordinates.
nWidth, nHeight purpose DC output area length and width.
hdcSrc handle of the source DC.
nxSrc, nySrc source DC in the upper left corner coordinates of area to be copied.
dwROP screen surface computing code (ROP). Copy the contents of the parameter used to determine the color and the color of the original output area by which computing approach. Usually, simply copy the contents of the output area with a overwrite.
All completed, the API function with the release of the bitmap DeleteObject object, that is, the bit map "erase."
You're done! Now come back over the procedure: First, you need to define the bitmap in the resource file. Then, you need to load a bitmap in the program resources, and get a bitmap handle. Then, you need to get a bitmap output area of DC, and the creation of the DC's memory image, and to a bitmap image into the memory DC. Finally the bitmap image copied from the memory DC to DC in the real.
Examples:
.386
. Model flat, stdcall
option casemap: none
include masm32includewindows.inc
include masm32includeuser32.inc
include masm32includekernel32.inc
include masm32includegdi32.inc
includelib masm32libuser32.lib
includelib masm32libkernel32.lib
includelib masm32libgdi32.lib
WinMain proto: DWORD,: DWORD,: DWORD,: DWORD
IDB_MAIN equ 1

. Data
ClassName db "SimpleWin32ASMBitmapClass", 0
AppName db "Win32ASM Simple Bitmap Example", 0

. Data?
hInstance HINSTANCE?
CommandLine LPSTR?
hBitmap dd?

. Code
start:
invoke GetModuleHandle, NULL
mov hInstance, eax
invoke GetCommandLine
mov CommandLine, eax
invoke WinMain, hInstance, NULL, CommandLine, SW_SHOWDEFAULT
invoke ExitProcess, eax

WinMain proc hInst: HINSTANCE, hPrevInst: HINSTANCE, CmdLine: LPSTR, CmdShow: DWORD
LOCAL wc: WNDCLASSEX
LOCAL msg: MSG
LOCAL hwnd: HWND
mov wc.cbSize, SIZEOF WNDCLASSEX
mov wc.style, CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc, OFFSET WndProc
mov wc.cbClsExtra, NULL
mov wc.cbWndExtra, NULL
push hInstance
pop wc.hInstance
mov wc.hbrBackground, COLOR_WINDOW +1
mov wc.lpszMenuName, NULL
mov wc.lpszClassName, OFFSET ClassName
invoke LoadIcon, NULL, IDI_APPLICATION
mov wc.hIcon, eax
mov wc.hIconSm, eax
invoke LoadCursor, NULL, IDC_ARROW
mov wc.hCursor, eax
invoke RegisterClassEx, addr wc
INVOKE CreateWindowEx, NULL, ADDR ClassName, ADDR AppName,
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL,
hInst, NULL
mov hwnd, eax
invoke ShowWindow, hwnd, SW_SHOWNORMAL
invoke UpdateWindow, hwnd
. While TRUE
invoke GetMessage, ADDR msg, NULL, 0,0
. Break. If (! Eax)
invoke TranslateMessage, ADDR msg
invoke DispatchMessage, ADDR msg
. Endw
mov eax, msg.wParam
ret
WinMain endp

WndProc proc hWnd: HWND, uMsg: UINT, wParam: WPARAM, lParam: LPARAM
LOCAL ps: PAINTSTRUCT
LOCAL hdc: HDC
LOCAL hMemDC: HDC
LOCAL rect: RECT
. If uMsg == WM_CREATE
invoke LoadBitmap, hInstance, IDB_MAIN
mov hBitmap, eax
. Elseif uMsg == WM_PAINT
invoke BeginPaint, hWnd, addr ps
mov hdc, eax
invoke CreateCompatibleDC, hdc
mov hMemDC, eax
invoke SelectObject, hMemDC, hBitmap
invoke GetClientRect, hWnd, addr rect
invoke BitBlt, hdc, 0,0, rect.right, rect.bottom, hMemDC, 0,0, SRCCOPY
invoke DeleteDC, hMemDC
invoke EndPaint, hWnd, addr ps
. Elseif uMsg == WM_DESTROY
invoke DeleteObject, hBitmap
invoke PostQuitMessage, NULL
. ELSE
invoke DefWindowProc, hWnd, uMsg, wParam, lParam
ret
. ENDIF
xor eax, eax
ret
WndProc endp
end start

;------------------------------------------------- --------------------
; Resource definitions
;------------------------------------------------- --------------------
# Define IDB_MAIN 1
IDB_MAIN B99vMAP "tweety78.bmp"

Analysis:


# Define IDB_MAIN 1
IDB_MAIN B99vMAP "tweety78.bmp"
Define macro IDB_MAIN integer value of 1, then it points to a resource file in the same directory with the file named "tweety.bmp" bitmap.
. If uMsg == WM_CREATE
invoke LoadBitmap, hInstance, IDB_MAIN
mov hBitmap, eax

In dealing with WM_CREATE message, we pass the API function LoadBitmap loading bitmap resources, and through the function return value to obtain the bitmap handle.
Then, we can place the picture in the window client area.

. Elseif uMsg == WM_PAINT
invoke BeginPaint, hWnd, addr ps
mov hdc, eax
invoke CreateCompatibleDC, hdc
mov hMemDC, eax
invoke SelectObject, hMemDC, hBitmap
invoke GetClientRect, hWnd, addr rect
invoke BitBlt, hdc, 0,0, rect.right, rect.bottom, hMemDC, 0,0, SRCCOPY
invoke DeleteDC, hMemDC
invoke EndPaint, hWnd, addr ps

In this example, we choose in response to WM_PAINT message to draw the bitmap. First we get through the API function l BeginPaint DC client area window handle. Then we created through the API function CreateCompatibleDC memory image of the DC, and through API function SelectObject to bitmap image into memory. Next, we get through the API function GetClientRect the size of the window client area. Finally, we function through the API BitBlt the bitmap image copied from the memory DC to the DC area in the real customers. Finished the work, we release the DC through the API function DeleteDC memory image, with the release of the client area of API functions EndPaint DC, drawing the end of the work.

. Elseif uMsg == WM_DESTROY
invoke DeleteObject, hBitmap
invoke PostQuitMessage, NULL
When we no longer need the bitmap, through the API function DeleteObject to release it.






Recommended links:



Easy To Use Terminal And Telnet Clients



Streaming Media common sense: the basic principles of stream



Simple Text Or Document Editors



Free download mp4 to mpeg converter



TA listen to the song, cool the dog's help you "search" out of



DIFFERENT trust model



Lei Jun served its purpose, Soul shine Jinshan



flv to mp3



M4v



avi to Mpeg



IC card reading and writing in PowerBulider



Thunder Look At Real-time On-demand Player In The Player To Build Pan-



On-site supervision evaluation [3]



Find essential compression bag rookie players ZipScan



Wednesday, July 21, 2010

In the title bar of an art form


Very simple, only need to deal with WM_NCPAINT message on the line, that is Windows Message Not Client Paint - non-client area of re-painting, this time drawing can be done in the title bar, another approach is to use GetWindowDC function, this function with GetDC of The only difference is GetWindowDC is to obtain the form of DC, but only access to the client area GetDC DC.





Recommended links:



Explosion MOV to DVD



Got hit by Baidu PPC



converting mp4 to Mp3



3gpp CONVERTER



Premier Search Or Lookup Tools



WorldCup PDA CONVERTER



ImTOO Music CD Burner Pro New



New Source Editors



AUDIO Record Edit Toolbox 2009



Lohan AVI to MPEG



Swf Format



avi TO mp4 converter free



The original SAP (China) Vice President, joined as CEO of Grand View Century



Reviews Geography Education



Easy MOV CONVERTER



Swift ASF AVI MPEG to DVD



Friday, June 11, 2010

Youtube Save + Player Guide

Hot popluar youtube video Converter + download + player tool. With YouTube tool you can also convert downloaded YouTube videos to a format compatible with your favorite portable device; including - iPod Video, iPod Touch, iPod Nano, iPhone, Zune, PSP, as well as video capable MP3 players, video capable mobile phones, and Pocket PC, And finally... YouTube tool's embedded player will allow you to watch all your favorite YouTube videos off-line. So now you can enjoy any .flv and .swf videos anytime!
Supports YouTube video or any .flv and .swf file as input file. Supports not only YouTube video, but also various video formats as input file, including avi, DivX, XviD, rm, rmvb, MOV, MPEG, WMV. Supports a wide variety of output file format., including avi, DivX, XviD, rm, rmvb, MOV, MPEG, WMV. Provides various profiles, these profiles can meet the needs of most people. - is the most powerful YouTube assistant on the planet.