Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Setting the BackColor of a Static Window !!

Hi all.

I am not sure I should be asking this question here but since it is somewhat
related to Excel here it goes :

I have created a Static Window via the "CreateWindowEx" API and placed it
floating over a worksheet Cell... With some tweaking and changing some Styles
this Static window now works and looks just fine.

However, what I now need is to be able to change is its BackColor after it's
been created.

I have tried the "SetBckColor" API, Sending as well as trapping the
"WM_CTLCOLORSTATIC" Window Message among other things but just can't succeed
to change the backcolor of this newly created Static Window :(

I googled for an answer but no luck .

Anyone here has an answer to this one ?

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Setting the BackColor of a Static Window !!

I am sure it must be possible, but can't you achieve the same simpler with a
UserForm?

RBS

"RAFAAJ2000" wrote in message
...
Hi all.

I am not sure I should be asking this question here but since it is
somewhat
related to Excel here it goes :

I have created a Static Window via the "CreateWindowEx" API and placed it
floating over a worksheet Cell... With some tweaking and changing some
Styles
this Static window now works and looks just fine.

However, what I now need is to be able to change is its BackColor after
it's
been created.

I have tried the "SetBckColor" API, Sending as well as trapping the
"WM_CTLCOLORSTATIC" Window Message among other things but just can't
succeed
to change the backcolor of this newly created Static Window :(

I googled for an answer but no luck .

Anyone here has an answer to this one ?

Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Setting the BackColor of a Static Window !!

Thanks Smissaert .

No . I can't use a UserForm as I would need to reduce its Width to macth
that of the underlying Worksheet Cell.

Apparently, an XL Userform Width can't be reduced below a certain level even
after removing its title bar, caption and changing other of its Styles. I
have already tried doing this via various APIs but failed ! I hope I am wrong
though in which case I would definitely use a UserForm for this instead of a
Static Window.

I can't beleive that such seemingly easy thing ie: Simply setting the
BackColor of a Window programatically can be that difficult !!!!

I hope someone knows the answer to this one.

Regards.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Setting the BackColor of a Static Window !!

OK, if you post the code you have sofar in the NG:
microsoft.public.vb.winapi and/or microsoft.public.vb.general.discussion
then I am sure somebody will tell you how to set the background color.

RBS

"RAFAAJ2000" wrote in message
...
Thanks Smissaert .

No . I can't use a UserForm as I would need to reduce its Width to macth
that of the underlying Worksheet Cell.

Apparently, an XL Userform Width can't be reduced below a certain level
even
after removing its title bar, caption and changing other of its Styles. I
have already tried doing this via various APIs but failed ! I hope I am
wrong
though in which case I would definitely use a UserForm for this instead of
a
Static Window.

I can't beleive that such seemingly easy thing ie: Simply setting the
BackColor of a Window programatically can be that difficult !!!!

I hope someone knows the answer to this one.

Regards.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help window setting workbook collapse MrBill Excel Discussion (Misc queries) 0 November 14th 09 11:46 AM
Setting the zoom size of a new window from 100% to 75% MongoMan Excel Discussion (Misc queries) 0 June 18th 08 11:30 PM
Window setting Amp Setting up and Configuration of Excel 1 June 13th 08 09:45 PM
Setting to Keep a Spreadsheet in Front Window carl Excel Worksheet Functions 0 November 1st 05 02:54 PM
What is the setting to have more than one Excel Window? Jason W. Dove Setting up and Configuration of Excel 1 April 20th 05 10:56 PM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"