Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[masm] Transparent textboxes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
zart
Master Cheater
Reputation: 0

Joined: 20 Aug 2007
Posts: 351
Location: russia

PostPosted: Fri Oct 12, 2007 10:48 am    Post subject: [masm] Transparent textboxes Reply with quote

Probably me just being stupid (yet again) but anyone have any insight to this problem?

How do I get it to update ONLY the text box? Currently if I use invoke InvalidateRect, hWnd,NULL,1 - it works fine, but it updating my whole form. So I tried using SetRect - if I place this like it is below, it doesn't work - it's as if nothing is there. If I use SetRect in WM_CTLCOLOREDIT, the text is properly edited, but it is no longer transparent. If I put GetStockObject below the SetRect in WM_CTLCOLOREDIT it keeps the box transparent but does not update the text properly.

I don't really understand why it's doing this - since SetRect should just be setting a region and nothing else?

Code:

   .elseif uMsg==WM_CTLCOLOREDIT
      invoke GetDlgCtrlID,lParam
      .if ax == IDC_NAME ; handle to edit control
         invoke SetBkMode,wParam,TRANSPARENT;Background of Text
         invoke SetTextColor,wParam, 0ffffffh ;TextColor
         invoke GetStockObject,NULL_BRUSH ;return Transparent text background brush
         ;invoke SetRect, addr hName, 114, 39, 114+233, 39+19
         ret
      .endif   
   .elseif eax==WM_COMMAND
         mov eax,wParam
      .if ax==IDC_NAME
         shr eax,16
         .if ax==EN_CHANGE
;            invoke Generate,hWnd
            invoke SetRect, addr hName, 114, 39, 114+233, 39+19
            invoke InvalidateRect, hWnd, addr hName, 1
            ;invoke InvalidateRect, hWnd,NULL,1



Edit I was being dumb;

First off the coord where wrong and i forgot a addr on "hName"
Code:

            invoke SetRect, addr hName, 39, 118, 262, 134
            invoke InvalidateRect, hWnd, addr hName, 1

works fine...

_________________
0x7A 0x61 0x72 0x74

TEAM RESURRECTiON
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites