|
Which web broser are you talking about,
if IE there are samples in CodeProject,
if Netscape visit www.fundocode.com
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
Hi Prakash,
I want to write IE Browser Plugins.I need something like Adobe Reader.Also I would like to difference between Browser Helper Object and Plugin.
Again,thanks in advance.
AL
|
|
|
|
|
Sorry i dont have much info about that, but there are ie plugin samples using wtl here on cp.
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
hello firends,
how can i convert text into image programmitically.
|
|
|
|
|
Draw the text into a device context using TextOut or DrawText, then get the bitmap from the device context.
onwards and upwards...
|
|
|
|
|
I want to fill a chosen color from the color palette in a static control at runtime.How can i do it?
|
|
|
|
|
Create a custom derived class of any control and handle the WM_ERASEBACKGROUND in that class.create a solid brush of required color and paint the background(Note do it after calling base classes OnEraseBachGrnd).
|
|
|
|
|
hi there
1.How to disable Shift key?
2.How to change Shift key function to let it become as same as Ctrl key?
|
|
|
|
|
You can use GetKeyState() in you WM_KEYDOWN processing to check the state of the shift key; or you can simply process the WM_KEYDOWN message and check the wParam parameter for VK_SHIFT and then use SendMessage() to post a new message with VK_CONTROL.
|
|
|
|
|
To make the control of IDC_RADIO1 to be enabled state,I tried SendDlgItemMessage and EnableWindow respectively.The result is the statement "EnableWindow(GetDlgItem(hDlg,IDC_RADIO1),TRUE); " succeeds, but the "
SendDlgItemMessage( hDlg, IDC_RADIO1, WM_ENABLE, (WPARAM)0L, (LPARAM)0L ); " is failing! Why???
The following is my codes:
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)<br />
{<br />
switch (message)<br />
{<br />
case WM_INITDIALOG:<br />
return TRUE;<br />
case WM_COMMAND:<br />
switch(LOWORD(wParam))<br />
{ <br />
case IDOK:<br />
case IDCANCEL:<br />
EndDialog(hDlg, LOWORD(wParam));<br />
return TRUE;<br />
case IDC_BUTTON1:<br />
EnableWindow(GetDlgItem(hDlg,IDC_RADIO1),TRUE);
break;<br />
}<br />
break;<br />
}<br />
return FALSE;<br />
}
Rap off for you,for me,for our human.
|
|
|
|
|
From msdn:
The WM_ENABLE message is sent when an application changes the enabled state of a window. It is sent to the window whose enabled state is changing. This message is sent before the EnableWindow function returns, but after the enabled state (WS_DISABLED style bit) of the window has changed.
So i think WM_ENABLE is like a notification message and its handler isn't really responsible for changing the state of the control.
<font=arial>Weiye Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
Hello!
I need a cool Button (with MouseOver, MouseLeave and all other cool stuff), but I don't wann use any MFC Class. I need a pure SDK Cool Button.
Some ideas?
Thanxs.
|
|
|
|
|
The hover buttons here on CP would be easy enough to port.
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
All the hover buttons on CodeProject use MFC classes, and I need it pure SDK.
Thanks anyway!
|
|
|
|
|
|
What would be the "best" way to detect if a window in another process has closed (either been destroyed or received a WM_CLOSE)? I can think of 2 solutions:
- Sit in a busy loop calling
IsWindow() on the HWND of the window - Install a
WH_CBT hook and look for the HCBT_DESTROYWND notification code The first option is the easiest, but not good in terms of efficieny. The second is slightly more complex (though it's not too difficult) and would involve interprocess communication. It also has a performance hit on the system, although its processing would not be complex.
Does anyone have any other solutions?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Many more options if you control the source of the app that you need to monitor. If so, then you can broadcast a message, or set an Event, etc. in the OnDestroy of the window in question
onwards and upwards...
|
|
|
|
|
Dear All,
I am developing an dialog based application using MFC VC++ Version 6.0 for Windows 2000.
The application needs to perform certain tasks immediately before logging off /shutdown of the
system respectively.
For detecting logoff/shutdown i have handled WM_ENDSESSION event. OnEndSession call informs the
CWnd object whether the session is actually ending and this event is fired for both logoff as
well as for shutdown.
I need to detect the difference between log off event and shutdown event because I need to
perform seperate functions on logoff and shutdown.
Am I capturing the right event for handling this issue ? Also if possible please suggest any
alternate way to perform the same.
Waiting for your reply.
Regards,
Rohit
|
|
|
|
|
Hi Rohit,
When Logoff or Shutdown events occur it goes in WM_QUERYENDSESSION which in turn sends WM_ENDSESSION.
So as per your need you can distinguish using the lparam value.
If it is ENDSESSION_LOGOFF it is LogOff event and if EWX_LOGOFF it is ShutDown Event as per my observation and Testing.
Pankaj
|
|
|
|
|
Hi there
SHORT nState = GetAsyncKeyState(VK_CONTROL);
BOOL bDown = (nState & 0x8000);
what does 0x8000 mean and where can i find the infomation?
By the way,
What does (nState & 0x8000) mean?
Thanks
|
|
|
|
|
0x8000 is a hexadecimal number equal to 32768 in decimal or 1000000000000000 in binary. The value returned by GetAsyncKeyState() has bit 15 set if the key is down. However, since the value is a 16-bit SIGNED integer, a more intuitive way would be to code it like this:
SHORT nState = GetAsyncKeyState(VK_CONROL);
BOOL bDown = (nState < 0); If the state is less than 0, the key is pressed, otherwise it is released.
Hope this helps,
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Intuitive??
The bitmask is better, since it doesn't rely on SHORT being typedef-ed to a signed quantity. I know it should be, but hey, I've still got code from Win3.1 that works, and one day when I have a 64 bit processor, I might port it...
Steve S
|
|
|
|
|
Ok, ok. So I find it more intuitive
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
and I for one, will defend your right to say so.
In my day, of course, one would have done a shift operation (or was that a rotate left? Ah, that's why I've stopped writing assembly code ) and tested the carry flag...
Steve S
|
|
|
|
|
Steve S wrote:
In my day, of course, one would have done a shift operation (or was that a rotate left?
Either one would work, as long as you used a 16-bit shift
BTW, what do you mean your day?? I'm 23, and still write assembler :P
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|