|
I have not tried this out. But you could rename it temporarily and then rename it back. Poor IE wont be able to write into it, because it won't exist. But you never know, perhaps it will create it again.
Nish
|
|
|
|
|
If you're using NT, you should use NTFS. If you are using NT and NTFS it's obvious: Don't give anyone but "System" any access whatsoever to the temp folder.
Please report how hard MSIE crashed.
/Mike
|
|
|
|
|
- How to modify the color of the caption of a button(not including the background of the button)?
- Regards,
Maer
|
|
|
|
|
Two ideas:
- handle WM_CTLCOLORBTN (MSDN: "By responding to this message, the parent window can set a button's text and background colors")
- use ownerdraw buttons (see BS_OWNERDRAW )
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
- Thanks, Paolo pal!
- I have never used "WM_CTLCOLORBTN" before (even not heard it). Since I am a newbie, can you show me an example?
- Have a nice weekend,
Maer
|
|
|
|
|
See this link:-
http://support.microsoft.com/support/kb/articles/Q130/9/52.ASP
WM_CTLCOLORBTN is not valid anymore.....
p.s. I first put this in the wrong thread...
|
|
|
|
|
See this link:-
http://support.microsoft.com/support/kb/articles/Q130/9/52.ASP
WM_CTLCOLORBTN is not valid anymore.....
|
|
|
|
|
- Thanks for your URL, Nish pal!
- I have never used the messages before, can you show me an example about the useage?
- Have a nice weekend,
Maer
|
|
|
|
|
- Sorry for interrupting again, Nish pal!
- I still have a question. After reading the article you introduced to me, it seems that we can not use these messages now. Are there any other methods to change the color of the caption of the button?
- Have a nice weekend,
Maer
|
|
|
|
|
see this link
http://www.codeproject.com/buttonctrl/cbuttonst.asp
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
- Thanks pal!
- The article will be great help to me.
- Have a nice day,
Maer
|
|
|
|
|
- Please help!
- Regards,
Maer
|
|
|
|
|
Is it possible to create a window that will render HTML, something like internet explorer. As our product is dependant on the version of the common controls dll that comes with IE5 I know IE5 will be installed so can I actually use the 'Internet Explorer_Server' window class. I am restricted to the Win32 API so the MFC solutions such as CHTMLView are not available to me. Any information you can provide would be greatly appreciated.
Steve.
|
|
|
|
|
I need my program to register itself as a service
I tried (RegisteSrviceProcess)
but it doesn't work with Win2000
so I need a way to do it (way that works with Win2000)
thanks in advance
MR.Byte
|
|
|
|
|
CreateService();
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
A small update...
Something like:
schService = CreateService(
schSCManager,
TEXT(SZSERVICENAME),
TEXT(SZSERVICEDISPLAYNAME),
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL,
szPath,
NULL,
NULL,
TEXT(SZDEPENDENCIES),
NULL,
NULL);
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Under VC++, I made a DLL as -Win32 Dinamic Link-. It has only one ".C" file containing the DLLMain two Function and the callback function. The first function loads the callback function and the second function unloads the callback function. Here is how the callback is loaded:
HHOOK hhGetMsg;
HINSTANCE hInstance;
LRESULT CALLBACK GetMsg (int iCode, WPARAM wParam, LPARAM lParam);
{
hhGetMsg = SetWindowsHookEx (WH_GETMESSAGE, (HHOKPROC) GetMsg, hInstance, 0);
}
with the GetMsg sending messages to a window everytime a message pops-up. There are no filters so all messages are SUPPOSEDLY "trapped". I used SendMessage to avoid a mess. Also calls CallNextHookEx.
I have looked at other codes that SUCCESSFULLY loaded a system-wide hook and My code are basically Identical. But my hook only monitors the APP/.EXE that loads it! I don't get it! The DLL and its functions are loaded from the APP/.EXE using LoadLibrary and GetProcAddress.
Need help! Thanks in advance.
|
|
|
|
|
I guess your problem is don't put any global data in a shared section, all data you use in your hook function must be placed in a shared section so it is same as multiple DLL instances.
here is a my snippet of code...
#pragma data_seg(".shared")
HHOOK g_hMouseHook = NULL;
HINSTANCE g_hInstance = NULL;
MOUSEHOOKSTRUCT* g_pMHS = NULL;
HWND g_hLastWnd = NULL;
UINT g_nLastMessage = 0;
UINT g_nLastHitTestCode = 0;
#pragma data_seg()
#pragma comment(linker, "/section:.shared,rws")
look at MSDN for more about shared section.
|
|
|
|
|
Many Thanks
|
|
|
|
|
I actually just created a system-wide keyboard hook. It was my very first time, and I managed to do it without any knowlegde of what you're talking about. I don't even understand what it means Anyway, I didn't use any #pragma preprocessor commands or anything special. If you want to check out my source, just tell me...
Sprudling
|
|
|
|
|
I need to do something when a file is opened using the menu of a SDI application.
I tried handling the ID_FILE_OPEN message, but that removes the open dialog. I still want it to happen, but I need to do other things.
Where do I do this?
Thank You
XP
|
|
|
|
|
The document recieves a OnFileOpen message, you can do it there.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I was wondering how many people base their error trapping on try and catch? I read in "Game Programming Gems" that exception handling was "expensive" and I wanted to know if anyone has felt this impact? I am writing a multi-client nonblocking telnet server app and speed can turn into an issue. Would I be better off to do a tradition bool or int error returns? Any input would rock!
----
Xian
|
|
|
|
|
Game programming and "normal app" programming are entirely different animals. Games are all about speed, speed, and more speed. When you write something like a Telnet app, most of your cycles will be spent waiting for the user to do something, or waiting for data to arrive via the connection.
I personally use return values for errors. It's what I'm used to and I would gain nothing by using exceptions. MHO of course.
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
try/catch is not expensive if it's used for unrecoverable errors. At that point you're exiting from the game anyhow. Unreal used exception handling and it's a high performance FPS. try/catch is only expensive if it's used to catch normally occuring errors.
Todd Smith
|
|
|
|