|
Luckely ...
No hurries, no worries.
|
|
|
|
|
it itches like crazy
Er zit een korstje op mijn aars.
|
|
|
|
|
You could ask this on the Lounge.
Regards,
Nish
|
|
|
|
|
Hi,
Is there a function that stops the window from displaying every time a CD is inserted that asks,
"Windows can perform the same action each time you insert a disc or connect a device with this kind of file".
Many thanks.
|
|
|
|
|
|
Thanks for the reply Mike, but I need to be able to do this from within my program, so any code in C++ would be appreciated. I am writing a CD/DVD Burning application and I don't want to have this auto play dialog popping up every time the user inserts a blank disc and closes the drive.
Many thanks.
|
|
|
|
|
|
This should be helpful for you!Here[^]
|
|
|
|
|
I hope this is an easy question.
I have created code which will print a bmp full page. Since I don't have a printer I am unable to correctly test this code.
One thing I have noticed, when the page is sent to the printer it is very large, more than 60mb. When I print a bmp from a paint application the size is a mere 600kb. I can't understand what I might have done wrong.
The images I am trying to print are mainly white space, though to display the image on screen and for printing I am creating a bmp initially flood filled with white. I then draw my text, charts etc on top of this.
What can I do to decrease this file size? Most of this printing would be sent across networks, so the file size would be a problem.
|
|
|
|
|
Is it possible to print a document without invoking the print dialog each time?
I have created a global PRINTDLG pointer .In my print function, I check the size member of this struct to determin if the dialog box needs to be used, if so it calls it accordingly and globally stores the values. This works ok for the first call to print, but later fails when I try to create a compatibleDC from the printDC.
|
|
|
|
|
Hope I understood your question
You need to print a bmp file maybe it is some helpful to you
...
...
HDC m_hdcPrinter=CreateCompatibleDC(CreateDC(m_pPrinter->pDriverName,
(LPCTSTR)lpdevmode->dmDeviceName,m_pPrinter->pPortName,lpdevmode));
...
...
SelectObject(m_hdcPrinter,hBitmap);
StartDoc (pd.hDC, &di);
StartPage (pd.hDC);
BitBlt(pd.hDC,150,300,2100,1575,m_hdcPrinter,0,0,SRCCOPY);
EndPage (pd.hDC);
EndDoc (pd.hDC);
|
|
|
|
|
Thanks for the reply.
Your above code is basicaly what I am doing now, with the exeption that i am using StretchDBits, and calculating the margins.
I was wondering why this could be causing files larger than 60mb to be sent to the printer.
|
|
|
|
|
After a little research I have seen the error of my ways.
The problam was, I was creating a bitmap to the size of the paper in pixels. Obviously the pixel count in a print DC is substantialy higher than the of the screen. In effect of was creating a bitmap some 3000x5000 pixels and sending that to the printer.
I have now changed it to create a bitmap of (842,595) which is what my paint program creates when selecting A4 size. This has reduced the file size to under 2mb with no apparent distortion. Since I am unable to test this on a real printer, I just hope it is correct.
|
|
|
|
|
Hi waldermort ,
for test your program you can use virtual printer
|
|
|
|
|
|
If the menu items do not have handlers ( ON_COMMAND ) they will be disabled by default.
If you want to have them enabled, either had handlers for the command or and update handlers ( ON_UPDATE_COMMAND_UI ) to enablet the menu item.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Hello,
try this to solve it:
<br />
m_cMenu.EnableMenuItem(IDC_FILE_SAVE, MF_ENABLED);<br />
m_cMenu.EnableMenuItem(IDC_FILE_SAVE_AS, MF_ENABLED);<br />
<br />
m_cMenu.EnableMenuItem(IDC_FILE_SAVE, MF_DISABLED | MF_GRAYED);<br />
m_cMenu.EnableMenuItem(IDC_FILE_SAVE_AS, MF_DISABLED | MF_GRAYED); <br />
i hope this can help you!
regards
break;
|
|
|
|
|
hi,
try to enable/disable them after you create them?! If create is successful try to enable/disable?!
I have them static in my dialog!
regards
break;
|
|
|
|
|
Inside your MDI MainFrame Constructor set this boolean variable to FALSE
m_bAutoMenuEnable = FALSE;
Nibu thomas
Software Developer
|
|
|
|
|
i have to create a list view where u can edit subitems.( non MFC one)
I refered the article by Mr.Zafir
http://www.codeguru.com/cpp/controls/listview/editingitemsandsubitem/article.php/c923/
i am unable to trace when the functions in the class(here: CInPlaceEdit) which is derived from the CEdit are invoked or called.
It has something like this... in the .h file
//{{AFX_MSG(CInPlaceEdit)
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnNcDestroy();
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
in the .cpp file
BEGIN_MESSAGE_MAP(CInPlaceEdit, CEdit)
//{{AFX_MSG_MAP(CInPlaceEdit)
ON_WM_KILLFOCUS()
ON_WM_NCDESTROY()
ON_WM_CHAR()
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
as this is not valid in a non MFC one .. i used something like this. in the .h file
BEGIN_MSG_MAP(CInPlaceEdit)
MESSAGE_HANDLER(WM_NCDESTROY, OnNcDestroy)
MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
MESSAGE_HANDLER(WM_CHAR, OnChar)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
END_MSG_MAP()
LRESULT OnNcDestroy(UINT nMsg, WPARAM wParam, LPARAM lparam, BOOL& bHandled);
LRESULT OnKillFocus(UINT nMsg, WPARAM wParam, LPARAM lparam, BOOL& bHandled);
LRESULT OnChar(UINT nMsg, WPARAM wParam, LPARAM lparam, BOOL& bHandled);
LRESULT OnCreate(UINT nMsg, WPARAM wParam, LPARAM lparam, BOOL& bHandled);
what i want to know is how to call these functions or how to invoke them or
when are they called(from where).
right now they are not been called?
i am just able to create the edit control at a particular sub item location...
Plz Plz help me ragarding this..
Thank in advance.
|
|
|
|
|
I think you are going bout this the wrong way. In non-MFC you don't need to create a seperate function for windows message, you simply need to handle them in the parent window of your control.
Normally you would use
switch (message) {
case WM_KILLFOCUS:
break;
case WM_CHAR:
break;
}
For list views you should consult MSDN for exactly what messages are sent and where to trap them (for list views usually they are in the form of a WM_NOTIFY). there are also some good articles on here about how to handle windows messages.
|
|
|
|
|
Hi friends,
i want to develop an application wherein i need to send ".txt"(size may vary aroung 1MB) files across the network(LAN) from one computer to another. So i want to know which will be the simplest and easiest way to do it? will it be sockets or TCP/IP or DCOM(i know this thing is very tough..).
since performance(speed) is not so important i'd like to know the simplest method to do this.
Thanks and regards,
Rajeev
|
|
|
|
|
Hello, i suggest you consider the TCP/IP sockets for your application. Good luck.
|
|
|
|
|
You could always do the copy yourself to a UNC sharename on the target computer.
onwards and upwards...
|
|
|
|
|
Iam using CDHTMLViewSpec class.
I have designed a page in html in which on left side some links are there say Link1, Link2 & so on.When user clicks a perticular link Iam showing the details about it in the table which is on right side of this page (help window)
In Help window there are two hyper link “Previous” and “next”.
I want to keep track of links which user visited last time and accordingly navigate to Previous or Next Link.
Can any one tell me how this could be done or please tell me any website where I can find help about this.
Thank you.
|
|
|
|