|
Using Spy++ you can identify the window name and class, so you can use FindWindow() to get a HWND and hide that window. But replacing it, is another thing.
The "Start Bar" should be an AppBar (see "Application Desktop Toolbars" on MSDN), handled by the Shell with special functions and messages.
Hope this helps,
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi Paolo!
(Are you italian as me?)
Thanx for your help! May you post me here the MSDN address on which they talk about App desktop toolbars? I can't find it...
Alex
|
|
|
|
|
You want to replace windows explorer with your own shell? Easy.
On Win9x look in win.ini for
shell=explorer.exe
On WinNT look in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
there is a value called shell
Just replace these with the filename of your replacement shell
|
|
|
|
|
Hi,
I want to send the keyboard message of ALT+CTRL+DEL to the system and Lock the computer programatically. I have tried the functions SendInput() and keybd_event() functions but they fail to send to this combination of key strokes while they send all other combinations of Keys inputs.
Could anybody suggest me a way out?
Thanks
Vijay
Vijay S
|
|
|
|
|
Use
BOOL LockWorkStation(VOID);
Windows NT: Requires version 5.0 or later.
Zolee
|
|
|
|
|
Thanks Zoltan for your reply .
But I am having a peculiar problem . I am not able to use the Function LockWorkStation(). I have included the file Windows.h and I am working on Windows 2000 Advanced Server. Still my code is not able to compile saying that the function is an undeclared identifier. In fact I am successfully able to use other similar functions like ExitWindows() etc. I even opened the Winuser.h (which is included in Windows.h and the function definition is there. I even tried it on other computers but the same result.??
And believe me I am not making a spelling mistake.
If only you could make something out of it.
Vijay S
|
|
|
|
|
You have to define _WIN32_WINNT = 0x0500 in the project settings.
Go to project setting and this to the preprocessor definitions:
_WIN32_WINNT=0x500
This will mean your code is for Win2000/XP
Zolee
|
|
|
|
|
Thanks ,
I got the answer . I had to define _WIN32_WINNT as 0x0500 in order to use this function as it is defined in this section of Winuser.h
Thanks
Vijay S
|
|
|
|
|
I need a sample code, showing how to create CFormView- form from
dialog.
Thanks in advance.
|
|
|
|
|
if you have the dialog template, its really simple - mfc class wizard does it for you - create a class derived from CFormView, and give the base constructor the id of your dialog - Easy
If you are trying to create from an already visible window in another app or something, yyou will have to make a dummy form view from a dummy dialog template. Then u will probably have to set the dialog area to match using the CScrollView::SetScrollSizes(MM_TEXT, SrcDlgSize);. Then enumerate all the child windows of the src window and duplicate them in the form view. THis isn't very elegant, but its the best I can think of
I hope thats helpful
Joel
|
|
|
|
|
Thank you for a help.
But can you give me a sample code just for creating window.
'Cos now there's problem: when I create child window,
it doesn't have title, system menu, close button, although
template does.
Thanks in advance
|
|
|
|
|
i am using the function WSAAsyncSelect() to make a socket send a windows message to the message queu of my program when data is ready to be received, like this:
WSAAsyncSelect(sd, hwnd, WM_SOCKET, FD_READ);
it sends the WM_SOCKET message and all works well ... but
i also want a message to be sent when the connection is closed, thus the message WM_LOST. but when i just add:
WSAAsyncSelect(sd, hwnd, WM_LOST, FD_CLOSE);
the function seems to overide the previous and it doesn't respond to received data anymore. how do i make it respond to both with a different message, or is it possible to say something like:
WSAAsyncSelect(sd, hwnd, WM_SOCKET, FD_READ | FD_CLOSE);
and see the difference in the message handler...?
Thanks
Kuniva
|
|
|
|
|
Yes, the WSAAyncSelect maintains a single state for a socket, each call overrides the previous and the flags are indeed a bit map you can or. Always call your recv until you get a WOULDBLOCK error, then wait for the message.
|
|
|
|
|
um sorry i dont get that.
how can i see if the message WSAAsyncselect() sends is triggered by FD_READ or FD_CLOSE ???
i also need to know how i can see if there's an incoming connection request and how to accept it because i just added FD_ACCEPT to WSAAsyncselect() and i made the socket listen but it just accepted the connection without i used the accept() function... i think its weird... (i saw the connection was accepted because i ran netstat and it said under connection status "ESTABLISHED")
Kuniva
|
|
|
|
|
i will make this more practical to imagine by telling u what program it is.
It is supposed to be a multithreaded echo server, i mean, its supposed to accept any incoming connection request AND (the special bit) when 1 client sends something to the server, the server needs to send this back exactly as it came to ALL (i repeat ALL) connected clients.
hope this helps?
Thanks for the help
Kuniva
|
|
|
|
|
The top half of the long value in the window message (from memory) contains the
FD_ flags for the event(s) that trigger the message.
In general, however, I use AsyncSelect like this:
- I make a winsock call.
- If the call returns the WOULDBLOCK result I wait for AsyncSelect to send a message.
- I make the same call again. This time I should get a real result (should I get a WOULDBLOCK I'll wait again).
When I get these messages I generally just look for an error code , or a FD_CLOSE. Otherwise I check the status by making the winsock calls.
So, for example, you do a listen. You call accept and it will normally give you a WOULDBLOCK (if it doesn't it means a call is already waiting and you can take it).
Then you wait for a message from asynselect to tell you there's a connection waiting.
Then you make that accept call again and it gives you the new socket.
The only exception to this pattern is the connect call which you only make once. In the case of the connect call once your FD_CONNECT comes back you're connected. You don't make the connect call again (an annoying inconsistency to my mind).
|
|
|
|
|
I've been trying to get tooltip hints working as the mouse passes over a TreeCtrl. I've created an OnToolTip handler, which does indeed get called when you settle the mouse on a tree item.
What I can't figure is how to translate what's passed to the handler into a HTREEITEM or similar so I can find the co-responding tree item and, hence, build suitable text.
I've got control IDs and a window handle available but I can't see how to translate either.
I've been using a CMapPtrToPtr to map the HTREEITEM to the relevant data object though, on further study, it probably makes more sense to point the item data field at the object.
|
|
|
|
|
|
I think that's the message I handle (don't have the code with me here). Certainly the routine I put in get's called when I'd expect it to, I just don't know how to make sense of the parameters.
|
|
|
|
|
You should have pointer to NMTVGETINFOTIP structure, which is full of relevant information.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Yup, I think that's the structure (this would be a lot easier if I had the code here). The structure I get contains a window handle and a what is probably a controll id. But what I need to access the data and supply the text is the HTREEITEM handle, which just doesn't seem to be arround. Nor can I find anything in CTreeCtrl that seems intended to look it up.
|
|
|
|
|
Yup, I think that's the structure (this would be a lot easier if I had the code here). The structure I get contains a window handle and a what is probably a controll id.
You're probably talking about NMHDR - it contains a handle and an id. You can cast the pointer to *NMTVGETINFOTIP to get more info - assuming that you're really handling TVN_GETINFOTIP.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks, that's probably it. I may well be looking at too generic a message too. I'll give it a go tonight.
|
|
|
|
|
Hi,
I have come accross a memory leak in my project ...
could anyone suggest any memmory leak testing utility which will help me pinpoint the source of the leak
regards
|
|
|
|
|
BoundsChecker from Numega is great. You can get a 15-days evaluation copy their website...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|