|
jhwurmbach wrote:
Sometimes closing VC, deleting the *.ncb, *.opt and *.pos files in your Project dir and repoening helps.
That usually works for me.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hmm I'll try deleting them. I didn't know about opt and pos files, just tried deleting the NCB.
Thanks to everyone who answered
|
|
|
|
|
Close the workspace (or solution if you're using VS.NET), delete the .NCB file, and reopen the workspace/solution. Deleting the .APS file will also help with problems with the resource editors sometimes.
Software Zen: delete this;
|
|
|
|
|
Hello everybody!
I've got a customer asking for a Windows printer driver that can render the output into a compressed TIFF image file.
I've never written a printer driver before so I am looking for pointers in the right directions.
My requirements are that it should be a regular Windows driver (98/Me/NT4/2000/XP) and it should work exactly like a standard printer driver with the difference that the output has to go to a file instead of a printer.
Any help is highly appreciated. I guess someone has already made a library or some source code of a skeleton of a driver like this. The main problem I see is grabbing the output sent to the driver and decode it and find out its format.
Thanks!
Valerio
|
|
|
|
|
|
Ehehe
I've already done the same query on google, but all I've found are precompiled drivers like this one. But I need to do a lot of customization on this project. I described only the base of the project, but there's going to be a lot of other little stuff going on, so I cannot use a 3rd party driver.
|
|
|
|
|
|
hello, i have a callback MouseProc function that's not being called, what's wrong? thanks
LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lparam){
ofstream output1("debug.txt",ios::out);
output1.write("hello",strlen("hello"));
output1.close();
return -1;
}
HOOKPROC hookproc = (HOOKPROC)GetProcAddress(hInstance, "MouseProc");
SetWindowsHookEx(WH_MOUSE, hookproc,hInstance,GetCurrentThreadId());
the following is the main function in detail:
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int Cmd) {
MSG msg;
// Setup and register the window class;
WNDCLASS wClass;
wClass.style =CS_HREDRAW|CS_VREDRAW;
wClass.lpfnWndProc =WindowProcedure; // callback-function;
wClass.cbClsExtra =0;
wClass.cbWndExtra =0;
wClass.hInstance =hInstance;
wClass.hIcon =LoadIcon(hInstance,IDI_APPLICATION);
wClass.hCursor =LoadCursor(NULL,IDC_ARROW);
wClass.hbrBackground =(HBRUSH)(COLOR_WINDOW+3);
wClass.lpszMenuName =NULL;
wClass.lpszClassName =WINDOWNAME;
RegisterClass(&wClass);
// Create the window and store the handle;
hWnd = CreateWindow(WINDOWNAME, // class name;
WINDOWNAME, // window name;
WS_OVERLAPPEDWINDOW, // window style;
CW_USEDEFAULT, CW_USEDEFAULT, // starting position (x,y);
320, 240, // width and height;
NULL, // parent handle;
NULL, // menu handle;
hInstance, // instance handle;
NULL); // other parameters;
// Check if window creation failed; otherwise show and update;
if(hWnd==NULL) return FALSE;
else {
ShowWindow (hWnd, Cmd);
UpdateWindow(hWnd);
//HWND prevWind=SetCapture(hWnd);
//cerr<<"previous window is "<
|
|
|
|
|
Is hookproc valid ?
~RaGE();
|
|
|
|
|
i believe it is, but maybe not.... that's why I'm asking the question..
|
|
|
|
|
I'm using a DIB and StretchDIBits to print a bitmap to various printers. My problem is that, when I'm printing to a printer that supports only black & white only the very dark colours are visible in the printout. I'm not sure how to, first of all check for printer colour settings and secondly how to then set up the Pallette to support black & white settings. Is there anyone who can offer any advice. Even pointing me in the right direction will be much appreciated.
|
|
|
|
|
I'm trying to use ifstream under vc++ 6.0, it was not found.
I did #include<iostream> or #<iostream.h> and i looked at the iostream.h, nowhere was ifstream to be found. what's going on????
thanx
|
|
|
|
|
nevermind it's in fstream.h, my bad, I'm new to c++
|
|
|
|
|
Well, with such a nickname, we had expected a little bit more from you
~RaGE();
|
|
|
|
|
hehe the king of the world doesn't know c++, I doubt any king knew c++ :P
|
|
|
|
|
king_of_the_world ...
Hmm, that would be upper management. They usually don't know anything useful.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
Hmm, that would be upper management. They usually don't know anything useful.
I don't understand. You said "usually", have you found an exception to the rule? If so, rest assured that such an anomaly will not last for long!
|
|
|
|
|
i Creat an Object of CWnd (i name it cw) and Draw it in the main Window (this) and then i draw a bitmap in the cw.
my problem is when i draw a line in the main window that line affect cw and it's contents.
and then i have to cw->RedrawWindow(); to get the Real appearence back.
is there any way to Lock an Object of CWnd or do something to Stop this.
|
|
|
|
|
Try setting the style "Clip children" in the resource editor for yor main window (or if it is not a dialog, set the style WS_CLIPCHILDREN when creating the window).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi
I open a simple modal dialog box... (from a menu)
And I want to do this:
When the mouse cursor move above a simple component (CEdit, CCheckBox, CComboBox, etc.), I want to display some information about this component fonctionnality (CEdit, etc.) in CEdit with the read-only flag...
The WM_MOUSEMOVE message is sent to the dialog box. Here is the code I use:
void CControlDlg::OnMouseMove(UINT nFlags, CPoint point)
{
CWnd* ThisWnd = ChildWindowFromPoint(point);
int ThisID = ThisWnd->GetDlgCtrlID();
switch(ThisID) {
case IDC_TPG_V_H:
m_strInfoControl = "Test Pattern Generator for incremental test";
break;
default:
m_strInfoControl = "default";
}
UpdateData(FALSE);
CDialog::OnMouseMove(nFlags, point);
}
The m_strInfoControl is the information display into an Edit box read-only component...
The problem is that the dialog box loses the control of the mouse when the mouse cursor is above a component...
Thanks in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
You could compare the coords or the cursor (the point parameter of OnMouseMove ) with the CRect coords of the control with CRect::PtInRect ... ?
[EDIT] I might have not understand your question : Is it you can't recognize the control where the mouse cursor passes over, or is it you cannot do anything after you recognized it ?
~RaGE();
|
|
|
|
|
This is: I can't recognize the control where the mouse cursor passes over...
Because OnMouseMove is defined for the dialog and not for the component i want to recognize...
Hello World!!!
from Raphaël
|
|
|
|
|
You'll have to override the OnMouseMove for every control, or do almost like I said in the first post (that's bad cheating): Get the CRect from your control, add it 10 pixels or so on every side, so you'll egt a CRect 10 pixels greater than your control, and when the mouse enter this CRect, display your things, when it comes out, undo your display. Tricky, but it should do it. You may also take a look on OnSetCapture to redirect Mouse events.
~RaGE();
|
|
|
|
|
Rage wrote:
You'll have to override the OnMouseMove for every control
It is well what I thought...
Thanks...
Hello World!!!
from Raphaël
|
|
|
|
|
I have a DLL file, no .h file, no import library.
In DLL only one function is exported - I know its name.
I need to use this function, but I don't know the
parameters and their types and return value.
Is it possible at all to find this information?
How would do this, if you were in my position?
|
|
|
|