forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Changing a registry value
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Jan 15, 2008 3:15 pm    Post subject: Changing a registry value Reply with quote

I have a recurring problem that I can't figure out.

I am using the "balloontips" style on a few dialogs (from VDS6). I also have used the balloon tips from the VDSGUI.dll.

On some machines, balloontips are disabled. I have found the registry key that controls this, and have code in my program to set it to a value of 1:

registry write, CURUSER, SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\ADVANCED,EnableBalloonTips,@hex(1),DWORD

I have tried it several different ways (with @hex(), without, etc). It seems to change the value to 1 (I can see it is changed in regedit) but then the value changes back to 0. It seems that if I change the value with regedit, it stays, but if I change it with VDS, it often changes back.

Any ideas?

_________________
Joe Floyd
Back to top
View user's profile Send private message
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Jan 15, 2008 4:13 pm    Post subject: Reply with quote

You should not need the "@hex(1)" in your registry write command if you specify the type as "DWORD".

Try:
registry write, HCU, SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\ADVANCED,EnableBalloonTips,1,DWORD

and

registry write, HLM, SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\ADVANCED,EnableBalloonTips,1,DWORD

If the systems are running Vista it could be UAC issue.


Last edited by WidgetCoder on Tue Jan 15, 2008 4:26 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Jan 15, 2008 4:24 pm    Post subject: Reply with quote

I originally had it without the "@hex()" - same result. I can see that the command sets the value correctly, but then it reverts for some reason. Doesn't seem like a VDS problem, really - but for some reason, regedit.exe makes changes that "stick" and my VDS program doesn't. Odd.
_________________
Joe Floyd
Back to top
View user's profile Send private message
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Jan 15, 2008 5:10 pm    Post subject: Reply with quote

That's strange... The "EnableBalloonTips" key doesn't exist on my system and BalloonTips do function, have you tried deleting the key?
Back to top
View user's profile Send private message Send e-mail
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Jan 15, 2008 6:14 pm    Post subject: Reply with quote

I found a system policy that may be causing the behavior you described, check the following key:
HCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer NoSMBalloonTip
Back to top
View user's profile Send private message Send e-mail
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Jan 15, 2008 6:49 pm    Post subject: Reply with quote

I don't have that key on my computer.

I have tried deleting the key also, but had pretty much the same results.

_________________
Joe Floyd
Back to top
View user's profile Send private message
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Tue Jan 15, 2008 7:32 pm    Post subject: Reply with quote

I think the problem is that Explorer reads the registry settings on launch and just saves them on shutdown unless it receives a "WM_WININICHANGE" message and re-reads its settings. Regedit Posts a broadcast WM_WININICHANGE message when changes are made which explains why it's working with regedit.

I'll dig through my code snippets and find the call to the user32.dll for WM_WININICHANGE you need.
Back to top
View user's profile Send private message Send e-mail
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Tue Jan 15, 2008 7:39 pm    Post subject: Reply with quote

That would be great if there is a solution - thanks for the help!
_________________
Joe Floyd
Back to top
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Wed Jan 16, 2008 4:48 am    Post subject: Reply with quote

Heres some REG stuff I found a while back, hope it helps somehow:

Enable/Disable Notification Area Balloon Tips
This tweak disables the annoying balloon tips that appear adjacent to the Notification area.

The [Notification Area] is on the right side of the Taskbar, adjacent to the Clock display.

Code:
[Start] [Run] [Regedit]

Registry Key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

Modify/Create the Value Data Type(s) and Value Name(s) as detailed below.

Data Type:
REG_DWORD [Dword Value] // Value Name: EnableBalloonTips
Setting for Value Data: [0 = Balloon Tips Disabled / 1 = Balloon Tips Enabled]
Exit Registry and Reboot


Below should disable all ballon tips, reverse to get what you want:
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"EnableBalloonTips"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"FolderContentsInfoTip"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\tips]
"Show"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"StartButtonBalloonTip"=dword:00000000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowInfoTip"=dword:00000000


Seems like I also just deleted the key and rebooted to disable it, cant remember for sure on this one.


Last edited by vtol on Wed Jan 16, 2008 4:55 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Wed Jan 16, 2008 4:51 am    Post subject: Reply with quote

You might try the following:

Code:


Registry Write,HCU,SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\ADVANCED,EnableBalloonTips,1,DWORD

# SendMessage
  # HWND_BROADCAST = 0xFFFF& or $FFFF or "%"65535
  # WM_WININICHANGE = $0000001A or $1A or 26
  %%HWND_BROADCAST = $FFFF
  %%WM_WININICHANGE = $1A
  # Registry Leaf
  %L = EnableBalloonTips
  %X = @SendMsg(%%HWND_BROADCAST,%%WM_WININICHANGE ,0,@addr("%L"))

# OR

# PostMessage
LoadLib User32
  %%HWND_BROADCAST = $FFFF
  %%WM_WININICHANGE = $1A
  # Registry Leaf
  %L = EnableBalloonTips
  %X = @lib(USER32,PostMessageA,bool:,int:%%HWND_BROADCAST,int:%%WM_WININICHANGE,0,int:@addr("%L"))
FreeLib User32



Last edited by WidgetCoder on Wed Jan 16, 2008 6:12 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Jan 16, 2008 5:52 am    Post subject: Reply with quote

Below is a quote from the Win32.hlp file on the WM_SETTINGCHANGE message::

Micro$oft wrote:

WM_SETTINGCHANGE

The system sends the WM_SETTINGCHANGE message to all top-level windows when the SystemParametersInfo function changes a system-wide setting. The system sends this message only if the SystemParametersInfo caller specifies the SPIF_SENDCHANGE flag.

An application can send WM_SETTINGCHANGE to all top-level windows when it makes changes to system parameters. For example, you can send this message after a call to the WriteProfileString, WriteProfileSection, or SetLocaleInfo functions, or after making changes to system parameters in the registry.
The WM_SETTINGCHANGE message is the same as the older WM_WININICHANGE message.

WM_SETTINGCHANGE
wParam = wFlag; // system-wide parameter flag
lParam = (LPARAM) (LPCTSTR) pszSection; // name of changed section or registry


Parameters

wFlag

Value of wParam. When the system sends the message as a result of a SystemParametersInfo call, this parameter is a flag that indicates the system parameter that was changed. For a list of values, see the SystemParametersInfo function.
When an application sends the message, this parameter must be NULL.

pszMetrics

Value of lParam. Pointer to a string that indicates the area containing the system parameter that was changed. For example, this string can be the name of a registry key or the name of a section in the WIN.INI file.
This parameter is not particularly useful in determining which system parameter changed. For example, when the string is a registry name, it typically indicates only the leaf node in the registry, not the whole path. In addition, some applications send this message with lParam set to NULL. In general, when you receive this message, you should check and reload any system parameter settings that are used by your application.

Return Values

If you process this message, return zero.

Remarks

To send the WM_SETTINGCHANGE message to all top-level windows, use the SendMessage function with the hwnd parameter set to HWND_BROADCAST.
Calls to functions that change the WIN.INI file might be mapped to the registry instead. This mapping occurs when the WIN.INI file and the section being changed are specified in the registry under the following keys:
HKEY_LOCAL_MACHINE\Software\Microsoft\
Windows NT\CurrentVersion\IniFileMapping

The change in the storage location has no effect on the behavior of this message.

See Also

SendMessage, SetLocaleInfo, SystemParametersInfo, WM_WININICHANGE, WriteProfileSection, WriteProfileString



HWND_BROADCAST is defined as "%"65535
WM_SETTINGCHANGE and WM_WININICHANGE are defined as 26

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
WidgetCoder
Contributor
Contributor


Joined: 28 May 2002
Posts: 126
Location: CO, USA

PostPosted: Wed Jan 16, 2008 6:52 am    Post subject: Reply with quote

ShinobiSoft wrote:

HWND_BROADCAST is defined as "%"65535
WM_SETTINGCHANGE and WM_WININICHANGE are defined as 26


You are correct I found those snippets in my junk directory and judging from the following comments I must have been a bit confused on the message numbers.

" # HWND_BROADCAST = 0xFFFF& or $FFFF or "%"65535 "
" # WM_WININICHANGE = $0000001A or $1A or 26 "

The following should work fine:
Code:

Registry Write,HCU,SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\ADVANCED,EnableBalloonTips,1,DWORD
# SendMessage 
  %%HWND_BROADCAST = "%"65535
  %%WM_WININICHANGE = 26
  # Registry Leaf
  %L = EnableBalloonTips
  %X = @SendMsg(%%HWND_BROADCAST,%%WM_WININICHANGE,0,@addr("%L"))

# OR

# PostMessage
LoadLib User32
  %%HWND_BROADCAST = "%"65535
  %%WM_WININICHANGE = 26
  # Registry Leaf
  %L = EnableBalloonTips
  %X = @lib(USER32,PostMessageA,bool:,int:%%HWND_BROADCAST,int:%%WM_WININICHANGE,0,int:@addr("%L"))
FreeLib User32


Bill, AS far as I can tell "WM_WININICHANGE" and "WM_SETTINGCHANGE" both use the same message number Hex "$0000001A" or Dec"26". I have used the "SendMessage" version in VDS successfully in the past I just can't find the actual code I used on this PC. I looks like I experimented with the "PostMessage" version but I can't recall the result it's been years since I have actually used VDS to write anything.

Thanks for the correction!
Back to top
View user's profile Send private message Send e-mail
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Wed Jan 16, 2008 7:48 am    Post subject: Reply with quote

the api help file (found on vdsworld) includes the send message values to use for wininichange and many other wm messages.
Back to top
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Mar 06, 2008 5:26 pm    Post subject: Reply with quote

I had the same problem with VDS6, I updated one of my older programs and noticed the all 3 LIST box's quit showing there important tooltips when converted to VDS6.

Mine does not have the below key:
HCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer NoSMBalloonTip

I tried everything on this post to no avail.
I tried it on 2 other machines in the house.

strange and disappointing at the same time Crying or Very sad

I'll try some old DLLs or DSU soon.


Last edited by vtol on Thu Mar 06, 2008 5:57 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Thu Mar 06, 2008 5:35 pm    Post subject: Reply with quote

Whats strange here is everything works perfect when you move the mouse over bitmaps and buttons, the problem is just related to the 3 LIST box's.

And also, if I remove the MULTI style(from the LIST box's),everything works like intended Question

Hope that gives someone a clue how to fix it, thanks for reading this post.
Any help is appreciated highly.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group