|
Do you mean you want to test or speed up the process launch and you find your process is already cached in the windows cache?
FlushInstructionCache -> Process instruction cache is flushed (but not the data)
FlushFileBuffers -> Call this for every open file handle and all writes are performed. (purges write cache)
use FILE_FLAG_WRITE_THROUGH in the file create or open call.
(disables write caching)
more interesting than the above blabla is
http://www.sysinternals.com/cacheset.htm
|
|
|
|
|
hi there
does MSHFlexGrid works under Visual C++?
the Bands facilities is available?
how can i build an hierarhical recordset?
how can i substitute, in Visual C++ 6.0, DataEnvironment object from Visual Interdev or Visual Basic?
thanks in advance for your help
|
|
|
|
|
Hi
I need to convert 24 bits DIB to 8 bits DIB
How do i do it...?
thanks
tomer
|
|
|
|
|
1) convert 24-bit to 8-bit + a palette (hard)
2) allocate memory for the DIB (easy)
3) fill in the BITMAPINFOHEADER (easy)
4) fill in the DIB's palette (easy)
4) copy each row of the 8-bit image to a row of the DIB image, insuring that each row of the DIB is padded to make the width of each row a multiple of 4 BYTEs. remember that DIBs are stored vertically flipped, compared to most images. (not too hard, not too easy)
or... (shameless plug)
visit http://www.smalleranimals.com/isource.htm
|
|
|
|
|
Is there a way to make text(or background) color of
only single items different without using owner draw?
For example I would like to paint all items with negative values red.
If there isn't a way to do it whitout owner draw, how do
you do it with it?
Thanx,
Goran Dodig
|
|
|
|
|
Hi
do something like
HBRUSH CMyDlg::OnCtlColor(CDC *pDC, CWND *pWnd, UINT nCtl)
{
if (CTLCOLOR_STATIC == nCtl) // or CTLCOLOR_EDIT
{
int i = GetDlgItemInt(pWnd->GetCtrlID());
if (0 > i)
pDC->SetTextColor(RGB(255, 0, 0));
)
return CDialog::OnCtlColor(pDC, pWnd, nCtl);
}
|
|
|
|
|
How can I change the look of the boring slider-control? (background color, background bitmap, foreground color, foreground bitmap, transparency, etc)
Øyvind
|
|
|
|
|
Hi
1. Add a Slider to your App
2. Add a New Class with Class Wizard derived from CSliderCtrl
3. Again with the class Wizard and A member variable for
your control mapping it to your NewSlider Class
4 Edit your New Slider Class 's OnPaint function
To Change The ThumbRect, SliderChannel, Background etc,
5, Add a KillFocus function and Add
Invalidate(TRUE);
You can change the shape, color and size of the thumbrect as it moves along the slider, or you can make the sliderchannel pulse with movement
Or you could animate the thumb control when clicked by the mouse
The options are only limited by the aesthetics
Regardz
|
|
|
|
|
Anyone know how to delete an IP entry in the ARP table without using arp.exe. Or if anyone has the source to arp that would be great also.
Environment : VC++ 6.0, WinNT, MFC/C++
Thanks
Marcellus
|
|
|
|
|
you may be intersted in looking at the SNMP Without SNMP sample from Felix Kasza's Win32 Samples
http://www.mvps.org/win32/network/snmp.html
Hope it will help
Alfadhly
|
|
|
|
|
I am interested to make an Installation of some COM objects, that should be configured to be launched as a certain user, how can I made it in a programmable way (not via dcomcnfg)?
thx
Jonathan
|
|
|
|
|
Go straight at the registry;
Under the key HKCR/AppID/YourObjectAppID make a new value called "RunAs", where you specify the user of your choice.
This can easily be done from a little C++ program, using the Reg* API.
Your object's AppID can be found under its CLSID in the registry.
HTH
Kim Gräsman
|
|
|
|
|
Part of my project is to search/replace or add text in large text files (over 4MB). The sequential approach seems to be very time consuming, therefore I started to think about other methods/procedures. Do you have/know any suggestions, www links, code snippets where I could start from?
Thanks in advance,
Stan
|
|
|
|
|
Look. I've worked with large files - it was 0.5 GB - 1.5 GB.
It was realy large and search and replace took hours with DOS-made program.
To impove it I compiled another program. One of the ideas was - first allocate enough memory. You probably can allocate all 4 MB in memory. Second, the program will work much faster if it will work not with bytes, but with DWORD.
So, I packed chars in DWORDs by 4 where it was possible.
Third, check only first DWORD, if it is equal, compare all.
Make a loop with offset by DWORD. After you passed all file, increment it, and so three times to make full search.
This algorithm a litle bit more complicated, but I've got speed of like it was just read and write - something like 10-15 minutes.
Hope this will help.
|
|
|
|
|
Is there anybody who has a chunk of code where I can see how to make items in a CListCtrl editable?
|
|
|
|
|
1. Single field editing (first sub-item) can be enabled due to flag in the ListCtrl properties
2. A general purpose editable ListCtrl could be find in the code guru section discussing ListCtrls
|
|
|
|
|
Hi.
I am sendind from a window a message to another window.
In the receiver window I use the PreTranlateMessage to get
the Message that the other window sends.
The broblem is that the receiver window gets the messages
grouped by 16!!!
For more details: i send a string on the wparam. For sure
i am sending diferent string but the second window get 16
times the last string.
Can anybody help me?
Thanx Soty
|
|
|
|
|
Why do not try WindowProc() instead of PretranslateMessage()?
|
|
|
|
|
Well, we sure have some responses and ideas. I personally like the idea of starting off by writing a VC++ plug-in that would let the user plan his project-bug lists, TODO lists, feature list and manage all this. Ofcourse, it's my opinion-so please everyone else voice your opinion.
As of now, Chris, Frank, Colin, myself and (Mark?) comprise of a group that's interested in taking this further. Who else is in?
|
|
|
|
|
Hi,
I like the idea, but I do not have any experience in writing plug-ins.
|
|
|
|
|
I'd like to think that another purpose of this group would be to help each other learn new things. Of course not everyone knows everything about everything, so this would be a great learning experience for all of us.
Frank
|
|
|
|
|
In the last three editions of the Kruglinski book "Programming Visual C++", (formerly "Inside Visual C++") there is an example of how to "nest" a common dialog into a custom dialog. In the example, the common file open dialog is nested into a custom dialog box. I am trying to do the same with a Page Setup dialog. I have taken very similar steps as outlined in the book, and converted file dialog specific steps to the page setup dialog. (Mainly passing my dialog template to the m_psd member rather than m_ofn member.)
The problem is that the dialog box appears to be "invisible". I can no longer control the parent window, but SPY++ tells me that my custom page setup dialog exists.
|
|
|
|
|
If I write a custom control and want it to source its own WM_NOTIFY messages, how do I determine values to use for notify-codes? Can I pick numbers out of a hat, or is there a preferred range? I note that MS controls use the range 0-950.
|
|
|
|
|
Use values great than WM_APP and you should be right.
|
|
|
|
|
Did any body try sample?
MSDN Library - April 2000/Platform SDK/User Interface Services/Windows Shell/Shell Prigrammers Guide/Samples/Band Objects
Is there any way to download this? I have to provide exact same functionality in my project.
regards,
Mahesh
|
|
|
|