|
Well, i guess i found the reason, when i change windows i use:
pNewActiveView->Create(NULL, NULL, 0L, CFrameWnd::rectDefault, this, ViewID, &context);
pNewActiveView->OnInitialUpdate();
maybe its because of the CFrameWnd::rectDefault that it over rides that argument, what do you think? How can i change it to maximized, i look at its member function and variables but nothing seemed to fit with my intents!
Thanks
|
|
|
|
|
Well, it was not what i expected
I'll trying to find witch function i over ride, if there is someone who has a ideia i would appreciate very much an advise.
|
|
|
|
|
Hoorah, viva!!!
I found it!! I was making
m_pMainWnd->ShowWindow(TRUE);
instead of m_pMainWnd->ShowWindow(SW_SHOW);
in my C..app file
Thank you for your time
|
|
|
|
|
Is There any CListCtrl Class Support the Printing ..???
i wanna the Report view..Look like The Seagate Crystal Report.
Renjith-The CPian.
|
|
|
|
|
I don't think so, I think you need to draw the control into your CPrintDC.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Renjith, see this article.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
That was blasphemous
|
|
|
|
|
Does anyone know how to get the outline for a bitmap?
|
|
|
|
|
do you mean something more complicated than drawing a rectangle?
-c
Garbage collection, making life better - for weenies!
|
|
|
|
|
Hi again,
IE has a field of standard buttons. Is it possible to add a button to that field and attach some code to it to be invoked when the button is pushed?
Thx a lot,
/Tommy
|
|
|
|
|
Hi everybody,
I wish to perform some action on a piece of selected text, grabbed from within IE. So, when for example double clicking a word in explorer, the word gets selected. Immediately I would like my code to execute to perform some nifty action. Does anyone know how to accomplish this, any pointers?
Seems like a difficult task, but is it really?
/Tommy
|
|
|
|
|
hi .. i want to write a bitmap to a file , the code which ive written is
BOOL COpenbitmapDlg::WriteDIB(LPTSTR szFile, HANDLE hDIB)
{
//----------------------------------------
BITMAPFILEHEADER hdr ;
LPBITMAPINFOHEADER lpbi ;
if(!hDIB)
return FALSE ;
CFile file ;
if(!file.Open(szFile,CFile::modeWrite|CFile::modeCreate))
return FALSE ;
lpbi=(LPBITMAPINFOHEADER)hDIB;
int nColors = 1 << lpbi->biBitCount;
hdr.bfType = ((WORD) ('M' << 8) | 'B'); // is always "BM"
hdr.bfSize = GlobalSize (hDIB) + sizeof( hdr );
hdr.bfReserved1 = 0;
hdr.bfReserved2 = 0;
hdr.bfOffBits = (DWORD) (sizeof( hdr ) + lpbi->biSize +
nColors * sizeof(RGBQUAD));
file.Write( &hdr, sizeof(hdr) );
// Write the DIB header and the bits
file.Write( lpbi, GlobalSize(hDIB) );
//file.WriteHuge(lpbi,GlobalSize(hDIB)):
return TRUE;
}
and then i pass it a bitmap handle which i use to open simple bitmap files.
this code do create a file .. but when i try to check dat file i get an error message , secondly the file size is also very much less than the orignal file.
looking for ure hlp
looking forward from all the gurus of code
|
|
|
|
|
try:
BYTE* pDib = (BYTE*)GlobalLock(hDIB);
replace hDIB with pDib and call GlobalUnlock(pDib); at the end.
|
|
|
|
|
what the hell...u agian.since 1981 u r asking the same question.
|
|
|
|
|
My problem is that I can not compare the character 13 which is carriage return and the character 10 newLine. I attemp to do f.e
char buffer[10];
if ((buffer[ct]==\13)||(buffer[ct]==\10))
too I have attempt:
if ((buffer[ct]==0x0D)||(buffer[ct]==0x0A))
also
if ((buffer[ct]==char(13))||(buffer[ct]==char(10))
but any other way it works fine. I don´t know why it is the cause. The program entry not for this way.
thanks in advance.
|
|
|
|
|
|
To do character comparisons you would use:
'\r' , '\n' or '\016' (13) or '\013' (10) octal
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
If you use iostreams, then GetLine will work perfectly and you can even set the delimiter.
The std library CANES the MFC container and file classes.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Hi,
does somebody know in which cases ::SymGetModuleBase returns with NULL, unable to retrieve the module ?
Thanks
Oli
|
|
|
|
|
If the function succeeds, the return value is a nonzero virtual address. The value is the base address of the module containing the address specified by the dwAddr parameter.
If the function fails, the return value is zero. To retrieve extended error information, call GetLastError.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Hi John,
thanks for your answer. What I like to know is when does it fail ? I'm using the method in already running product code and I cannot introduce a call to GetLastError.
Regards
Oli
|
|
|
|
|
Are you saying you don't have the source to the code?
This is a symbolic debugger helper function. If you have MSDN, check it out. There is simply too much info there to post here.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I have to catch screen and print it into a previous selected printer. I do this two things but when i print the bitmap,using StretchBlt, i get a white and black image. I think that the problem is that the DC i get from de printer, hdc2Bmp = CreateCompatibleDC(hdcPrinter);, has one bit per pixel. Who i can i change this? To get de printer dc i do this:
if (!OpenPrinter((LPTSTR)m_szPrinterName,(LPHANDLE)&hPRN,NULL))
return FALSE;
dpBytesNeeded = DocumentProperties(NULL,hPRN,(LPSTR)m_szPrinterName,NULL,NULL,0);
if (!(lpDevMode = (LPDEVMODE)LocalAlloc(LPTR,dpBytesNeeded)))
return FALSE;
if (DocumentProperties(NULL,hPRN,(LPSTR)m_szPrinterName,(PDEVMODE)lpDevMode,NULL,DM_OUT_BUFFER) != IDOK)
return FALSE;
lpDevMode->dmOrientation = DMORIENT_LANDSCAPE;
lpDevMode->dmCopies = m_iNumCopies;
lpDevMode->dmFields = DM_ORIENTATION | DM_COPIES;
if (DocumentProperties(NULL,hPRN,(LPSTR)m_szPrinterName,(PDEVMODE)lpDevMode,(PDEVMODE)lpDevMode,DM_IN_BUFFER|DM_OUT_BUFFER) != IDOK)
return FALSE;
if (!(hdcPrinter = CreateDC(m_szPrinterDriver,m_szPrinterName,NULL,(CONST DEVMODE *)lpDevMode)))
return FALSE;
Thanks
Have a nice day
|
|
|
|
|
A DC is initially created to contain a "default" b/w bitmap. Creating something compatible with it (obviously) creates something b/w. Try selecting some color bitmap into the source DC first.
++luck;
|
|
|
|
|
hi, i using MS FlexiGrid on VC6. IS there anyway that i can clear cells that contains bitmap ? TQ
LONG LIVE C++! LONG LIVE CODING!
|
|
|
|