|
Dear Sir,
Yup! I know the structure, I tried to trick CLR with that (i.e. negative height), but It didn't work out.
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
This is correct! If it doesn't work there is something wrong with your used libraries.
|
|
|
|
|
What is correct? giving negative height? I did that and CLR returned an exception...
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
the post from 'normanS' was correct. It is possible to store images in a reverse line order. To indentify that the header contains a negative image size. If your library crashes there is something wrong in your libraries.
|
|
|
|
|
Thanks for the support.
Unfortunately, many libraries do not support negative heights. This monster called Windows is just to big for most companies to keep up. This includes some Microsoft SDK stuff.
|
|
|
|
|
I said it's not my libraries that crash, it's .NET that crashes (my library returns the values as expected)
- A programmer's national anthem; "AAAAAHHHHH!!!!"
|
|
|
|
|
Hi All,
Good Morning Everybody!!!
I have some doubt about CDocument class.
Everyone of us know that CDocument is a class inheited directly from CCmdTarget and CCmdTarget class inturn is responsible for handling all the message(windows messages/control messages/command messages). Whereas CView class is inherited from CWnd which in turn is inherited from CCmdtarget class. So ultimately CDocument class(which is directly have the capabilities of handling any type of messages right??. Then why does in DV architecture the CView class is handling all the messages??
Thanks
|
|
|
|
|
Subramaniam s.V. wrote: hen why does in DV architecture the CView class is handling all the messages??
Because Windows sends messages to windows. Documents are not windows.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Accepted Ryan.
But my doubt is why doesnt it have the capabilities to handle the messages evethough it is derived from CCmdTarget directly.
|
|
|
|
|
I think CDocument only inherite from CCmdTarget, but not inherite from CWnd.
I think it's MFC designer's intention. I think CDocument is a kind of data, so it only should not handle some user interface message. Are you agree with it?
|
|
|
|
|
It does. You can add menu/toolbar item message handlers to your document class. MFC has some internal magic that will route it to the document's handler if the view doesn't process the message.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Iuse Administrator to Logged on My widnow xp.
I enum the share printer connected in the network.
I use openprinters() to open the printer ,it success.
I get the printer handle.
then I use FindFirstPrinterChangeNotification() to Monitor the printer ,it fail ,the Error code is 5(ERROR_ACCESS_DENIED).
but if Use the domain user to logged on my window xp(just like: domain1\\user1),
all is good .
why?
what different between of administrator(local) and domain1\\user1(domain)?
how to fix it?
thanks!
my code like this:
hPrinterNotification = FindFirstPrinterChangeNotification(
ThreadParam.hPrinter,
PRINTER_CHANGE_DELETE_JOB,
0,
&NotificationOptions);
if (hPrinterNotification == INVALID_HANDLE_VALUE)
{
CString strE;
strE.Format ("FindFirstPrinterChangeNotification failed! Error code = %d",GetLastError());
return 0;
}
-- modified at 21:47 Monday 27th February, 2006
|
|
|
|
|
Your local administrator account does not necessarily have privileges on the network.
It is possible to enumerate network resources without having necessary permission to access or utilize those resources.
So, you can enumerate the printers, but when you try to open one, you fail from the local administrator account. Your domain account obviously has network printer privileges.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Blake Miller:
can you tell how to open one from the local administrator account?
thanks!
cococut
|
|
|
|
|
The same way you open the other ones, but you have to be granted access permission form the owner of the object, in this case the printer.
In other words, a network administrator needs to grant the MachineName\Administrator account privileges to modify the printer.
Also, you could try different access permission request, instead of ALL_ACCESS try something like 'read' access rights on the OpenPrinter command, that might work, since you are perhaps not trying to change anything.
Most people seem to go for ALL_ACCESS when they only want to query a device. Opening for read only access often works where 'all access' or 'write access' requests fail.
You could post the code for your OpenPrinter command and me or someone here could try to help you out.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Does anyone know why a c++ mfc exe would run without displaying it's form?
Unfortunately I don't have the source.
|
|
|
|
|
check in the property from Dialog that Visible is ture
|
|
|
|
|
i can't do that as i don't have the source code. I'm sure however that the visible property would be true as the app was built to display a form. It's some sort of environment issue i think.
|
|
|
|
|
So I think in the source code use ShowWindow(0)
|
|
|
|
|
i don't have the source code
|
|
|
|
|
It might be displaying the form off screen. You can use Spy++ to see the properties of the window the process creates and see whether it is visible, and what its position is.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
i didn't know about spy++, thanks for the info!
|
|
|
|
|
Please help.
Im populating the CCombox on OnInitDialog.
How to put color on each item text so when the user click the combobox, it will list the items in color (i.e. half of the list is red and half of the list is blue)
|
|
|
|
|
You have to set the Combobox style to CBS_OWNERDRAW. Then you must draw the Combobox items when the window passes the WM_DRAWITEM message.
|
|
|
|
|
Here[^] is a demo.
Nibu thomas
Software Developer
|
|
|
|