|
What OS?
For NT, XP and 2000 it seems to want the PRINTER_DEFAULTS.DesiredAccess to be set to READ_CONTROL || PRINTER_ACCESS_USE
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
I'm using XP. I'll give this a try. Thanks.
|
|
|
|
|
the DesiredAccess flag made no difference. I still got an 1801 error back from 'GetLastError()' after OpenPrinter failed. This only happens with HP printers. All others seem to work fine.
|
|
|
|
|
How can I merge the string table of 2 resource file automatically. For example I have a main resource(main.rc)with default string table entries and a second resource(temp.rc)with extra string table entries. I added the #include "temp.rc" into the main.rc. but it doesn't add it. Any ideas?
Thanks
|
|
|
|
|
Open the two .rc file in one vc ide, select the strings that you want to append and then drag n drop in the target table.
this will do the trick.
hope it helps.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
Anthony9887 wrote:
I added the #include "temp.rc" into the main.rc. but it doesn't add it.
Do you get a compiler error? This is normally not an issue as there is already a #include for a .rc2 file that AppWizard creates for you. It shouldn't be any different than that.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
hai ,
How to get the user name of the currently logged on
users of all computers on the network and how to implement it in VC++ using MFC ?
Pls mail me if You have any ideas.
thanks.
jak
|
|
|
|
|
In win2k you have the environment varible username that containts the name of ther user that has logged in,
In dos if you type set and enter you will find lot of other information releted to user profile and other stuff.
Regards,.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
projectjak wrote:
How to get the user name of the currently logged on
Use NetWkstaUserGetInfo() . I would refrain from using environment variables for this as they can be set, unset, reset at any time.
projectjak wrote:
users of all computers on the network and how to implement it in VC++ using MFC ?
While it has nothing to do with MFC, I think NetUserEnum() is what you want.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi,
I'm having problems importing and using a WAV file within my MCF project.
IN VC++ 6, I went to the resource tab and imported the WAV file. I can actually see the declaration of the resource in the .rc file
But when I use FindResource(), this function does not find it so it returns NULL.
-- Here is the declaration in the .rc file:
IDR_WAVE1 WAVE DISCARDABLE "res\\ring1.wav"
-- Here is how I'm trying to find that resource:
HRSRC hResInfo;
HINSTANCE Nl=AfxGetInstanceHandle();
hResInfo = FindResource(Nl,"IDR_WAVE1","WAVE");
It seems that it finds the type "WAVE" but not the resource name "IDR_WAVE1" because the error returned by GetLastError() is the 1814 = No resource name found.
I appreciate any hint or suggestion. Thank you in advance.
R.B.
|
|
|
|
|
|
Hi all,
i was browsing through the windows DDK when i found a page about volatile and non-volatile cpu registers for the x86-64.
is there an equivalent for the x86?
greez,
Alexander M.
Don't try it, just do it!
|
|
|
|
|
Can you elaborate what are volatile registers???
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
e.g EAX is a volatile register, which ESI and EDI are non-volatile.
Don't try it, just do it!
|
|
|
|
|
humm, well if i apply the same analogy i would say that
in 8086 ax is volatile and si,di is non volatile....
frankly i am sorry i cant give good answer to this.
sorry.
Prakash.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
I'm trying to delete the contents of a file, but not the entire file. I want to keep the size of my log file down; and hence, remove older data from the file. I was thinking of reading the contents into a string class and then delete the file. Then, I would split the string (hence, removing older data) and writing the file again. This seems like a lot of trouble. Is there a better way to do this?
|
|
|
|
|
ttran7700 wrote:
I was thinking of reading the contents into a string class...
CStringArray could be used for this, unless the file was extremely large, then it might become inefficient.
If each entry in the log file were a constant length (e.g., 75 characters), then it would be very simple to keep the file limited to a constant number of lines.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
You should use _O_TRUNC in open file routine
|
|
|
|
|
there is an easier way to "clear" the file without deleting it.
use SetEndOfFile.
Don't try it, just do it!
|
|
|
|
|
Hello
I want to add in my ActiveX control property page with file
select dialog.Whether exist any standart control with same feature, then i can place it control in my property page.Or i must draw this dialog manually???
Thank.
|
|
|
|
|
Have you considered CFileDialog or GetOpenFileName() ?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Yes i thinked.
But i has ATL project with out MFC supporting.
And even i use MFC this way should be unused for mee i.e.i need what on my property page placed this dialog but not in new window.
|
|
|
|
|
Hi,
with some tool a user can create user-defined forms and fields in outlook.
I don´t know at the runtime what fields are in outlook !
Is there a way to send a kind of query to outlook which shows what fields are effective in outlook ?
I need this, becaus I have to save this values external in a database.
Pleas send help, thanks
|
|
|
|
|
|
I tried using a frameset on the CDHTMLDialog that comes with mfc 7.0.
I discovered that the HTML controls on the pages in the frames are not sending messages to the dialog.
For Example, for the following:
DHTML_EVENT_ONCLICK(_T("ButtonCancel"), OnButtonCancel)
The method 'OnButtonCancel' doesn't get called.
Pls help me out
What would life be without programmers and salesmen?
|
|
|
|