|
I think you should rather write this info to the Windows Event Log.
Anyway, if you need to interact with the desktop, first read 'Interactive Services' in your VC++ help. It should be under Platform SDK/DLLs, Processes, and Threads.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I am still trying to choose the language of the standard dialog boxes...
I succeed for all common dialog boxes (printer setup, save as...): Just for try, I put the right comdlg32.dll version (the english one, I am on a french OS)in the working directory of my app and what was my surprise to see that it is working!!! I run my app, clic the "open file" item and the english box was display. I let it open on the desktop and run notepad to clic the same item: the box has been open in french!!!
But I steel searching for the monthes and days names of the calendar. The call of the calendar APIs seems to be in the comctl32.dll but I can't load another version of this DLL as I do for comdlg32.
elisabeth.sever@europlacer.fr
|
|
|
|
|
If you have a DLL that exports a number of classes, many of which a template classes, and you find that there is a common templated type that is being used over and over again, is there something special you're supposed to do for this ? I realize I may not be explaining this very clearly so here's an example:
so I have this:
template <class t=""> class A {
///whatever
};
and I find I am using A<int> all over the place in the library. Should there be some special instantiation of the template type ? Is this more efficient ? Does it even matter ?
|
|
|
|
|
I find I am using A<int> all over the place in the library.
A simple typedef A<int> AINT will save you a bit of typing. Since this is only a compile-time thing, there is no difference in the resulting binary.
--Mike--
http://home.inreach.com/mdunn/
This posting is provided "as was" with no warranties, guarantees, lotteries, or any of those little bags of peanuts you get on planes. You assume all risk for crossing the street without holding mommy's hand. © 2001 Mike's Classy Software. Member FDIC. If rash develops, discontinue use.
your with and
|
|
|
|
|
Guys,
Is there any way to cancel WaitCommEvent for non-overlapped IO ?
Thanx..
|
|
|
|
|
You can't...
Only one thing at a time can be done to a non-overlapped serial port.
See Q105302
Col
|
|
|
|
|
how can i get a responce to a click on a capture window. i tried ONLBUTTONDOWN but no responce
|
|
|
|
|
I found the only way to make this work was to keep firing a timer that called SetCapture over and over, and doing this in OnMouseMove:
CPoint pt;
GetCursorPos(&pt);
CRect rc;
GetWindowRect(&rc);
if (rc.PtInRect(pt))
ReleaseCapture();
Here's the timer function:
if(nIDEvent == ID_TIMER_SETCAPTURE)
{
CPoint pt;
GetCursorPos(&pt);
CRect rc;
GetWindowRect(&rc);
if (!rc.PtInRect(pt))
SetCapture();
}
I did not find another solution that captured the mouse AND got the click messages inside the dialog class. If you find one, please LMK because I thought this very ugly indeed.
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
|
|
|
|
|
Dear friends,
i've created one dialog box, which shows the downloading status of a file from the internet. but, the speed is a bit slower than the actual windows downloading dialog box. can any1 suggest how to make my dialog box downloads more faster than the windows one. thanx in advance...gopi
|
|
|
|
|
Does anyone know if HDN_BEGINTRACK ever gets sent correctly ? I have a listview in report mode and when I click and drag the header divider, the HDN_BEGINTRACK message is never sent. Is this a known bug ? I looked on MSDN and didn't see much. I am writing in raw Win32, not MFC, if that matters.
|
|
|
|
|
Stupid question, but you're checking for it properly as a WM_NOTIFY message ? Have you tried Spy ++ to see if it gets sent ?
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
|
|
|
|
|
Yeah, I checked in spy, and as far as I can tell it never appears to get fired. Which seems rather odd to say the least. What's even weirder, is that HDN_ENDTRACK does get sent, and HDN_TRACKING does not get sent. very frustrating.
|
|
|
|
|
I believe this problem can be caused by HDN_BEGINTRACKW (Unicode) notification sent even if your app doesn't use Unicode and expects HDN_BEGINTRACKA mapped to HDN_BEGINTRACK by preprocessor. There was a similar question some time ago in this forum.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
now In my database,I can get the name of sender and receiver ,
the text the sender send to,the time,and the attachment,
the question is how I can save these information to a *.eml?
any suggestions?
thank in advanve!
|
|
|
|
|
I am looking for a piece of code that might help save me some time. I have a file of raw triangles that define an object that I need to display using OpenGL. I would like to find some code that takes the mesh of triangles and generates GL triangle strips for them.
I have code that generates quad strips from a regular height field but it's not completely applicable. I could attempt to generate a height field from the mesh but I would prefer to not be confined to a regular grid of x-z coordinates.
Anyone seen anything good for this ?
|
|
|
|
|
Check the GNU Triangulated surface at
http://gts.sourceforge.net/
If you look for triangulation, you'll find it there.
Jonathan de Halleux, Belgium.
|
|
|
|
|
Hi every1, i'm working on a file downloading engine presently. my is working properly but,the problem is i have to make it more faster downloading one than the windows downloading dialogue box. I have used vc++ for constructing my dialogue box.Can anyone help me in making such. it should download the file very fast like gozilla. can you plz send in the code, if you have alreadly done it. thank you very much...gopi
|
|
|
|
|
Thre are some Win32 API finctions that take parameters
measured in unions that equal 100[ns].
e.g. functions related to JOB Kernel Objects.
Is it possible for OS to distinguish such a short interval ?
My question is whether the implementation of such a function
checks some registers, or sth. so often (every 100ns) or
it check the condition far (but still often) rarely (i.e
every 1 [ms])
Thanx in advance
Michal Januszczyk
Michal Januszczyk
|
|
|
|
|
They probably use QueryPerformanceFrequency which uses the RDTSC instruction of the Pentium-class processors. It returns the value of the CPU's clock tick counter. The frequency of the counter ranges from 200MHz for Pentium Pros to around 1.2MHz for P2s. This means an effective resolution of about 1uS or 1000nS in the worst case. They just gave themselves a bit of headroom by accomodating ticks of up to 10MHz (a period of 100nS.)
|
|
|
|
|
Hi,
How can I move the edit cursor to the end of a rich edit control?
I need to append text to the end.
Thanks in advance,
Erik Hammar
|
|
|
|
|
I do it in Win32 like this:
::SetFocus (editControl);
::SendMessage (editControl, EM_SETSEL, (WPARAM)length, (LPARAM)length);
::SendMessage (editControl, EM_REPLACESEL, 0, (LPARAM) ((LPSTR) str.c_str()));
I'm sure the MFC class for a rich edit will have methods so you don't need to send messages like this. The basic idea is make the cursor select the end position of the text in there, and then replace the selection ( which is really a caret at the end of the line ) with the text you want to append. length obviously equals the length of the text already 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
|
|
|
|
|
Christian,
does this code correct for 8 bpp Bitmap?
WidthBytes=lpBitmap->biWidth/4;
if (lpBitmap->biWidth%4) WidthBytes++;
WidthBytes*=4;
How to use color table for 8bpp bitmap (for pixels)?
I think, RGBQUAD Quad = (LPRGBQUAD) Data;
in this case (for 8bpp) doesn't work
Am i ridht?
|
|
|
|
|
That looks promising. You'd need to then load the palette and look up the colour values based on the indexes. You're right, RGBQUAD will not work for 8/16 bit. To be honest, if it was me, I'd do it the lazy way and convert to a 24 bit DIBSection and then just read the bits off that in memory.
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
|
|
|
|
|
What functions do i need to convert 8 or 16 bpp bitmap to a 24 bit DIBSection?
|
|
|
|
|
Chris has a nice DIBSection wrapper on this site, you just create a 24 bit DIBSection and select it into a DC, then you can copy it across, and the DIBSection has a pointer to the data.
LMK if you have any trouble, I'll dig it up and write some code for you. You probably don't even need the wrapper, if you go to www.wdj.com, they have an article online of mine from September, the code from which will show you how to create a DIBSection yourself and copy a bitmap onto it and access the bits directly.
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
|
|
|
|