|
I'm not an assembly geek, but did you consider
just assembly stepping into memcpy, copying their
code and modifying to to do whatever particular
operation you need? It should just involve replacing
a MOV instruction with an XOR or OR instruction.
Oh, on other thing, if you are going for fast
performance, I believe the special MMX instructions
of the Pentium processor can do this sort of stuff
really fast (obviously you'll have to check processor
version and provide an alternative for processors
without those instructions.)
|
|
|
|
|
I'm currently working on an MDI application that has dockable toolbars and a child window (view). I want to make a menu item that allows me to return the windows & toolbars to their initial position. I am able to place the toolbars successfully via docktoolbar(), but i cannot recall how to handle the child window. I would like to capture the window's position during/just after it's creation, and upon the appropriate menu call, restore that position. I've looked into Get/Set-WindowPlacement() but i'm very unclear on it's usage. Any advice would be appreciated, code is especially helpful.
I was also wondering how i can call the built in functionality from the window->tile menu command that tiles your child windows (from within my code at runtime).
Thanks
Jeff Rothenberg
Project Engineer
Vector CANtech, Inc.
|
|
|
|
|
Good Formating everyone !
I need to set the string length of a float number :
for example, I have this number :
345.22123123 , and the length is 4 , so the output will be 345.2 , no leader zero, or trunc/round at the end, it's only outputing the number; if the lenght is smaller than the representation of the number, I manage this already.
What's the magic formula for this ?
MSDN says :
%[flags] [width] [.precision] [{h | l | I64 | L}]type
But I'm not sure what width or precision to set, since the width is the minimum length, and the precision is what's after the decimal.
Thanks.
Clueless Max.
|
|
|
|
|
there's a g format token that helps ...
Max.
|
|
|
|
|
I would like to alter the caption displayed on the buttons in a MSVC++ Message box. I've currently got MB_YESNO buttons and would like to have them display Bi lingual text (ie. YES/OUI and NO/NON). Any ideas on how to do this.
Thanks in advance.
|
|
|
|
|
I believe you'll have to make your own dialog to do that. If you're using MFC, you can just create something in the resource editor with some generic buttons, and derive from CDialog and add a few functions to set the text.
As a note - the system Message Boxes will display their text in the language installed/selected on the machine. That is, on an English system, they show English, and on a French system, they show French, etc. So maybe you don't even need to change them...?
Even a broken clock is right twice a day.
|
|
|
|
|
It's not simple. You actually can't change the captions n a true message box; they are fixed.
However, you can use a class called TcxMessageBox to do this, along with a lot of other message box customizations. It's on CP, somewhere.
|
|
|
|
|
|
Hi all, hope someone can help.
Using GetCurrentHWProfile() to obtain GUID string in simple app. #defining _WIN32_WINNT (0x0400)(and #include "windows.h")which ensures that the program works fine with NT and Win2k, but f() fails on a Win98 machine even though the f() is supposed to work with Win95 OSR2 and upwards.
Can't find any documentation in the MSDN - anybody know of further #defines that are necessary for this to work on a Win9x machine?
Sonork ID: 100.13715 - 3bananas4
I have detailed files
|
|
|
|
|
Hi,
I want to spawn a process and wait for it to finish. I'm doing this in a seperate thread, so the user can continue working. The problem is that the new process comes popping up in front of the application each time! Now I could spawn the process with _P_DETACH, so the process is invisible, but that way I can't wait for the process to finish. That is important, because when the process finishes, I build a texture of it's output image. Is this possible and if so how?
Thanks in advance,
Wybren van Keulen,
Funny Farm
|
|
|
|
|
Go to MSDN and check out CreateProcess and WaitForSingleObject .
Even a broken clock is right twice a day.
|
|
|
|
|
Hi All,
I've got a CDialogBar derived class which contains a rich edit control, I am using this as a message window for an MDI app. How can I modify the right click menu that is shown? Currently, my options are "Hide" and "Undock" or something like that. I would llike to add a CLear option to the message window.
Thanks,
Aaron
|
|
|
|
|
Hi All,
I've got a workspace style app (MDI), with a CDialogBar derived window containing a tree control on the left (for navigation, opening views, etc), and a CDialogBar derived window containing an edit control on the bottom (for messages), which sort of looks like the Visual Studio workspace. On exiting the application, I need to save the window position and state of the docking windows. How do I do this?
I guess can get a window rect with GetWindow?? soething or other, but how do I get the docked/undocked state of the window?
Thanks in advance,
Aaron
|
|
|
|
|
Have a look at
SetWindowPlacement/GetWindowPlacement for normal windows.
SaveBarState/LoadBarState for CControlbar windows.
Max.
|
|
|
|
|
Hey Thanks!
That worked pretty good, so far. I found the DOCKTOOL sample searching for that as well, which has helped.
So far, I am able to save the placement of the main frame, and restore the stae of the control bars.
But, what should I use to save/restore the size of the control bars? Ie, when I close the app, the message bar comes up with the correct state, but is not the correct size.
Can I use GetWindowPlacement for the control bars? Or do I need something like GetWindowRect/MoveWindow?
Thanks Again,
Aaron
|
|
|
|
|
AfxInitRichEdit();
I put this in the app class in an MFC MDI.
Now I have just a CDialog based app, and if I dont put it in, i dont get anything.....
Where should it go?
Appreciate your help,
ns
|
|
|
|
|
The dialog based application still should have a class derived from CWinApp...put the AfxInitRichEdit call in the app's InitInstance function
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
I found the function...many thanks
Appreciate your help,
ns
|
|
|
|
|
I have a CEdit with multiline and hScroll and VScroll but the contents arent wrapping automatically . How to get this to happen? Do I have to use a richedit control if I want to wrap contents? Surely there must be a way to wrap stuff around in a plane old CEdit...?
Appreciate your help,
ns
|
|
|
|
|
Have you tried the styles ES_MULTILINE, and ES_AUTOVSCROLL?
Those two alone should do the trick.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"AAAAAAAAAHHHHHH!!!!! Those leaks are driving me crazy! How does one finds a memory leak in a garbage collected environment ??! Daniel Turini Nov. 2, 2002.
|
|
|
|
|
|
This is, I think an M$ feature! it is documened in the MSDN, here is a code snippet of mine from an old prog, in OnVScroll method
SCROLLINFO info;<br />
info.cbSize = sizeof(SCROLLINFO);<br />
info.fMask = SIF_TRACKPOS; <br />
<br />
GetScrollInfo(SB_VERT, &info);
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
I should have mentioned this for the case where:=
SB_THUMBTRACK == nSBCode
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
When I use the SetScrollSizes() function of a CScrollView, it accepts a 32-bit integer... ok... but when I scroll the scrollbar over 32767(Seems to be about there), the scrollbar warps back to the beginning and stays there... why? Is that the limit it can have?
Only tested it with vertical scrollbar, btw.
|
|
|
|
|
I am aware of programs like Grid Control that allow you to deal with cells. However, I want to write my own source code that creates tables and that allows the user to edit the contents of a table. Simply, I need to create some excel-like cells. Can anyone tell me what windows functions I can use for that?
none
|
|
|
|