|
Use < and > instead of < and >. And post the serialization code from CYourDoc and CModel.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I am able to display a tooltip in a CScrollView initailly but when I scroll down or to the right, then the tooltips don't want to appear.
Anybody had this problem before?
Thank you
Franz Klein
|
|
|
|
|
Do you call OnPrepareDC before DPtoLP conversion during hit-testing?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
In my application i want to return a value into an edit box. i know that i have to change the value in a string type value.
So, as the value i want to return is a double i would like to use the function _ecvt.
But i have a pb with it, because if i want to return for example a number as 3.14, there is no pb, but if the value is 0.0314, the first 0 after "." is not taken.
In my code i do that:
int decimal,sign;
.
.
.
m_dlgPrice=0.0314;
strParam=_fcvt(m_dlgPrice,4,&decimal,&sign);
CString strInt=strParam.Left(decimal);
CString strDecimal =strParam.Mid(decimal); strParamFin.Format("%s.%s",strInt,strDecimal);
CEdit* Edit=(CEdit*)GetDlgItem(IDC_PRICE);
Edit->SetWindowText(strParamFin);
and in the edit box i could only see .314, so where is the pb?
thanks in advance for your help.
gerald
|
|
|
|
|
i actually don't know why you do it THIS way.. i would rather use
strParamFin.Format ("%f", m_dlgPrice);
this works great for me..if the output isn't what you're looking for (use other style specifications like %g )
hope this helps
bernahrd
"Politicians and diapers have one thing in common. They should both be changed regularly and for the same reason."
|
|
|
|
|
you were right, thanks for your help
gerald
|
|
|
|
|
... i have got a directory with many subdirs.. in most of them there is a foo.cfg file.. i would like to open now all these files..
is there any chance for me and not iterating through all the dir's with find_file???
thanks in advance
bernhard
"Politicians and diapers have one thing in common. They should both be changed regularly and for the same reason."
|
|
|
|
|
You have the attribute that inform you if the file is a directory. I don't know if you are working with MFC, but when you find a directory and if it is not dot, you need to use the find file into the directory, each time that you find a directory you need to find into it...
Good luck...;)
Carlos Antollini.
|
|
|
|
|
write a recursive function using CFindFile
FindFile(String strDirectory)
{
OPEN FILE_FIND(strDirectory)
FOR EACH file IN FILE_FIND
IF IS_DIRECTORY(file) THEN
FindFile(file)
ELSE
// do something else
END IF
NEXT file
CLOSE FILE_FIND
}
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
thanks for the prompt answer...
bernhard
"Politicians and diapers have one thing in common. They should both be changed regularly and for the same reason."
|
|
|
|
|
Can anybody help me?
I want to set 2 different text colors in one item.
Is this possible and how can i do that?
|
|
|
|
|
You'll need to draw the item yourself, changing the text color with SetTextColor() before you draw the word you want colored differently.
--Mike--
http://home.inreach.com/mdunn/
"....." -- Silent Bob
your with and
|
|
|
|
|
Please, show me mistakes.
This code save array of pixels into txt file as RGB (0...255) for every pixel.
Code perfect works for 24 and 32 bitmaps, but it doesn't work for 8 & 16 bitmaps.
No, it works for 8,16, but save wrong array of pixel
What's the problem, i cann't find
If you know, please, help me
void CMainWnd::SaveAsArray(LPCTSTR filename)
{
int BytesPerPixel = (lpBitmap->biSizeImage)
/(lpBitmap->biHeight * lpBitmap->biWidth);
int WidthBytes = lpBitmap->biWidth * BytesPerPixel;
int size = sizeof(BITMAPINFOHEADER)
+ sizeof(RGBQUAD) * lpBitmap->biClrUsed;
BYTE *Bits = (LPBYTE)lpBitmap
+ size;
BYTE * ScanLine;
BYTE * Data;
BYTE Red, Green, Blue;
CStdioFile skadr;
CString string;
skadr.Open(filename, CFile::modeCreate|CFile::modeWrite);
for( int y = lpBitmap->biHeight; y>0; --y )
{
ScanLine = Bits + (WidthBytes * (y - 1));
Data = ScanLine;
for( int x = 0; x<lpbitmap->biWidth - 1; ++x )
{
LPRGBQUAD Quad = (LPRGBQUAD) Data;
Blue = Quad->rgbBlue;
Green = Quad->rgbGreen;
Red = Quad->rgbRed;
BYTE color = (Red
+ Green
+ Blue)/3;
string.Format("\t %d", color);
skadr.WriteString(string);
Data += BytesPerPixel;
}
string.Format("\n" );
skadr.WriteString(string);
}
skadr.Close();
}
|
|
|
|
|
16 bit bitmaps do not use a BYTE for each colour, they use 5 bits per colour and one spare. 8 bit bitmaps use a palette and one byte to store each colour, which is a lookup value into the palette.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
What can you advise?
What i need to change in my code to work with 8 and 16 bitmaps.
I don't know how to work with 8 and 16 bitmaps.
Thanks for your help!
Sergei
|
|
|
|
|
Does the structure, for example 8 bpp bitmap, goes thus:
Red;
data+=byte;
Green;
data+=byte;
Dark blue;
data+=byte;
// Miss of reserve
data+=byte;
If so, whence to take colours?
Willn't structure RGBQUAD help any more?
I.e. what analog will be to string:
Red = Quad->rgbRed?
There can be I are mistaken?
In what my error?
|
|
|
|
|
My app creates a modless dialog and enters the message loop etc. Why when I do a 'Minimize All Windows' on the Taskbar, does my application not minimize ...?
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
The Window needs the the style 'overlapped' doh!.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
well i just went through some of the codes available for graphical displays , however didnt find ne in which we can simply draw graph using the mouse .... and the then can easily get the respactive co-ordinates ....
need guidance on how to achieve this ... maybe some reference or sth ,....
Thanks in advance ...
|
|
|
|
|
You want the mouse to actually plot the graph ? If so, look at my Doodle example for using the mouse to draw, it's easily converted to GDI if you don't need GDI+. To get the co-ordinates, I'd look at the filled shape code in that sample, it shows how you can build a path from the movement of the mouse, which I would think is the easiest way to get co-ordinates out at the end.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hello folks,
I'm currently working on my own Unhandled Exception Handler in order to provide me more information regarding the crash occurred and make a 'grateful' crash .
When checking the DGBHELP-library (MSDN) it also provides " User-mode Minidump Files" (crash dumps), that can be loaded within a debugger (like WinDBG).
Now my questions:
1. Very little info is provided in MSDN about these MiniDumps: what exactly do they dump and how to use it (is it usefull)?
2. MSDN states: "You can use this function on versions of Windows prior to Whistler without redistributing DbgHelp.dll. To do so, link with the static library MiniDump.lib, which is included in the Platform SDK."
No way I can find the Minidump.lib in the latest SDK, or more information about this. What about this library?
Any info about this MiniDump is highly appreciated!
Thanks,
EiSl
|
|
|
|
|
Which files of the ATL DLL project I need to provide for Delphi except MyAtl.DLL ???
Because in client program in VC++ I need also :MyATL.h and MyATL_i.c.
What in another languages ?
|
|
|
|
|
Delphi should just need the .DLL and .TLB files. Visual Basic is the same. As long as the DLL is registered on the system, you should be able to see your component in the Visual Basic References dialog.
Michael
|
|
|
|
|
|
I am trying to stream some text into and then out of a text string using STL. The following lines of code indicate how this is being done at the moment:
struct MyStruct {
string el1;
string el2;
};
string text;
char tab = 0x9;
MyStruct myStruct;
myStruct.el1 = "Some text";
myStruct.el2 = "Some more text";
ostringstream output (text);
output << myStruct.el1 << tab << myStruct.el2;
text = output.str ();
istringstream input (text);
input >> myStruct.el1 >> myStruct.el2;
I have two questions. Firstly, am I doing the output part correctly? It seems bizarre that I should create an output string stream passing it a string and then have to assign the stream contents to the string
Secondly, how do I get the input part to read in the text ignoring whitespace until it finds the tab delimiter?
Derek Lakin.
Salamander Software Ltd.
|
|
|
|