|
does anyone know how to modyfy the title bar? like one in yahoo messenger.
please note that i do not want self made title bars(using bitmaps).
|
|
|
|
|
storyera_storyera wrote: like one in yahoo messenger.
Which looks like what?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
a shiny background, sweet blue color, and yet same fuctionality as of the normal title bar.
|
|
|
|
|
have a look ( google ) at the WM_NCPAINT message, this handle the drawing in N on-C lient areas like the title bar.
|
|
|
|
|
Does anybody know about some lightweight free library for parsing numerical/financial data ? For example floars like 12,345.67 , amounts ( -$565.34) etc.
I would also need to parse date in various formats (02/04/06, Feb 32 2005, etc.)
Thank you!
rrrado
|
|
|
|
|
this is not a real huge task to do, and you'd better write yours to fits exactly your needs...
|
|
|
|
|
|
The Boost libraries, http://www.boost.org, are not lightweight but quit useful for text and string processing. You will have to read the Boost Software License to determine if it is free to your understanding of the word. In addtion to Regex, there is Spirit and Tokenizer.
-- modified at 11:37 Tuesday 7th November, 2006
|
|
|
|
|
Thank you guys, I'll check those libraries.
I've realised that also COleCurrency::Parse could do the trick, I have to examine it.
rrrado
|
|
|
|
|
rrrado wrote: ...parsing numerical/financial data ?
What exactly do you mean by "parsing data?"
rrrado wrote: I would also need to parse date in various formats (02/04/06, Feb 32 2005, etc.)
Use COleDateTime::ParseDateTime() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
converting string representation of data to integer/float
rrrado
|
|
|
|
|
rrrado wrote: converting string representation of data to integer/float
Is atoi() /atof() not allowable?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It cannot handle strings in format "1,234,567"
rrrado
|
|
|
|
|
CString str = "1,234,567";
str.Remove(',');
int num = atoi(str);
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
actually this does not check if the "," was used correctly but maybe I won't need this.
Thank you for the idea
rrrado
|
|
|
|
|
rrrado wrote: actually this does not check if the "," was used correctly...
Nor was it supposed to. It simply converts a string to a number, like you initially requested here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Folks!!,
I am a beginner in vc++, and would like to have an answer to a basic question.
i am trying to insert my souce code apparaently a simple .cpp file in to a backend of an application
the application uses kernels to perform various tasks , and my problem is how to insert my souce file in to one of these kernels.i have figured out where my code should be placed but do not know how to insert it?? or more precisely which options in vc++ 6.0 to use to create a .cpp file in the kernel.
any help in this egard will be very helpful.Hoping for a early reply.
regards
patthar
|
|
|
|
|
Actually, simply adding a cpp file to your project won't change anything. You need to 'call' code from it.
You need also to supply a header file associated with your cpp file. The header file will expose the function prototypes (if there are only functions) or the class declaration. Then, you need to modify the sources you have (that is the kernel) in order to call a function from your file (or create an instance of your class and use it).
|
|
|
|
|
Hi all
do you know some text tool that allow the user
formating of the code written in fashion like this
left aligned
virtual void SetValue (flt64 new_value);
virtual uint32 ExportValue (void);
virtual void DefaultValue (void);
virtual void ImportValue (uint32 rec_value);
or like this righ aligned
virtual void SetValue (flt64 new_value);
virtual uint32 ExportValue (void);
virtual void DefaultValue (void);
virtual void ImportValue (uint32 rec_value);
Thanks
M
|
|
|
|
|
I've never worked with USB devices. Since I've been working on software
that handle phone connected to USB I need all the help available.
Please direct me to a link or give me the name of class i can use that support
USB connection.
Thenk you,
|
|
|
|
|
It depends a lot of the type of device you are working with. If it is an USB-to-serial device, then you can simply open a virtual COM port and work as if it was a COM port.
If this is another type of device, then there is a driver supplied with it and you need to get a handle to this driver with CreateFile and then send I/O commands by using the DeviceIOControl function. The codes you need to supply to the functions are described in the documentation supplied with the driver (if any).
|
|
|
|
|
Hi Experts,
I am trying to Display a Bitmap Data that is stored in the array (Memory) on to the Display device. I tried to write the following code but could not succeed in displaying the image on the display device. Could anybod help me to fix this problem?
/*code*/
int DrawImage(HWND hwnd)
{
unsigned char *alligned= (unsigned char *)malloc(352 * 288 * 4);
if(alligned == NULL )
return -1;
/* Data to be displayed */
memset(alligned,0x77,1056);
/*Device Context */
HDC hdc = GetDC(hwnd);
if(hdc == NULL)
return -1;
/* Creating Memory Device Context */
HDC memDC = CreateCompatibleDC ( hdc );
if(memDC == NULL)
return -1;
/* Creating a Bitmap */
HBITMAP memBM = CreateCompatibleBitmap ( hdc, 352, 288 );
if(memBM == NULL)
return -1;
/*Setting the array of bits to Bitmap */
SetBitmapBits(memBM,1056,alligned);
/*Selecting the Bitmap Objects */
HBITMAP oldobj = (HBITMAP)SelectObject ( memDC, memBM );
if(oldobj == NULL)
return -1;
/*Try to Display */
BOOL test = BitBlt(hdc,0,0,352,288,memDC,0,0,SRCCOPY);
if(!test)
return -1;
return 0;
}
|
|
|
|
|
DAMN !!! how is it so difficult for people to post ones code samples inside a <pre></pre> block ???
|
|
|
|
|
Thanks for your suggestion. I am using this type of message board for the first time
|
|
|
|
|
You should give more details about what you see on the screen.
Only a few words.
Do not forget to clean up your temporary device contexts,
and/or bitmaps.
According to the code you have submitted you should get trash
on most of your window. 352*288*4 = 405504. So 1056 will not do.
Also 0x77, will give you some transparency.
As this is C++, you could try using MFC classes, or GDIPlus.
|
|
|
|