|
Hello
I am developing virtual printer driver.The virtual printer have EMF spool file format.
I use windows default printer driver and forward print job at real printer.
I want to change in header and footer of .SPL(emf spool) file.Means i want put some default name in header and footer.
Is it possible to change via emf spool ?
or
Any other solution?
Thanks
Mahendra
|
|
|
|
|
hi every body.....
i have a small problem about the tiff virtual printer.
is it possible to access the virtual printers in vc++6.0.
i am searching on net finding only the possible vb6.0 and .net.
so please help me.
it's very useful to my application.
thanks in advance............
|
|
|
|
|
I suppose they you can handle them the same way you do with real devices.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello
Everybody ,as always i give thansk to all of you to resolve my last problems.This time my stuck with following problem.
I have to built a mfc aplication in Visual 6 c++ in which i have a combobox,to whom i have to load elements from a .ini o txt files ,like if user want to add more elements in the combobox by just adding elements from ini o txt the corresponding files.
i was thinking to user getprivateprofilestring() but it is very limited ,then i have to use many of these funcions in my application .
Please tell me how should i built this application
Thanks in advance
|
|
|
|
|
write a class to wrap some of the function. And by doing this rethink the design of your code.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
But i should be need something flexible , i am thinking about the template of Array ,something like
that ,but i dont have any idea to use template and how to load them .
Do u have any idea
|
|
|
|
|
Do you know about different sections in an ini file?
You should have described your problem with some code.
I am still convinced that you have a desing issue proble
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hereby i give you a sample of my ini.file ,it has section and sub-sections.
In my application i have three comboboxes.Every section will have his respective combobox.
please give a some idea or source code to deal this type of problems
[T_RUTA_ALT]
[T_FREC]
ID= 1,
DES= 100.001,
ID= 2,
DES= 100.002,
[T_EMPL]
ID= 1,
NAME= JOHN,
ID= 2,
NAME = SILI,
|
|
|
|
|
[T_RUTA_ALT]
[T_FREC]
DES1= 100.001,
DES2= 100.002,
[T_EMPL]
NAME1= JOHN,
NAME2 = SILI,
for(...)
{
sprintf( s, "DES%1", i );
...
}
i guessed it
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
but i am making diference between them by used ID 1,2 ,WHICH WILL DIFERENTE FOR ALL USERS..I will so greatful you u send some code for loading these sections from the file.
|
|
|
|
|
While you can use GetPrivateProfileString() to read INI files, it won't do much good when a given section has non-unique keys. Consider the following:
char szBuffer[64];
GetPrivateProfileString("T_FREC", "ID", "", szBuffer, sizeof(szBuffer), "myfile.ini"); Would you expect this to read the "ID" key whose value was 1 or 2?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Sorry for a late response
If i user the GetPrivateProfileString() ,but it doesnot give a flexibility ,as you say ,just i need that user can add ID1 ,ID2.... .what should i do for flexiblilty
Take care
Bye
|
|
|
|
|
johnjitu wrote: what should i do for flexiblilty
First answer the question here. Until we (and you) know what you are doing, all else is meaningless.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
johnjitu wrote: getprivateprofilestring() but it is very limited
Why?
Have you considered XML ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
No in XML ,because in my job ,we have only visual 6 c++.
|
|
|
|
|
Nothing prevents you from using XML with Visual Studio 6 . For instance you may use MSXML library.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hereby i give you a sample of my ini.file ,it has section and sub-sections.
In my application i have three comboboxes.Every section will have his respective combobox.
please give a some idea or source code to deal this type of problems
[T_RUTA_ALT]
[T_FREC]
ID= 1,
DES= 100.001,
ID= 2,
DES= 100.002,
[T_EMPL]
ID= 1,
NAME= JOHN,
ID= 2,
NAME = SILI,
please tell me or give me example of source code to upload this files and use it ,may it will be easy for u but i dont have any idea .please help me
|
|
|
|
|
This is not a valid ini file. You can't have multiple keys with the same name inside a same section. You are trying to use the wrong tool for the job. As suggested before, you should use something like XML. Here[^] is a simple and lightweight XML library that you could use.
|
|
|
|
|
As Cédric said, you should use unique keys. A workaround may be appending the item number to the name, for instance:
[T_FREC]
ID0= 1
DES0= 100.001
ID1= 2
DES1= 100.002
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Where does this file come from?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
CPallini wrote: Have you considered XML?
I took it that he was reading from the INI file, not writing to it.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Someone already mentioned that you may need to rethink your design. It would appear that you are using the .ini file as a simple database, and this is not its purpose. You would be better to use a simple text file or XML to store these records.
|
|
|
|
|
johnjitu wrote: ...i have to load elements from a .ini o txt files...
Is this something new?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have made a Word Add-in. I use the clipboard to put an icon in my Add-in button. The code is:
HBITMAP hFace =(HBITMAP)::LoadImage(g_hInst,
MAKEINTRESOURCE(IDB_OPEN_PDF),IMAGE_BITMAP,0,0,LR_LOADMAP3DCOLORS);
// put bitmap into Clipboard
::OpenClipboard(NULL);
::EmptyClipboard();
::SetClipboardData(CF_BITMAP, (HANDLE)hFace);
::CloseClipboard();
::DeleteObject(hFace);
// set style before setting bitmap
spButton->PutStyle(Office2000::msoButtonIconAndCaption);
spButton->PasteFace();
return S_OK;
OpenClipboard opens the clipboard successfully as it returns 1 every time. The problem is that EmptyClipboard returns 0 every time. It seems that there is a problem with the clipboard. EmptyClipboard gives an error 1418 - Thread does not have a clipboard open. That is strange because I've just opened the clipboard successfully.
Has anyone run into such problem?
|
|
|
|
|
From MSDN [^]:
If an application calls OpenClipboard with hwnd set to NULL, EmptyClipboard sets the clipboard owner to NULL; this causes SetClipboardData to fail.
Are you sure is what you want?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|