|
You didn't say which version of VC you have, but in v6 the AppWizard can make a splitter with a tree on the left for you.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
well..
i have vc++ 6.0
and when going thru wizard, i just know, it asks me, how do i want my application to look. mfc or explorer style. and if i do explorer style, how to change the main view then to richedit box?
thanks.
|
|
|
|
|
|
Hello.
Where is the option to view and debug source code directly in assembly mode via the Disassembly Window in Visual C++ .NET? Older versions including 6.0 has a menu item, View->Debug Windows->Disassembly.
Thanks,
Kuphryn
|
|
|
|
|
Whilst running in Debug mode, choose Debug->Windows-Disassembly, or alternatively press CTRL+ALT+D. The Disassembly mode is unavailable in Design (coding) mode. You must run the debugger in order to show/hide this window.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Okay. Thanks.
I still cannot view the assembly code in debug mode. The error is "(Disassembly cannot be displayed in run mode.)." The problem is you cannot "debug" a module without running it.
I need to be able to see the assembly code line by line.
Kuphryn
|
|
|
|
|
This is because you are "live" running the program in debug mode. In order to see the disassembly, you must set breakpoints into the code and fill the necessary requirements for the breakpoint to be reached (For example, if you set a breakpoint to a button click, you must manually click the button in order to reach the breakpoint).
If you want to step through the entire code in debug mode, you must first run the program, then choose Debug->Break All, and Debug->Restart. This will take you to the first line of assembly code in the program, and you can use F10 to step forwards through the code.
The reason why the assembly code is not shown while the program is 'live' is simple: the code would run before your eyes way too fast for you to follow it. That is why you must set breakpoints. When a break is reached, the cursor will stop on the line where the break is, and the disassembly window will show the assembly code lines residing in the vicinity of this code line, namely, the codes required to execute this procedure.
So, you can only see the assembly code line by line if you set a breakpoint and the code reaches this point. If you want to step through the entire program (which will take AGES), then use Debug->Start, Debug->Break All, Debug->Restart.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
hi,
i got the memory from heap using 'new' operator.when i delete it using 'delete' , it gives me error message _BLOCK_TYPE_IS_VALID(pHead->nBlockUse).what could be the reason of this problem.
thanks in advance.
kmirza
|
|
|
|
|
Are you sure that you are not deleting the same memory pointer twice???
or are you deleting the pointer in another thread and created it another thread?
or are you allocating the pointer in .exe file and deleting it in the dll ?
All the above cases can lead to problems.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Hi all,
When using the CreateThread within a class, is it possible to provide a method of the class as the lpStartAddress?
m_hBroadcastThread = CreateThread(0,0,<br />
(LPTHREAD_START_ROUTINE)BroadcastThread,<br />
0,0,&id);
... where BroadcastThread is the name of a method within the class. It's header is as follows:
DWORD CNotificationsHandler::BroadcastThread(LPDWORD param)
I keep getting the following compiler error:
error C2440: 'type cast' : cannot convert from '' to 'unsigned long (__stdcall *)(void *)'
Your help would be greatly appreciated.
Mark
|
|
|
|
|
If the thread method is in the class then it should be declared as static.
The member functions of the class has the calling convention as thiscall too, which need to be removed by making it static.
and while creating the thread pass 'this' pointer to the thread so that the thread function can access the member functions and variables of the class.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Worked wonderfuly.
Thanks
|
|
|
|
|
|
Also, if you are using the C Runtime Library AT ALL, you might want to be using beginthreadex instead of CreateThread. CreateThread does NOT initialize some thread local data used by each thread in the C run time library.
|
|
|
|
|
hi
i have a CRichEditCtrl in my app and it can't open UNICODE files properly (opens ANSI files ok). what do i have to do ?
here's part of my code:
CRichEditCtrl * richedit = (CRichEditCtrl *)GetDlgItem(IDC_RICHEDIT1);
CFile file(filename, CFile::modeRead);
EDITSTREAM es;
es.dwCookie = (DWORD) &file;
es.pfnCallback = MyStreamInCallback;
richedit->StreamIn(SF_TEXT, es);
richedit->SetReadOnly();
the callback is straight from msdn i think ..
static DWORD CALLBACK
MyStreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
{
CFile* pFile = (CFile*) dwCookie;
*pcb = pFile->Read(pbBuff, cb);
return 0;
}
|
|
|
|
|
If you know it's UNICODE for certain, and you also know it's a RichEdit v2.0 or later, then try
richedit->StreamIn( SF_TEXT|SF_UNICODE, es );
instead.
(This isn't in the on-line help for CRichEditCtrl, but it is for EM_STREAMIN in the platform SDK docs)
Steve S
|
|
|
|
|
thank you.
now i have to find a way to check if the text is unicode or not - istextunicode() doesnt seem to work correctly
|
|
|
|
|
First off, you can check for a BOM (byte order mark), and if there isn't one, scan for EOL ('\n') BYTE using memchr(). If you find one, and there are NUL ('\0') bytes either side of it, it's almost certainly UNICODE.
If your text contains only one line, this won't work, of course.
Steve S
|
|
|
|
|
thank you agan.
i decided not to detect if it is unicode programmatically, but still a have a small problem left - when i display unicode string there is some garbage at the beginning of the text (1-2 bytes, "FF FE" usually), any idea how to avoid it?
may be i should start reading the file with StreamIn from the first ASCII code ?
|
|
|
|
|
How can i save save a text string with formatting to a tga file using GDI??
Rashid
It is necessary once in one's life to put every thing in doubt, so far as possible, in order to reach the truth. DesCartes
|
|
|
|
|
You can't save a TGA file using GDI, if you can't use GDI+, you need to use another library like Paintlib.
To save the string, you need to draw it onto the bitmap.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I used a program that accesses the internet form a book called "Sams teach your self Visaul C++ 6
Online in Web time" ( isbn 067231668) The program is at page 496. I also used the sample program off the CD rom and get the same result. Every time I use the program I get "URL Does not use a Recognized protocol" Where do I go from here to solve this problem?
Thank you,
doug@evansville.net
|
|
|
|
|
Perhaps you're using a misspelled protocol, eg: htpt://foo.com ?
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
1.These two are supposed to take int args: Yet I see them being used a as isalpha('t') etc, i.e we are giving it a char arg. Why is that?
2.I did:
char r[256] ;
int t;
cout << " enter string ";
char c = cin.peek();
cin >> r;
while (c != '\n')
{
c = cin.peek();
if (isalpha(c))cin >> r;
}
cout << " tr" << r << endl;
}
but when I put in 'abc%def' i got back the identical thing, not 'abcdef' which is what I expected...
3.Also I wanted to weed out spl chars using isalnum so that an input like
abd$ef would get fed in and come out like abdef:
char s[256];
cin >>s;
but isalnum wont work either...
thanks,
ns
|
|
|
|