|
Hi, I have no problems with the carriage and line feeds. I have garbage character in from of all the text strings. ie
Text1
Text2
|
|
|
|
|
This is the class info from Serialize. The Serialize method stores the object info in a binary format, not a text format.
If you want to "serialize" your stringarray as a text file, you need to do this manually.
onwards and upwards...
|
|
|
|
|
|
One solution is template function.
template <<typename t="">>
void mydesiredfunction(myclass<t> p);
Kuphryn
|
|
|
|
|
Hello. I am a student and I am trying to write a library program for my school.
I have a big problem .... I don't know anything about doing a search engine for it! Can someone give me a website address which can help me or can someone post a code here or just give me the address of a tutorial (I searched for one but couldnt find).
Thank you!
|
|
|
|
|
Well, if you are using ODBC to connect to a database, then SQL is what you'll use to communicate with the database. As far as doing pattern matching in SQL, take a look at the LIKE clause.
Example, if I wanted all records with a last name that started with A , I would write a SQL statement like such...
SELECT * FROM Users WHERE LastName LIKE 'A%'; For online info, here's a link...
http://www.codeproject.com/database/simple_odbc.asp[^]
Jeremy Falcon
|
|
|
|
|
|
how to read first 4 bytes of the file in hex??
I need some code to read the file header.
Actually, I have no idea how to read the file header.
Can someone help me please
thanks
|
|
|
|
|
CFile file(...);<br />
DWORD dwHeader;<br />
char sHeader[4];
file.Read(&dwHeader, sizeof(dwHeader));
or
file.Read(sHeader, sizeof(sHeader));
|
|
|
|
|
|
FILE *fp;
unsigned char fourbytes[4] = { 0, 0, 0, 0 };
fp = fopen("yourfilename.fileext", "rb");
fread(fourbytes, 1, 4, fp);
fclose(fp); For a BMP file, the first two bytes of 'fourbytes' would be 'B' and 'M'.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Using the same control as I mentioned previously...i've drawn the gridular type control using a for loop...starting from a start index and ending at the maximum number of items that can possibly be shown...this method works, but has caused a couple bugs here and there...
While writting that code it dawned on me that the control would probably work with one big scrollable DC...basically starting from the very beginning and painting right to the end...sure this is a little less efficient as a smart for loop which only paint items that are visible to users, but atleast you only have to paint once and scroll or resize as you feel fit. I guess the control would require redrawing when an item changed, but that could be optmized nicely...so it seems like it's the proper solution...if i'km thinking correctly...I wouldn't have to use double buffering techniques either cuz well i'd basically be doing that anyways...drawing to a bitmap and drawing the bitmap to the display...when everything is done...
ANyways...does this sound like a reasonable solution for a grid control that would never get that many rows or cols...???
How big can DC's grow...are the restricted to screen size or can they grow using a virtual space technique???
Again..thanks for the help
Cheers
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
Ugh. Pressed submit before I meant to...
Hockey wrote:
How big can DC's grow
DCs are always the size of the window. Scrolling is implemented by using SetViewportOrg() to set the coordinates of the origin of the viewport.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
This is the first of two questions I have...the other I will post as a seperate thread...
I have written a control which displays text at a 45 deg. angle and it appears really crappy, unless I make font larger than 20+ units CreateFont() param. This throws the control off a little, because all normal text that hasn't had it's orientation/escapement changed appears fine and smaller than it's rotated equivilent.
So my question is this...could I output the text as a non-rotated font...into say a temp bitmap...then rotate the bitmap and anti-alias the image once rotated??? And hope for better results...
I'm aware Windows supports anti-aliasing on fonts as an option...and I have that checked...however...it appears to only work when the font is a certain size...and currently 20 I much too large...
Just an Idea I have...i'd like to hear some opinions from the rest of you...perhaps you know of a better solution..???
Thanks u kindly
Cheers
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
When disabled, the text in the CComboBox is hard to read. Can I make a CComboxBox readonly or change its text color? I tried OnCtlColor(), it works when the ComboBox is not disabled.
Thank you
|
|
|
|
|
Ownerdraw would be one solution...
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
You would have to create the control as Owner Draw. Call the base to perform drawing if not disabled, else draw it yourself in the colors you want. For reference, you may want to look up GrayString and see how windows does it.
onwards and upwards...
|
|
|
|
|
I've read a lot of basics on C++, now I want to make something happen more than a hello world program. I was hoping to find a step-by-step tutorial that would walk me through a more advanced program (a game or something) that has some substance to it (while explaining in detail what is going on). Is there such a tutorial?
Thanks much, Dave
|
|
|
|
|
The Scribble example (search MSDN, or check your MFC folders) would be a good place to start. It's got a little of everything in it.
|
|
|
|
|
|
In a CListCtrl class, I need to implement functions for the ClistCtrl list to handle keyboard Up and Down arrows. If the user presses on the Up arrow key, the selection goes one row up; if the user presses the Down arrow key, selection goes one row down. Can this be implemented?
Eilzabeth
|
|
|
|
|
Yes, it does that by default. Once the control has focus, using the arrow keys will navigate the control accordingly.
|
|
|
|
|
You are right. But I want more than just this. I am sorry that I did not state that I want to refresh the child record screen when a parent record is selected from the list by the Up/Down arrow key. There is no OnSelectionChanged function for a list control. How do I notified when the Up/Down arrow key is pressed?
Eilzabeth
|
|
|
|
|
Elizabeth Chang wrote:
There is no OnSelectionChanged function for a list control.
Sure there is. Check out the LVN_ITEMCHANGED notification message.
|
|
|
|
|
Thank you. This works perfectly.
Eilzabeth
|
|
|
|