|
Hi , hwo can i get a drive size,
Please reply,
Thanks
|
|
|
|
|
|
Have I lost my mind or is there no profiler in the Visual Studio .NET IDE?
If it is there, where is it? If not, does anyone know of a good one?
Thanks!
Marcus Spitzmiller
"Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer
|
|
|
|
|
I think you have knocked at a wrong door.
You might find your solution in VS.Net IDE section.
|
|
|
|
|
duh - good point...Thanks
Marcus Spitzmiller
"Why must life be so hard? Why must I fail at every attempt at masonry?" - Homer
|
|
|
|
|
I've a CEdit class. When you press 'a' from the keyboard, it writes 'a' in the control which is obvious.
The problem is that I want to change this behaviour. when I press 'a' from the keyboard, some other character e.g. 'b' should be written. I have a 2D array that has mappings of all the keyboard keys. Actually I am dealing with Unicode (a multilingual application).
Suppose I want to replace 'a' character with unicode 23456, which message should I handle.
I have tried WM_KEYDOWN and WM_CHAR and changed the virtual key code. but it did not worked.
In short, please tell me any way in which I can display 'b' in the edit control when 'a' is pressed.
Saqib.
|
|
|
|
|
Try to override PreTranslateMessage
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Thanks alot for your help Greg. I got my problem solved. PreTranslateMessage function handed the whole MSG structure to me. I traped the WM_CHAR message and changed the wParam to 'b' when it was actually 'a'.
if (pMsg->wParam == 'a')
pMsg->wParam = 'b';
Codeproject is really amazing site. Thankyou once again.
Saqib.
|
|
|
|
|
You're welcome!
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I created a CStringArray to hold some text. Whenever I serialize the array, i noticed there are some garbage in the text file. How do I fix this. I want to write carriage returns and newlines. I'm using a CFile object.
Thanks
|
|
|
|
|
Whenever you want text to appear on new line in file, use "\r\n" in a char type array or CString.
e.g. CString m_strLines;
m_strLines = "Line1.\r\nLine2\r\n";
I am not clear about the garbage that appeared in the file. Does the garbage characters appear at the end of your data or your data is not saved at all?
|
|
|
|
|
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
|
|
|
|