|
It is complicate. Is there an easier way?
Thanks,
|
|
|
|
|
OS Windows XP and Vista. I would like to work with virtual port USB of the printer through CreateFile, ReadFile, WriteFile (for data transfer in the printer to give the command on the print, to clear the printer buffer, to receive its status, to give Printer Page Description and Markup Languages commands, etc.). For me virtual printer port HP LaserJet 1020 in system is designated as USB001. I tried to use the port name in CreateFile (\. \\USB001), it has turned out nothing. Prompt how to work, please, with the virtual printer port. In the Internet has found nothing, only concerning virtual COM ports. Then it would be desirable to understand with virtual port of the scanner.
Alex Tumanov
|
|
|
|
|
tumanovalex wrote: For me virtual printer port HP LaserJet 1020 in system is designated as USB001. I tried to use the port name in CreateFile (\. \\USB001), it has turned out nothing.
No, you don't open a USB port directly. What you will need to do is get a handle to the driver for that device. So, you have to know the driver symbolic name and use this one instead.
But, what are you trying to achieve exactly ? Because if you need to print something, there's probably a much better way to do that than to access the printer driver directly...
|
|
|
|
|
And how it is possible to define symbolic link of necessary driver USB of the printer? And how it is possible to access the printer driver directly? Me these two ways interest.
Alex Tumanov
|
|
|
|
|
Hi,
How can i populate system font names in combobox...
|
|
|
|
|
|
if possible please let me know how can i use in MFC dialog based project ..as im anew bie..
|
|
|
|
|
MFC does not have any special functions for this purpose. You can use this, I suppose:
int CALLBACK EnumFontFamExProc(
ENUMLOGFONTEX *lpelfe,
NEWTEXTMETRICEX *lpntme,
DWORD FontType,
LPARAM lParam
)
{
OutputDebugString(lpelfe->elfFullName);
return true;
}
CTestDlg::OnOK()
{
LOGFONT logFont;
logFont.lfCharSet = 0;
_tcscpy(logFont.lfFaceName, _T("\0"));
logFont.lfPitchAndFamily = 0;
EnumFontFamiliesEx(*GetDC(), &logFont, (FONTENUMPROC)EnumFontFamExProc, 0, 0);
}
Watch your debugger output window to see the results printed into it from the callback function.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Oh great, now he's gonna ask how to take the output from the debugger window and add it to a combobox.
"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
|
|
|
|
|
Stop giving him hints, won't you?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I have a dialog based application. The dialog has a list control, few buttons, static text, edit box on it
I should be able to re size the dialog after the application is executing So when I re size the dialog, the controls in the dialog should also get re sized according to the size of the dialog, Can I know how to handle this.
Thanks..
|
|
|
|
|
See CResizableDialog[^].
Also, I don't think it is a good idea to resize each and every control. For instance, enlarging something like a checkbox along with the growing size of a dialog doesn't make sense. Things like static text and edit controls can be resized though... The article I pointed you to does pretty much does that and you might want to take a look at the code or use CResizableDialog directly in your project.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
V.K 2009 wrote: I should be able to re size the dialog after the application is executing So when I re size the dialog, the controls in the dialog should also get re sized according to the size of the dialog, Can I know how to handle this.
See the Extras section of this article.
"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
|
|
|
|
|
sir i am doing project on implantation of embedded matlab so i need co code of matlab function imrotate(image rotate function). if any one can help me plz help me
|
|
|
|
|
Please state cleary your requirements and tell us what have you done so far.
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]
|
|
|
|
|
hi i am doing project on implantation of embedded image processing opraters using matlab. so i am genration c code for two instruction of matlab function imread() and imrotate() for imread of bmp image i have maked my c code now need c code of matlab function imroate() so can burn on microcontrroler
|
|
|
|
|
Did you read the forum guidelines [^]?
You should be specific, for instance what kind of rotation do you need (arbitrary angle, simply 90 degrees steps,...)? What's your bitmap format? What code did you make?
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]
|
|
|
|
|
hi i am just doing processing on image like just reading image by imread() and after that rotating a image by imrotate() may be an angle thita in matlab so i need this c code of this matlab function which i can burn on micro controller
|
|
|
|
|
hi i am just doing processing on image like just reading image by imread() and after that rotating a image by imrotate() may be an arbitrary angle in matlab so i need this c code of this matlab function which i can burn on micro controller. and i have make c code for imread of bmp image this c code can read bmp image now need c code which can rotate this image
|
|
|
|
|
Will you PLEASE stop spamming the forum? There is no need to reply twice to every message.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Is your CPMRU working well? Mine seems broken. Moreover I cannot get a piece of useful info from his posts.
BTW: After 'data mining' we should introduce a new discipline: 'data guessing' (and I suppose we need more 'intelligence' for this 'business').
BTW2: my 'data guessing engine alpha' was suspiciously attracted by the OP name 'ashish'... (you know, it's alpha)
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]
modified on Thursday, June 25, 2009 7:52 AM
|
|
|
|
|
I read the thread start and I said to myself: "I must not reply on this one. It looks dangerously close to be a Liquid Nitrogen candidate".
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hence you need to a function to rotate an image by an arbitrary angle. This is the maximum info you provided so far. I can just give you this link [^]. Good luck.
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]
|
|
|
|
|
hi i am doing project on implementation of embedded image processing operaters using matlab. so i am generating c code for two instruction of matlab function imread() and imrotate(). for imread of bmp image i have make my c code now need c code of matlab function imroate() so can burn on microcontrroler
imread()for image read in matlab
imrotat() for image rotate in matlab
|
|
|
|
|
Hi Friends,
I need to show zoom combo box in print preview window like Microsoft power point print preview.
I removed zoom in and zoom out buttons.
I dervied my class i.e.
class CPrintPreviewView : public CPreviewView
{
void SetScaledSize(UINT nPage);
}
void CPrintPreviewView ::SetScaledSize(UINT nPage)
{
switch(m_nZoomState)
{
case ZOOM_25:
pRatio->cx = 25
pRatio->cy = 100;
break;
case ZOOM_400:
pRatio->cx = 400
pRatio>cy = 100;
break;
}
}
I inserted the zoom combobox and added zoom levels from
25% to 400%, as user selects value in cobmobox, I update zoom ratio and call DoZoom function.
But there is some calculation problem.... ??? I dont know what ??
But if i keep zoom in & zoom out buttons and click zoom out button once
and then use combo , there is no problem.
Everthing is fine.
Can you please provide me some code snippet.
Thanks,
Subhash Madhukar
|
|
|
|