|
In your CApplicationApp::InitInstance()
put
if (!AfxOleInit())
return FALSE;
|
|
|
|
|
Ok, thanks ...
Another thing: I did put the imagem in the list background, but the list have text itens. How can I make the text be transparen too ??
[]'s
CRIS.
|
|
|
|
|
|
Message: "The page cannot be displayed"
Any other idea ??
I need to make a COLORREF object transparent. So, I can use in the SetBkColor() function. It's possible ??
[]'s
|
|
|
|
|
I haven't had any experience of that myself.
But a quick google on 'msdn SetBkColor() transparent' gave many results..
Try checking them out.
|
|
|
|
|
Hi,
I'm starting to develop a plugin for Outlook Express and I need to learn about windows hooks (CBT hooks?). I did get the PGP source code and tried to work with that, but I could probably use some documentation along with easy/clear samples since I don't really know exactly which part of the code to use and all.
I did find a few articles on CP about hooks, but do you guys know about a good one to start, on CP or any other place on the web???
Thanks!
---------------
Tired of Spam? Introducing InboxShield 2.0 for Microsoft® Outlook® 2K/2K2/2K3
http://www.edovia.com
|
|
|
|
|
Here you are :
http://www.codeproject.com/dll/#Hooks[^]
[edit] just did the clickety police myself [/edit]
my favorite being J.M Newcomer 's article, which is complete.
Also, the Keyboard hooks from Hirosh Joseph has very good code.
Hooking is really easy : capture windows messages, get your app informed about you catching these messages (usually using user defined messages), and handle these messages in your app.
~RaGE();
|
|
|
|
|
How Do we create new fonts from a Bitmap the size of the font is given. plz do mail me to sreeram_gsr@rediffmail.com
Sreeram
|
|
|
|
|
I am trying to use a Timer in a non MFC framework . I have been able to use this timer in the past. Suddenly I am faced with problems which I am failing to comprehend .
The timer is called as :
timerID=::SetTimer(NULL,NULL,1000,this->TimerCallback1);
that confirms to the syntax
UINT_PTR SetTimer( HWND hWnd,
UINT_PTR nIDEvent,
UINT uElapse,
TIMERPROC lpTimerFunc
);
My Call back is defined as
static VOID CALLBACK TimerCallback1(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
Still My Timer Function is not getting called !!!
The strange part is that The timer does get called when the interval is less than 400 msec !!!!
|
|
|
|
|
You have to dispatch the messages, otehrwise WM_TIMER gets stuck in the queue.
act_x wrote:
The strange part is that The timer does get called when the interval is less than 400 msec
That's because you have no messages coming before 400ms, and WM_TIMER is the first one which gets handled by your function.
~RaGE();
|
|
|
|
|
So do i have to keep polling the message queuue by doing
GetMessage() and check to see if it is a WM_TIMER message ?
|
|
|
|
|
No you do not have to check it, but I think you must have a DispatchMessage() somewhere.
~RaGE();
|
|
|
|
|
Does anybody know how to change the caption of the main dialog window dynamicly?
|
|
|
|
|
SetWindowText("Your window text here");
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Hi,
I use ShellExecute to run some dos commnds from by application.
Everything works fine but I have to sit in a tight loop to wait for the command to finish like that
<br />
do<br />
{<br />
retval=WaitForSingleObject (sei.hProcess, 0);<br />
} while (retval ==WAIT_TIMEOUT);<br />
This makes my application hang the PC for a long time.
Any elegant way to do it ?
Shay
|
|
|
|
|
Do exactely the same code in a separate thread.
~RaGE();
|
|
|
|
|
Use CreateProcess(), then you'll get a handle you can wait for with WaitForSingleObject()
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
AFAIK, this hangs the app as well, no ?
~RaGE();
|
|
|
|
|
Yup. But using a kernel wait instead of a busy wait would be much nicer for your CPU.
If you want your application to continue to respond to input, then you should use MsgWaitForMultipleObjects() with a message pump. This lets your application respond to input and paint messages while waiting for an event to become signaled.
Ryan
"Everybody has a right to be stupid, but
some people abuse the privilege."
Uncle Joe Stalin
|
|
|
|
|
Ryan S Roberts wrote:
MsgWaitForMultipleObjects() with a message pump
Could you post a tiny code snippet ? I'm interested in this (already tried something like that, but kept having my app crash, probably because of the message queue ...)
~RaGE();
|
|
|
|
|
That's because the time-out interval is 0, which means test the object's state and return immediately. Supply a reasonable time-out interval such as 2000.
|
|
|
|
|
if it's possible to receive events fired by HTML controls that are placed in an HTML file that is displayed in a CHtmlView ???
If is possible, how can I do it ??
|
|
|
|
|
|
I paint something on a window, and wanna save the drawing as a bitmap file? What can I do? Please help me!
stanley
|
|
|
|
|
I am reading a binary file in c++ (reading every 1024 bytes) but get an error when I do this:
do
{
nBytesRead = infile.read( BytePtr,1024 ); // fails on this line
cout << BytePtr << endl;
}
while( nBytesRead > 0 );
The error line says there is no acceptable conversion. I can do this in mfc but it doesn't allow me to do it in c++.
How can I do this in c++??
|
|
|
|