|
Hi,
I've been given the task of writing a program which will monitor how many pages have been printed on the printer attached to a system, and after a certain number have been printed, it will print a page of its own. The system could be a network printer server, or just a desktop system. Ideally, it should not be written as a printer dirver.
I could use some help with ideas as to how to approach this.
Thanks,
Aaron
|
|
|
|
|
Has anyone seen an example of docking windows that doesn't use MFC?
Thanks
Justin
|
|
|
|
|
Hello,
I created one dll using MFC/ATL/VC++ 6.0/NT 4.0 SP3. I can compile this dll without any error but when i register this dll using regsvr32, I get this error "DllRegisterServer in dllpath failed. Reutrn code was: 0x80040201". Is any body got this problem ?? I tried to register it on 98 and got same error. It gets register on two 98 machines though.
Any ideas?? Its not a issue of MFC version b/c I cant register on my development machine.
This dll adds extensions to IE. I am using IE 5.01 on all machines.
Thanks
Mahesh
|
|
|
|
|
You can look up the description of this error with the Error Lookup util (Start-Programs-MSVC 6-MSVC Tools-Error Lookup. That error is "An event was unable to invoke any of the subscribers." Dunno if that helps, but it's a start.
|
|
|
|
|
Hi
if it registers on some machines but not others I guess that there is at least 1 DLL missing on the failing machine.
Use the Depend tool os Visual Studio to find out what DLLs you need exactly
Kurt
|
|
|
|
|
thanks.
I read this article in MSDN and thought that I dont have latest version of comcat.dll but i installed SP5 on my machine.
|
|
|
|
|
I have an MFC MDI application that includes a CDialogBar. Inside the CDialogBar there is a CTabCtrl
that hosts a bunch of dialog boxes.
The problem that I am having is: How do I make Alt-F open the system menu when the focus is in
one of the dialogs on the CDialogBar?
I have handled the WM_MENUCHAR message in my CMainFrame class and I get notification there,
but I haven't figured out how to make the menu open normally.
Is this the right way to do this? Is there a better way to handle mnemonics in this situation?
I need to make all the mnemonics work no matter where they are, and no matter where the focus
currently is.
Any help would be greatly appreciated. Thanks!
|
|
|
|
|
I am trying to find a way of identifing a single computer system so that a piece of software cannot be transfered between computers using the same serial number. Can anyone suggest some ways of doing this without using the registry in VC++??
Cory M Hicks
|
|
|
|
|
I want to render a textured NURBS surface.
but I cann't understand below example. So I like to get a demo project.
Example:
The following functions render a textured NURBS surface with normals; the texture coordinates and normals are also described as NURBS surfaces:
gluBeginSurface(nobj);
gluNurbsSurface(nobj, . . ., GL_MAP2_TEXTURE_COORD_2);
gluNurbsSurface(nobj, . . ., GL_MAP2_NORMAL);
gluNurbsSurface(nobj, . . ., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
|
|
|
|
|
I'm currently trying to speed up my app by identifying code bottlenecks. The problem I find is that when some disk accesses have taken place they are now cached by Windows. Anyone know how I could empty / wipe out the disk cache please?
Thanks
|
|
|
|
|
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?
|
|
|
|