|
cagespear wrote: I want to know if its possible to make that property change through VC++ code ?
Yes, it's possible. Just use the registry functions.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I am looking for some examples or advice of really good data parsers. I am using a windows application and pulling data in via RS-232 ports. The data is typically one byte at a time and is complete data. It will have a header, a command, data, checksum, etc. I am looking for some smart parsers. I have some parsers that work, but I would like to make them more full proof.
Does anyone have any advice of ways to make sure it stays smart or places to find examples of parsers? For example, I had a parser that pulled two bytes of data in at a time. It worked well except for if the system was turned on at an odd byte. If the header was supposed to be in the higher byte, but was now in the lower byte, I had an issue. This problem has been fixed, but I want to see what other people have come across. Thanks for the help.
|
|
|
|
|
epsilonorion wrote: I am looking for some examples or advice of really good data parsers.
Short of writing something in an abstract way using, say, something like lexx/bison like the compiler-guys do (which is clearly overhead for your application), I can only imagine your way of distinct parsers.
Yes, working parsers are a valuable asset.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hi all,
I tried to configure my C++ so that i could use OpenCV but i found that there are no option for me to configure MFC library as a statically linked library.
By the way does anyone have any idea how i could install ImageMagicK or GraphicsMagicK(I have unzipped the necessary folder but stumped when it comes to installation because i do not understand the installation procedures provided in the web!!
With regards,
Jas
|
|
|
|
|
purplee85 wrote: found that there are no option for me to configure MFC library as a statically linked library.
The option "Use MFC in a Static Library" located in Project Properties => General => Use of MFC doesn't qualify? That is for VS2005, but the option exists somewhere in the "general" properties of all versions
Judy
|
|
|
|
|
Hello fellow developers,
I'm using the serial communication library described in the article:
Serial library for C++
The problem is that I have a customer where the serial port COM1 reports to be in use (ERROR_ACCESS_DENIED) when I try to open the port (CreateFile) after a computer restart. I have tried to find out which program that use the port by searching for \Device\Serial in Process Explorer and Handle by Sysinternals. But with no success. The handle seems to be in use but no process wants to admit it. The customer has to restart the system several times before the serial port can be accessed again. So I am wondering if there are additional methods to find who use a specific COM port or if anyone can shed more light on this problem of mine.
The COM port used is the one placed on the motherboard of a Intel D945GNT motherboard. The system has 2 addtional COM ports on a PCI-express card, these are used without any problem. The system has had a LAN to COM port driver, Lantronix, installed earlier. The system is running Windows XP SP2.
Best regards,
Erik
|
|
|
|
|
It may be that no userland processes are using COM1. Perhaps a hardware device such as touchscreen driver or Ethernet to COM have exclusive access to the port.
-David Delaune
|
|
|
|
|
I am adding new fields to the summary information for a file in this application I am working and I want to know if I can create a property identifier for the UserDefinedProperties? For example, already existing is
// Summary Information
PID_TITLE = 2;
//DocumentSummaryInformation
I was thinking I should add a field similar to PIDDSI_CATEGORY for UserDefined, which has a property identifier value of 0x00000002, but I do not know how?
|
|
|
|
|
You should review this[^] MSDN article, where it states :
The UserDefined property set can be used to hold any properties. Typically, it is used to store named properties created by a user.
|
|
|
|
|
Hi All,
I'm using Visual Studio 2003, and MFC/C++.
I want to simulate just the update/refresh portion of the maximize command, on an ie window. I've already managed to connect to the window and can send minimize and maximize commands to it, as well as move the window around the screen, even hide and show the window if I wish to. I just need to know what message or function I have to pass to that window to get it to do JUST the refresh portion of its maximize command.
Here's some background info and stuff I've already tried:
I have an internet page, that uses java applets served from a server I have no control over. The internet page loads, but none of the background graphics, or button graphics load, so you pretty much have to click on a blank screen and "guess" where the buttons are.
However, if you minimize the window, and maximize (tested over 100 times, by multiple people, under different conditions, with a 100% success ratio), it'll redraw the window properly.
I've tried simulating a very rapid alt+tab and it restored the buttons graphics but not the main graphic (not acceptable to my client). I've also tried the following commands:
::RedrawWindow(hWnd,0,0,RDW_INVALIDATE);
::RedrawWindow(hWnd,0,0,0);
::UpdateWindow(hWnd);
::SetFocus(hWnd);
Any help here would be greatly appreciated.
Thanks,
Brian
|
|
|
|
|
|
Hi
I used RichEdit ctrl with "RICHEDIT20W" for unicode support.
When FindText or FindTextW is called, its getting Failed.
Please could you tell the procedure for utilizing the FindText method
Regards,
nag.
|
|
|
|
|
nagamohan_p wrote: When FindText or FindTextW is called, its getting Failed.
So what does GetLastError() return?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Which either indicates that FindTextW() is not failing, or some other function is being called after FindTextW() but before GetLastError() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
FindTextW() returns -1...
AFter calling FindTextW(), immediately GetLastError() is called.
Initially I placed richedit ctrl in dialog...after that RICHEDIT is replaced with RICHEDIT20W in .rc file...
I have to diplay the text with different colors. When RICHEDIT20W is replaced with RICHEDIT, FindText() is not getting failed...
|
|
|
|
|
nagamohan_p wrote: FindTextW() returns -1...
AFter calling FindTextW(), immediately GetLastError() is called.
So you have something like:
long lResult = m_richedit.FindTextW(...);
if (lResult == -1)
DWORD dwError = GetLastError();
What happens if you use FindText() with RICHEDIT ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Here is code: <br />
m_listCtrl.SetListView(LVS_LIST);<br />
LV_COLUMN lsCol;<br />
LV_ITEM lsIte;<br />
lsCol.mask = LVCF_FMT|LVCF_WIDTH|LVC_TEXT|LVC_SUBITEM;<br />
lsCol.fmt = LVCFMT_LEFT;<br />
lsCol.cx = 20;<br />
<br />
char* arColumns[7] = {"Date","I","II","III","IV","V","VI"};<br />
<br />
for(int i=0; i<7; i++)<br />
{<br />
lcCol.iSubItem = i;<br />
lsCol.pszText = arColumns[i];<br />
m_listCtrl.InsertColumn(i, &lsCol);<br />
}
error C2065: 'LVCTEXT' : undeclared identifier
'LVC_SUBITEM' : undeclared identifier
lcCol' : undeclared identifier
left of '.iSubItem' must have class/struct/union type
Generating Code...
Error executing cl.exe.
WHAT IS WRONG?
Given this bug. I need to the a header file or what?
What is this?
|
|
|
|
|
Hakan Bulut wrote: lsCol.mask = LVCF_FMT|LVCF_WIDTH|LVC_TEXT|LVC_SUBITEM;
Should be:
lsCol.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
it must be overlooked... Thank you very much.
Volkan Cin
What is this?
|
|
|
|
|
I go to control panel and change the regional language & settings as germany
And i start my application it gets hanged.
Will there be any possiblity that language will cause this problem..
|
|
|
|
|
Of course.
It depends what you do... you need to debug it yourself
Greetings from Germany
|
|
|
|
|
|
Hi experts
I want to detect shutdown of the system through my application mine application is a property sheet.
Thanks in advance
RYK
|
|
|
|