|
myarray must be defined before it is used as a parameter to sizeof, so you can't use it inside a class definition. compiler needs to see the definiton of the array to know its size.
Define the function in cpp file, after the myarray definition:
void myclass::myfunction()<br />
{<br />
cout << sizeof (myarray); <br />
};
|
|
|
|
|
|
In the SDI creat with Internet Explorer Style and a use HtmlView rather than CView? So on the left side, I created Tree (TreeView)?
How do I get the HtmlView to change the website, when I click different node in the tree? in short, How can CHtmlView get the treeview has changed message??
HELP
If there are three people walking with me, one of them can be my teacher.
[Andy]
|
|
|
|
|
When the selection in a treectrl changes it sends a TVN_SELCHANGED message. When you implement a WM_NOTIFY handler for that message in your treeview's message map, you can react on that event appropriately. In your case this could be calling the Navigate2 functon of your htmlview, passing the desired page.
|
|
|
|
|
you can detect leftclick and see if a item was selected.
|
|
|
|
|
I think what you need is to register you application to the registry.
--> check the registry section.
check on how to write system tray - there are some good one in cp.
If there are three people walking with me, one of them can be my teacher.
[Andy]
|
|
|
|
|
1
You can write the info about you app onto HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Runtype regedit on the Runand check it out??
NAME -- wirte your applicatoin name
Type -- REG_SZ
Data -- write the full path of your program..
2
http://www.codeproject.com/system/
go down to Registry and find out how to write and read....
http://www.codeproject.com/dialog/
use Find [Ctrl + F] on page, search for 'System Tray' or just 'Tray' you will find serveral Application that use System tray..
Hope it helops. (slow response due to slow internet speed.....)
If there are three people walking with me, one of them can be my teacher.
[Andy]
|
|
|
|
|
http://www.codeproject.com/system/windows_startup.asp - exactly answer ur question 1..
If there are three people walking with me, one of them can be my teacher.
[Andy]
|
|
|
|
|
Hi,
I need to count the hops between the source and the target machine ( like what the tracerout does ), can anyone tell me how it can be done ?
Ciao
- Nilesh
|
|
|
|
|
http://www.codeguru.com/network/tracert.html
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi,
Does anyone knows how we can retrieve the list of recently accessed documents programmatically
ie enumerate a list containing the file names from Start>Documents
The values are normally stored in the registry in binary format. Any easy way that we can use the information there and present it in CString format?
Thanks in advance, I am very new to all of this.
Effiniti->
|
|
|
|
|
Which OS are u on?
on disk :
C:\Documents and Settings\Papa\RECENT on win2k
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks.
I think I have found the solution by getting the special folder using CSIDL_RECENT and then reading the contents from that directory.
This seems to work. Any known issues with it?
Also if I wish to read REG_BINARY data from the Recent Docs entry in registry, any idea how I can do that?
Yhanks.
Effiniti->
|
|
|
|
|
(Obscure question of the month)
What fonts are installed by default with Chinese Windows 2000/XP and other east Asian Windows? (And I do mean the Windows shipped to those countries, not an English Windows using the Chinese, Japanese or Korean fonts.)
|
|
|
|
|
Have a gander at the following lines of code:
ofstream intrx;
ofstream intry;
intrx.open("intrx.dat", ios::out);
intry.open("intry.dat", ios::out);
unsigned int l = 0;
for (l = 0; l < m_nNumLines; l++);
{
for (unsigned int k = 0; k < m_nNumVerticies; k++)
{
intrx << setw(12) << m_ppdIntersectionX[l][k];
intry << setw(12) << m_ppdIntersectionY[l][k];
}
intrx << endl;
intry << endl;
}
intrx.close();
intry.close();
Looks innocent enough, yes? It seems there is a *weird* bug occuring here, specifically with the initialization of the loop index, 'l'.
When I trace through the code, I notice that 'l' gets initialized to '37' despite the fact that it is explicitly initialized as '0'.
If I have a look at the following:
&l (gives 37)
&l - 1 (gives 0)
It seems that the value of 'l' is being misplaced
Any help would be appreciated, I can't seem to figure this one out. The project compiles absolutely clean as well...
|
|
|
|
|
Errrrrrr, nevermind. I seem to have located it.
for (l = 0; l < m_nNumLines; l++);<---
^
I *AM* tired.
|
|
|
|
|
Turn onncompiler warnings and VC will flag that semicolon for you
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Do you perhaps call OpenClipboard without closing it?
|
|
|
|
|
I have no operation about Clipboard. Just after create CRichEditview , Set it Text and formate the Text, the "Paste " operation invalidate.
|
|
|
|
|
There are some great articles on this site describing how to go about interfacing with a serial port.
However for a device that we are working on, we need to send 1 byte to the uart at a time (the uart on the recieving end) anytime we choose. not a string. Is this possible to do?
I'm not even closed to advanced in C++ as the majority of you guys are on this site. However if you could give me a push in the right direction or even a sight that gives me a ton of documentation on serial port interfacing and C++ function calls i can use, i'd be very greatful.
lead2gold
|
|
|
|
|
Thee have 3 following versions:
1. Write the driver (*.vxd - win98/95/Me; *.sys - W2k/WXP) and ALL problems will be resolved.
2. To use DOS, which one as against windows does not quench the direct reference(reversal) to ports.
3. HANDLE CreateFile(
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile // handle to template file
);
PS: There is still fourth version - when from a user's mode the functions Native API are invoked
|
|
|
|
|
Your advice is great, but i am totally oblivious to what i must know to write a driver.
I wouldn't even know where to start. If you could look at the reply i gave the other person who replied to my msg, you can see what i actually need to do.
But again thanks anyways! i appriciate you taking the time to reply. I wish i was more intelligent and could just go off and write a driver, but i can't.
lead2gold
|
|
|
|
|
1. The information and tools for writing the driver is in DDK. The book Walter Oney "Programming the MS WDM" will not hinder
also.
2. COM-port/RS232/RS232-C/UART - will be use as convertible terms.
3. What program you write (what device you have) ?
I not up to the end perceive it. And you see this most important in the solution of you problem.
If it is the simple test of device, it is easily to use MS DOS or other OS (even can approach Windows 95 (but is not higher)), which
one allow directly to work with ports.
If you write the severe program (system soft, for example), it is better to use OS QNX, which one is a real-time system !
4. If I correctly have understood, thee will use UART in a duplex operation (receive and transfer), and not just for transfer. Or you
use it in a half-duplex (step transfer then step receive then step transfer ... ) ?
5. As far as your problem was presented to me, normally to decide it using user mode (Win32 API) it is impossible. Because the
principle of operation UART is not concluded in signals on a line - all interface of activity and by her is constructed on processing of
one interrupt and on reading of the register of a condition with the purposes of finding - out of the cause of discontinuing.
PS: If you confidently know C ++ then to write the driver even for windows 2000 you can within a week, because today of driver
easily write on C++, while earlier predominantly on assembler
|
|
|
|
|
um... thanks i think
lead2gold
|
|
|
|
|
lead2gold wrote:
I'm not even closed to advanced in C++ as the majority of you guys are on this site.
Don't worry about that, there are lots of people here who are not 'Advanced' (including myself - far from it in fact), everyone starts somewhere!
lead2gold wrote:
we need to send 1 byte to the uart at a time
I have had to use the Serial port a couple of times and the following article has been very useful to me.
CSerialPort v1.03 - Serial Port Wrapper
By PJ Naughter
http://www.codeproject.com/system/cserialport.asp
The CSerialPort class includes these this function:
DWORD CSerialPort::Write(const void* lpBuf, DWORD dwCount)
It allows you to set the number of bytes you wish to write with dwCount, by seting it to 1 you can write a single byte. I needed to do just that in my application and it worked a treat.
Good luck!
Ali
|
|
|
|