|
|
much obliged!
-Kevin
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
How about untabify???
I try the menu item, but it doesn't work...
It'd be nice to be able to untab...
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
Hockey wrote:
How about untabify???
Untabify changes all the tabs in the selection to spaces. You have to select text for it to do anything.
Ryan "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"
|
|
|
|
|
ahhhh...I always wondered what it was doing
Not what I expected it to do...so when I untab and nothing changed...I thought my VS was broken...
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
I try to find sources of any (even the simplest) source colorer add-in for Visual Studio 6.0. Have anybody got samples/links?
Thanks!
|
|
|
|
|
yuri_g wrote:
I try to find sources of any (even the simplest) source colorer add-in for Visual Studio 6.0. Have anybody got samples/links?
Thanks!
Although I don’t think this is exactly what you’re looking for, but VS does offer some basic syntax highlighting beyond the default. I ran across this file quite some time ago.
Create a file called UserType.DAT, place it in C:\Program Files\Microsoft Visual Studio\MSDev98\Bin\
Paste the following text into that file. The text with "%" in front is from the orginal file I found some where on the internet.
%%% steve's datatypes; can be merged with scott wingo's MFC set.
%%% cut and pasted from various win32 header files on a "demand" basis
BOOL
WORD
uint16
uint32
INT
UINT
BYTE
HWND
DWORD
UINT
LONG
VOID
FAR
CONST
PASCAL
CDECL
WINAPI
CALLBACK
WPARAM
LPARAM
LRESULT
PSTR
LPSTR
LPTSTR
LPCSTR
LPCTSTR
PBYTE
LPBYTE
PINT
LPINT
PWORD
LPWORD
PLONG
LPLONG
PDWORD
LPDWORD
LPVOID
LPCVOID
ULONG
USHORT
UCHAR
HANDLE
PHANDLE
SPHANDLE
LPHANDLE
HGLOBAL
HLOCAL
GLOBALHANDLE
LOCALHANDLE
ATOM
FARPROC
NEARPROC
HINSTANCE
HTASK
HGLOBAL
HMODULE
COLORREF
HPALETTE
HPEN
HRGN
HWINSTA
HMENU
HICON
HDESK
HENHMETAFILE
HDC
HCOLORSPACE
HBRUSH
HACCEL
HBITMAP
HCURSOR
HFILE
RECT
LPRECT
LPCRECT
POINT
LPPOINT
SIZE
LPSIZE
WCHAR
LONGLONG
LARGE_INTEGER
ULARGE_INTEGER
GUID
NULL
FALSE
TRUE
INVALID_HANDLE_VALUE
SECURITY_ATTRIBUTES
LPSECURITY_ATTRIBUTES
CRITICAL_SECTION
INVALID_HANDLE_VALUE
HRESULT
SCODE
WAIT_OBJECT_0
WAIT_ABANDONED
WAIT_FAILED
WAIT_TIMEOUT
OVERLAPPED
FILETIME
%%%Borland C++ and Visual C++ have long supported extensible keywords. Below is a data file which contains some of the commonly used Win32 datatypes. This makes is easier to recognise mistyped values without having to wait for the compiler to tell you off.
%%%Download the file and place it in the BIN directory of the IDE. Then restart MSDEV and enjoy more color coded text. Note that a lot of the Win32 data types are still missing -this set covers the ones we commonly use. But it's a start -on a big project adding in your own classes is the next big step.
%%%Scott "MFC FAQ" Wingo has a usertype.dat file which covers many C++ classes: if you merge that one with ours then you get the best of both worlds. However, this file seems to have dropped off the web site and isn't in the Program VC++ 5th edition CD either. Someone will have to do a new version of the file
Social Engineering Specialist.
Because there is no patch for human stupidity.
|
|
|
|
|
Hi all,
I've got a binary file which I need to read into my application, the file contains numeric data as well as strings (each one is seperated by a comma). The problem I've got is that the string data is of a variable length so I can't just grab 100 chracters.
As such I'm going through the file a character at a time, where I have string data I have a while loop which goes round until I find a comma, I then put the completed string into a member variable and then start on the next line. When I get to the numeric data instead of doing the above I just do:
ifs >> myDouble ; //ifs is ifstream
however this does not convert the data into numeric format as it always sets myDouble to 0, and when I then next go into a while loop to build up a string it never reads in a character and ends up as an infinite loop.
Does anyone know how I can solve this problem?
cheers,
Andy
|
|
|
|
|
I had this same problem about five years ago where the original application would read in a character at a time from a file. If the file was 1MB in size, that's theoretically around 1 million disk reads. The items in the file were formatted as a number followed by a number followed by a \0 terminated string. The files were huge so a day to process them was not uncommon. I cut the processing down to a matter of minutes by using CMemFile and more intelligently processing the buffer. I read the two numbers using two read statements, and then knowing that the \0 terminated string could be no longer than, say, 200 bytes, I read the next 201 bytes into a buffer. I then searched that buffer using CString::Find() for the terminating \0 character. The next read statement started from the next character following.
Knowing how slow that application could be, the first few times I tried my version, I was not convinced it worked. When I passed it around to a few others, they were amazed at how fast it was.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
cheers David, just thought I'd let you know that I've finally figured how to get the double values in:
fileA.get ( ( (char*)&myDouble), sizeof ( double ) ) ;
Andy,
|
|
|
|
|
I am developing a component that will be adding to an existing program. I need to add a certain file and/or folder to the program files if that file and/or folder does not already exists. But this is also dependent on which directory the program is installed on.
How can I:
1. Check the registry, or some other method, to find which drive the program is installed on.
2. Check to see if a certain folder, on that drive, exists.
#2 should be pretty simple, but I am unfamiliar with programming with the registry.
Thank you in advance!
|
|
|
|
|
ChemmieBro wrote:
1. Check the registry, or some other method, to find which drive the program is installed on.
Without knowing any more about the program or how many assumptions can be made, this would require a search of each potential disk in the system.
You can always search the registry in lieu of the disk(s) but there is no guarantee that it will be any faster. If you knew that the program was installed somewhere under the C:\Program Files folder, or in one particular hive of the registry, it would help.
ChemmieBro wrote:
2. Check to see if a certain folder, on that drive, exists.
I've always used _access(..., 0) for this.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Well, I know it will be under either C:\Program Files or D:\Program Files or any other drive.
This check will be done during initialization of my singleton COM object. I was thinking a registry check would be faster than checking the disk.
|
|
|
|
|
ChemmieBro wrote:
Well, I know it will be under either C:\Program Files or D:\Program Files or any other drive.
Try this for starters.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi all,
I am new to ole/com. I have dialog based application in which i have inserted shdocvw.dll activex component. I can load html,doc,and other documents. via
m_shBrowser.Navigate((LPCTSTR)m_sPathUrl , &vtEmpty, &vtEmpty, &vtEmpty, &vtEmpty);
It loads succesfully. ( if i open .doc file then winword.exe is loaded in task manager. ?)
Now I want to caputure LBUTTONDOWN,RBUTTONDOWN, MOUSEMOVE message....
I have tried with message map macros .... IT Works when there is no document loaded. But when i load/open any document then I am not able to get any of above message. i have tried with DefWindowProc() handler also but with no luck.
I have searched on net but havent found reason WHY?
and also not found how to do above.
Can anyone guide me how to capture above and such messages?
i dont want to display mouse when it is on the browser control.... and also not want to generate default menu.. instead display my menu....
can anyone point how can i implement?
do i have to create ole eventsink? if so then how?
Thank in advance.
Jetli
conclusion means Coming to wrong Decision with confidence
|
|
|
|
|
Hi, im quite new to Visual C++ (so please go easy on the mombo jumbo thanks).
What i am looking to do is make a "open" dialog. I can easly do it with
<br />
CFileDialog ldFile(TRUE);<br />
if (ldFile.DoModal() == IDOK)<br />
{<br />
}<br />
This brings up a normal open window. However im trying to get it to be a open directory window (like this on http://img121.exs.cx/img121/446/open8js.jpg[^])
Any ideas on how to do this?
Thanks
Cult
|
|
|
|
|
While it can be done with CFileDialog , I think you might want to look at SHBrowseForFolder() first.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
My application has several toolbars. The toolbars can be configured thru a command profile. One of them has 4 editboxes that recieve updates to display geographic coordinates. In some cases, I've noticed the updates in the editboxes of the toolbar start to 'bog down'. Can someone tell me specifically what I should be looking with respect to this problem (resource contention), such as WM_PAINT, WM..etc messages? Any help is greatly appreciated -
|
|
|
|
|
how to make a toolbar support 32 bit colour in VC++ 6.0?
|
|
|
|
|
how do i use unicode support in MFC to create menu in other international spoken language that has support only as uniocode characters.i am not an expert in VC++ so please have a beginners approach.i use VC++ 6.0 and winxp operating system
|
|
|
|
|
First you'll need to define UNICODE and _UNICODE. After that you'll need to use Unicode-aware functions, methods, and types (e.g., LPTSTR ) . CString is already Unicode-aware so nothing special needs to be done with it. For string literals, prepend them with an L.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
In addition you also have to set the entry point symbol to wWinMainCRTStartup . This can be done in the Project->Settings menu->Link tab->Output Category->Entry-point symbol.
Also IMO, one is better off using the TCHAR macros rather then hard coding the unicode functions and string literals.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
hi there, i am trying to obtain the 8-bit code for an image. I have found the edge map of an object so i now have black pixels showing the outline of the object on a white background.
I am wondering how I can extrct the bitmap code that contains the coordinates of the pixels that are black in the image.
I am using paintshop pro.
I am using a mathematical method known as the Hausdorff distance method to compare two images and recognise objects, in particular human faces.
If anyone is interested in my work I would be happy to post it on this site.
Hope someone can help me!
|
|
|
|
|
need to use the method Update() in order to modify fileds values.
In VB are not problem, but in VC++ how can I use it?
Can help me with any example?
Thanks a lot
Xavier
|
|
|
|