|
I did do it sometime back but don't have the message number with me now.
Maybe I can give it you tomorrow.
This requires you to send a message to the taskbar asking it to lock itself. I did have the number but don't have it now.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Hi Tomas,
Your help would be greatly appreciated, in fact I send WM+USER+336 to taskbar, but it didn't work, which make me feel that it can't be done by sending a message.
And then I try another way below:
CToolBar* trayWnd = (CToolBar*)FromHandle(hShellTrayWnd);
DWORD barStyle = trayWnd->GetBarStyle();
barStyle |= CBRS_SIZE_FIXED;
trayWnd->SetBarStyle(barStyle);
It also didn't work, I was really frustrated, the style of taskbar vary every time even though I remove "trayWnd->SetBarStyle(barStyle)".
For example, sometimes barStyle is 380, but sometimes it is 376, and other times, it is another value. it is very strange for me.
Nothing impossible, Nothing sure
|
|
|
|
|
NianHawk wrote: Hi Tomas,
Your help would be greatly appreciated, in fact I send WM+USER+336 to taskbar, but it didn't work, which make me feel that it can't be done by sending a message.
Thanks.
This works on both Windows XP, 2000...
#define <code>WM_USERDEF_LOCKTASKBAR </code>424
static HWND hShellWnd = ::FindWindow(_T("Shell_TrayWnd"), NULL);
if(hShellWnd != NULL)
::PostMessage(hShellWnd, WM_COMMAND, MAKELONG(<code>WM_USERDEF_LOCKTASKBAR</code>, 0), NULL);
else
hShellWnd = ::FindWindow(_T("Shell_TrayWnd"), NULL); This will work!
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
It did work well, thank a lot. I have another question if you wouldn't feel disturbed, Actually I use spy to monitor taskbar, if my program send such WM_COMMAND msg to taskbar, spy can capture it.
But if I do it manually by using winxp functionality, spy didn't show this msg, that is why I always can't get this msg. Could you be so kind to teach me something about it?
Nothing impossible, Nothing sure
|
|
|
|
|
NianHawk wrote: It did work well, thank a lot.
You are Welcome
NianHawk wrote: I have another question if you wouldn't feel disturbed,
Not at all.
NianHawk wrote: Actually I use spy to monitor taskbar, if my program send such WM_COMMAND msg to taskbar, spy can capture it.
But if I do it manually by using winxp functionality,
Which functionality!
NianHawk wrote: Could you be so kind to teach me something about it?
Can you give me your email. I can send you a sample application, which demonstrates some useful messages related to the TaskBar.
BTW here is a list if you are interested...
305,
401,
402,
403,
404,
405,
407,
408,
413,
415,
416,
419,
420,
421,
424,
503,
505,
506,
510,
41093,
41094
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Thanks for your help.
I mis-thought there had not benn reply yet because I didn't receive the response mail as usual, maybe last time I missed to check "Notify me by e-mail if someone answers this message".
My email is : NianHawk@invalid.hotmail.com (please discard "invalid").
Which functionality!
===> I just lock the taskbar by taskbar menu.
Best regards.
Nothing impossible, Nothing sure
|
|
|
|
|
NianHawk wrote: Thanks for your help.
I mis-thought there had not benn reply yet because I didn't receive the response mail as usual, maybe last time I missed to check "Notify me by e-mail if someone answers this message".
My email is : NianHawk@invalid.hotmail.com (please discard "invalid").
Heh don't worry. I wrote an article on this subject. You can get the sample application from here[^]. Hope you will like it.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Thanks a lot
Nothing impossible, Nothing sure
|
|
|
|
|
If I wish to draw a window, or an image onto the desktop, do I use obtain a HWND from GetDesktopWindow() and get a DC from there? I wish to draw onto the desktop , so that my image appears as though it were part of the wallpaper, e.g. all other windows sit on top of it.
Is there another HWND I should be looking for?
|
|
|
|
|
Aneurysm00 wrote: If I wish to draw a window, or an image onto the desktop, do I use obtain a HWND from GetDesktopWindow() and get a DC from there? I wish to draw onto the desktop , so that my image appears as though it were part of the wallpaper, e.g. all other windows sit on top of it.
Create DC by using this method
CDC myDC(NULL);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi ,
Do you really have to draw on the desktop ,wont overriding the
CWnd::OnEraseBkgnd of your window work .that will give the same effect as drawing on the Desktop. Please check .
Regards,
FarPointer
|
|
|
|
|
Hi,
I have an application in which I display records in a grid. I populate the grid using a recordset that contains the results of a query of the database.
The problem is that if I have a large database (about 80,000 records and above..) then it takes a few minutes to load the grid with all of the records.
I need to make this faster... Any ideas?
|
|
|
|
|
|
Yeah - what I thought to do is show the first 400 records (for example), while searching for the other records.
I thought to load the data page by page, and display 400 records in each page.
So, it would work this way: display 400 records, then display another 400 (800 total), then another 400 (1200 total) and so on until I reach 78000 records.
But how can I do this with the recordset object?
Do I have to fill the recordset first with 400 records, then with 800 records, then with 1200 records, and eventually with 78000?
|
|
|
|
|
SWDevil wrote: So, it would work this way: display 400 records, then display another 400 (800 total), then another 400 (1200 total) and so on until I reach 78000 records.
only load the ones you need to display. if they scroll, load enough new data to complete the grid, and discard the rest.
ideally, if your grid control allows, you can put it in charge of loading the data for the rows it has to display when it needs them. don't make it load data it doesn't need - just let it ask for rows X through Y when it needs to display them, and don't worry about any other rows.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
ok - I understand your idea, but I don't understand how to actually implement it...
First of all - how can I know if I can put my grid control in charge of loading the data it needs?
Second - Let's say my grid control can't be put in charge of loading the correct data, how do I implement your idea?
Do I have to perform a new query each time?
For example: "SELECT * FROM TABLE1 WHERE field BETWEEN x and y" and then display the recordset that contains the result set?
Also - won't this solution take a lot of time also? isn't the solution of loading page by page better?
|
|
|
|
|
SWDevil wrote: how can I know if I can put my grid control in charge of loading the data it needs?
i don't know what you're using for your grid, but some of the standard Windows controls allow this. for example, the CListCtrl can act as a "Virtual list control", which means it will send you a message when it needs data for an item. the MSDN has info on this.
SWDevil wrote: Do I have to perform a new query each time?
ideally, you would cache some data.
SWDevil wrote: Also - won't this solution take a lot of time also? isn't the solution of loading page by page better?
you're only ever loading, at most, the number of lines you can display at once, so the control will load faster and won't be required to maintain a large amount of memory to hold all the items.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Hi All,
Can anyone tell me how to increase the max number of right click menus displayed on any particular icon on the desktop in Win XP?
Thanks and Regards,
Anil
|
|
|
|
|
Soory not quite sure about that.
check Micheal Dunn's "The Complete Idiot's Guide to Writing Shell Extensions" series. It might be useful.
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
how can i use WinINet to download a file through many connection and not only one like all the download manager
thx
bye
|
|
|
|
|
Hi.
I´ve made a screen capture code using the PrintWindow function, been my input parameter the window handle I want to capture. This window has some buttons, labels, ... that as you may know act as child windows for the first.
It all works fine, mostly, but every 500 or 700 grabs I get one or two of them where child elements appear as black rectangles.
I've read [1] about something like this when child windows style is CS_CLASSDC or CS_PARENTDC. Obviously, I do not create the windows I capture, so I can't change that style.
So, I don't know how to face the problem. Maybe a PrintWindow alternative, but I need independence of the z-order (deep) of the window, getting a clear capture even if the window is not foreground.
Thanks in advance.
[1]http://www.codeguru.com/cpp/g-m/gdi/capturingimages/comments.php/c11231/?thread=9097
|
|
|
|
|
In the WebBrowser application how to get the size of the window which includes the Html document in it , and the scrollbars also.
Regards
Shikha
NetStudio,Pune
|
|
|
|
|
I guess your problem is scroll do you use CHtmlView?
whitesky
|
|
|
|
|
Thanks for your reply .
Yes, i have used the CHtmlView class in my application and i want the size of the html page document i can get size of the window with scrollbar by using getscrollinfo function but it is again not giving the size of the window having the html document.
Regards
Shikha
Netstudio,Pune
|
|
|
|
|
Did you see GetHeight and GetWidth in this class
whitesky
|
|
|
|
|