mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 187
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2003
Posts: 187
I'm making a small function, that among things needs to remove scrollbars from channel windows, this is what I'm using, and its not working:

HWND hwnd = (HWND)atoi(data);
if (!IsWindow(hwnd)) {
lstrcpy(data,"C_ERR Window does not exist");
return 3;
}
HWND child = FindWindowEx(hwnd,NULL,"Static",NULL);
if (!IsWindow(child)) {
lstrcpy(data,"C_ERR Window does not exist");
return 3;
}
SetWindowLong(child,GWL_STYLE, GetWindowLong(child,GWL_STYLE) & ~WS_VSCROLL);

Thats the gist of my Scrollbar removing dealy. Why isnt it working?

Joined: Jun 2003
Posts: 195
N
Vogon poet
Offline
Vogon poet
N
Joined: Jun 2003
Posts: 195
primarily because the scrollbars on a channel windows are not the intrisic bars but rather the control scrollbar. i.e its just like any other control. You can try to use ShowWindow on them but mIRC will just reshow them (most likely in a call to SetScrollInfo etc..)


Have Fun smile
Joined: Mar 2003
Posts: 187
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2003
Posts: 187
well I've tried DestroyWindow() on them etc. I need them gone, vamoose. what do i need to do.

Joined: Mar 2003
Posts: 187
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2003
Posts: 187
i messed around and somehow got my stuff to work!

Joined: Mar 2003
Posts: 187
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Mar 2003
Posts: 187
now I'm trying to get the window to scroll all the way down, and im using this:

ScrollWindow(child3,NULL,NULL,NULL,NULL);
UpdateWindow(child3);

i'm pretty sure its not working. any ideas?


Link Copied to Clipboard