|
Hello,
I just want to know how can i override functionality of To,Cc & BCc button .i mean to say when a user clik on this functionality my Functionality should be invoke not Outlook default one.i know have to implement event sink for this but how .i don't know.I am able to get Send button but not getting any id for these button please help me and let me know how to perform sinking on this
if anybody know
please mail me on rupechamp@gmail.com
thanx in advance
|
|
|
|
|
I have an project. Translate English to Vietnamese. So I must use Vietnamese in Console. But I don't Know how to use Unicode in Console and select a font for my program. Please help me! Thanks!
|
|
|
|
|
Dear all,
I have a question about these functions. According to MSDN, "The WriteFileEx function ignores the OVERLAPPED structure's hEvent member...WriteFileEx signals completion of its writing operation by calling, or queuing a call to, the completion routine pointed to by lpCompletionRoutine, so it does not need an event handle"
To wait for its completion, I use WaitForSingleObjectEx. Because WriteFileEx doesn't need an event handle, what handle should I use to transfer to WaitForSingleObjectEx?
Thanks.
|
|
|
|
|
This doesn't work.
If you use async APIs, then why use WaitForSingleObjectEx to make it sync?
Better use WriteFile without OVERLAPPED structure.
Don't try it, just do it!
|
|
|
|
|
Actually, I called WriteFileEx and do other tasks while IO task is being performed. Before doing new writing task I call WaitForSingleObjectEx to determine if the previous writing task completed. But I'm not sure how to transfer a handle to the first param of WaitForSingleObjectEx.
Thanks.
|
|
|
|
|
WriteFile does exactly that you want to program yourself!
Using asynchron APIs does only make sense if you want the CALLING THREAD to do some other work while the read process is pending!
By the way, there is no reason to call WriteFileEx every time a write operation was completed.
You can also call WriteFileEx many times at the same time, the system queues the data and tells you when the complete process is complete. There is no event handle when you use WriteFileEx.
After a write operation is complete the OS will call the completion routine you set as parameter of WriteFileEx. So the only way to use a wait function is to create an event yourself and set it within the completion routine.
Don't try it, just do it!
|
|
|
|
|
So, I don't need to wait for the previous writing task completes before calling a new WriteFileEx.
Am I misunderstanding you?
Thank you so much for your precious help.
|
|
|
|
|
You can call the ssynchronous WriteFileEx multiple times while IO is pending.
What the documentation is trying to conveysay is that the completion CALLBACK will be activated not the event handle. So you need to decode which IO request(s) completed when our IO completion procedure is called with the information you originally provided as part of the IO completion callback setup prior to making the WriteFileEx call.
|
|
|
|
|
I was wondering how to change the look (or even behaviour) of a windows common control so it will reflect throughout the entire platform. For example I'd like to change the progress control to be a fluent bar instead of the normal block-ish one. I found an article on MSDN about this but it was for Win CE, couldn't find anything for 2K/XP. Does anyone have an idea as where to start?
Kuniva
--------------------------------------------
|
|
|
|
|
System wide hooks???
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
When run I get assertation failure.
What cause it. I remind it is those global variable defining the main thread.
//////////////////////////////
CWinApp::CWinApp(LPCTSTR lpszAppName)
{
if (lpszAppName != NULL)
m_pszAppName = _tcsdup(lpszAppName);
else
m_pszAppName = NULL;
// initialize CWinThread state
AFX_MODULE_STATE* pModuleState = _AFX_CMDTARGET_GETSTATE();
AFX_MODULE_THREAD_STATE* pThreadState = pModuleState->m_thread;
ASSERT(AfxGetThread() == NULL);
ytvsoftware
|
|
|
|
|
Hello,
What assertion do you get and what do the comments say about it?
A assertion in the MFC library usually means that you are doing something wrong!
I also got the blogging virus..[^]
|
|
|
|
|
does anyone know how to get an object moving along the path of a sine wave? I've got my object translating across the screen with simple matrix multiplication in DX9 but I can't figure out the sine wave path.
anyone have any ideas?
|
|
|
|
|
Move the world matrix of that object according to the sine wave.
The position of the matrix is a vector with 3 components, so create a function that returns a "sine wave" vector by giving the relative or absolute time (depends on your timing model) as function parameter and add the result vector's components to the position values of the world matrix.
How such a function should look like is quite easy.
I think you want to use the y-axis as magnitude of the wave.
So:
y = sin("angular velocity" * t);
Then you have to define a movement vector for spreading directon of the wave (let's call it v).
x = v.x * t;
z = v.z * t;
I hope that helps...
Regards,
Alex
Don't try it, just do it!
|
|
|
|
|
Wow .. def gonna do that man. I'll report results.
Thanks for quick reply.
|
|
|
|
|
I guess I don't fully understand.
I've got my timer around my render function so it only renders if the time is more than a certain value. What exactly do you mean give the relative or absolute time to the "sine wave" function? Also what would I use to calculate my angular velocity and my movement vector?
I think I'm starting to understand, thanks a lot for you help.
j
|
|
|
|
|
Well, its advanced to me anyway.
Included is the link to download the sample project and exe (Translucent_Test.exe) (too large to upload here - ~ 700k)
Run the exe to see the flickering problems.
1) The Side Nav Window will close and open with a mouse click - works fine.
2) The Top and Bottom Button (with the little arrow) scroll the buttons in this window vertically - too much flickering.
I have tried InvalidateRect, regioning, screaming, drinking, smoking, to no avail.
I'm not too worried about the sizing issues at the moment as this is just some test code. The painting issues are the major problem.
Critism is welcome, as it usually leads to a solution.
Look at the SsScrolled() method. This method is called everytime the buttons are moved up or down.
http://www26.brinkster.com/wzedx2/b...lucent_Test.zip
Any help would be appreciated.
Thanks.
PS: if the link does not work, please cut and paste into a new browser session.
|
|
|
|
|
Sorry, the link is
http://www26.brinkster.com/wzedx2/bin/Translucent_Test.zip
|
|
|
|
|
sprintf(statusMessage, "Stopped");
SendMessage(statusControl, SB_SETTEXT, 0 | 0, (LPARAM)statusMessage);
The following two lines of codes is what I used to update the status bar control. But only the first text was displayed. Others just doesn't get updated. Anyone have any solution? Thanks in advance.
|
|
|
|
|
|
Hi everybody : ). I took a short brake from visiting The Code Project since I was very busy with the project some of you know I'm working on. That is, a freeware. I'm pretty close to completion and hopefully in a few months you'll all have the opportunity to use a very nifty and usefull little application : D. For free. 'cause I am doing this out of pleasure, like you are helping here. I like to consider this my little gift to all the people that help and to the internet community in general.
However, we're not living in Paradise, so we run into all sorts of problems. What happens is that I got myself into one such problem : |.
The issue is that I want to use GDI to draw something in a Window. Draw something in a Window, by taking THAT SOMETHING from another window. Using getDc and bitblt that is : ). All fine so far... until I use ShowWindow to hide the window.
Of course, I don't want my original window (the one I'm copying the stuff from) to be visible. But the problem is that after I hide it, bye bye bitblt. Bitblt uses X and Y coordinates to *know* from where to take its stuff. So if I hide the window, the function just copies whatever I got on screen at that location. Pretty frustrating huh?
I guess I could use GDI function to draw text and colors directly???? I don't know how. I don't want to go there. It's too complicated for what I need. Because I may want to include bitmaps and stuff. So people... my question is... how can I bitblt from a hidden window? : ). 'cause frankly, if I nail this problem, I'm gonna be one step closer to my goal.
I don't think that I need to mention that I thank all of you for being here and helping people like me. Two months ago I was a newbie to VC++, now I began to find my way around. But there are still tricks which escape me.
Thank you in advance.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Have a look at WM_PRINT / WM_PRINTCLIENT.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Well .. first off one quick question. Why no MFC?
Anyways, try Bitblt()ing all the stuff you need to draw to your window into a seperate backbuffer, or a second backbuffer if you're already using one, then you can always have a copy of whatever it was that was drawn no matter what's currently in there.
Just an idea tho.
J c0dex
|
|
|
|
|
Thank you both PJ Arends and jc0dex for answering so soon : D.
I didn't yet check out PJ's answer, but I do have a question for you both, and something I forgot to mention!
The window that I want to draw from (the original window - the one that I wish to hide) gets repainted every second. So practically, things are going on there. Every second something changes in it.
So I don't know if a backbuffer might help. Are you talking about the stuff that I can get from using CreateCompatibleDC?
Sorry for leaving out this detail. The fact that the window changes complicates things. I don't even know if Windows really changes it... because this window (the original window) will always be hidden. There are two labels on it which change every second indicating a text. Or maybe I'll put a series of bitmaps that change one after the other. This is the real issue.... I would draw directly in the source window... but what if I want to take more complex elements from the original window? Like a bitmap, a gif or even other more complex things. This is why I need a support window, to copy the stuff from. It's difficult drawing directly with GDI.
So... I can only use GDI... and I don't know if it'll work with a window that keeps changing its data every second and it's also hidden with ShowWindow.
Hm : |.
Oh, and what was that about MFC? What does this have to do with anything? : ). Excuse my lack of knowledge.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
MFC stands for Microsoft Foundation Classes, which is "the" way to program windows applications nowadays. If you're doing anything complex as far as interaction, saving / loading data, or windows common controls and dialog boxes, just to name a few, MFC is a much easier way to go about doing these things.
With the MFC you could literally copy the info from one window to another with a couple commands, whereas with standard Win32 programming it would be much much more involved and complex.
MFC makes complex tasks in Win32 as simple as a function call in some cases.
Once you get into DirectX and OpenGL they use basic Win32 functions and operations, so knowing the basics of Windows programming before MFC is almost essential if you plan to continue learning languages.
There is endless information on the MFC out there these days, if you would like some direction on where to get started I've included some resources below.
I hope this helps a little.
j c0dex
|
|
|
|