|
Check CxImage library. Procedure "Filter" and others reads bitmap.
Vaclav
|
|
|
|
|
Hi,
Iam using dhtml control in my application. Iam having a problem in table selection. For Example: if i put 2 * 3 table and try to select from 2row and 2 column in upwards direction it is selecting 1 row ,3 column also. And merge cells is not activating if the selection is not exact....
Kindly help...
I downloaded the dhtml edit from msdn..
Thanx.
Raj
|
|
|
|
|
hi everyone,
I'm trying to use the activex control MS Flexgrid. However, if I try to add it to a dialog it tells me that it can't be instantiated because I don't have a run-time license. From what I was able to dig up searching the net about this problem was that I needed to manually give the control a license. This makes no sense to me as I don't understand why you'd need to do something like that if its already in visual c++. Now I don't know the first thing about ActiveX or COM so that might be why. Is there any way to use this control without knowing ActiveX? I just want to be able to have a nice database view such as in Access or if you chose a database view using the single doc architecture (i'm using dialog based). Right now I'm stuck using a listview which simply doesn't look as nice. I suppose I could try using a grid from one of the articles on this site, but it'd be easier to just use the ms flexgrid if possible.
Thanks,
Mike
|
|
|
|
|
hello,
I'm porting some old code from C to Windows code, I'm in a little trouble, suppose I've got a text file, I need to copy single line of text into a listview,
before I did something like
<br />
FILE *fMMC=fopen(filename,"r");<br />
.<br />
.<br />
.<br />
while(!feof(fMMC))<br />
{<br />
while (fgets(buffer,BUFFER_SIZE,fMMC))<br />
{ ....insert buffer into listview<br />
}<br />
}<br />
<br />
<br />
now porting to Windows code, I did someting as
HANDLE fMMC=CreateFiles(..all_the_parameters)...<br />
<br />
while(true)<br />
{<br />
DWORD br;<br />
ReadFile(fMMC, buffer, 255, &BR, NULL)) break;<br />
<br />
}<br />
my question is : in buffer, I can have multiple lines, since with fgets it takes a whole line and stop, with ReadFile I can have 2/3/4 lines depending of each lenght, how do I can retrieve from buffer only 1 line at time? is there a simple way? so that if buffer is composed of 3 lines, i get 3 item in listview
Thanks in advance
Paolo
p.s. if it's possible in some way to copy only a line as fgets does, it would be much more better, thanks again
|
|
|
|
|
You have to parse the text yourself.
If you feel the file will always be small, then i suggest you load it completely in 1 pass, then parse that memory chunk.
Otherwise, you need to parse a little differently and take care not only of \n but also of when you reached the end of the buffer and have to reload another segment.
Hope this gives you a hint.
|
|
|
|
|
Hi,
is there a way to monitor events and messages sent from/to for a particular application? If so, how?
Thanks!
|
|
|
|
|
i highly recommend (hope i'm not going to be bashed) that you look at http://www.sysinternals.com[^]
They have many usefull simple apps, and very often with source code.
P.S.: I am in no way affiliated to sysinternals, i just use their apps that i find very usefull.
|
|
|
|
|
darkbyte wrote:
hope i'm not going to be bashed
I certainly hope you wouldn't get bashed for recommending an excellent resource such as sysinternals.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Thanks!
|
|
|
|
|
I am able to get the Add-In displayed in the Add-In Manager Dialog Box but I can't get the icon to be displayed in a toolbar. Anybody know how to?
I am the handsome one in the crowd.
|
|
|
|
|
Should there be an icon? I recently installed XC# and there's no icon. Perhaps it depends on the Add-in?
Kevin
|
|
|
|
|
Is this your own code or some random add-in you loaded on the net ?
|
|
|
|
|
I have stored in a database a rescaling factor "0.5/pow(2, 14)".
My question is as its stored as a string how do I use it?
I did try in my project:-
#define scaleFactor1 (data_details[index].scaling)<br />
float rescaledData = currentField * scaleFactor1;
But this does not work; get error:-
c:\Export_Lib\Export_LibDlg.cpp(353): error C2297: '*' : illegal, right operand has type 'char [30]'
Also the macro would be redefined as the statements are in a loop.
Also I did try:-
float scaleFactor1 = signal_details[index].scaling;
But the same error, what I expected.
Are they any tricks that can be aplied to this string to make it usable in the code.
grahamfff
|
|
|
|
|
Grahamfff wrote:
My question is as its stored as a string how do I use it?
Convert it to a floating-point number using atof() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Did think of that but it gives 0.5 for the string "0.5/pow(2, 14)".
The pow(2, 14) is present for the resolution required.
Any other suggestions?
Graham.
grahamfff
|
|
|
|
|
Grahamfff wrote:
Did think of that but it gives 0.5 for the string "0.5/pow(2, 14)".
As it should, because the '/' character terminates the conversion.
Grahamfff wrote:
Any other suggestions?
For what? What exactly are you trying to do?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The database stores the scaling factor as a string, due to its resolution. I have arranged the scaling factor to be in a format suitable for processing by C++ code. Hence the pow(2, 14) , but apart from say arranging the output process to define something like the following:-
#define SCALING_1 0.5/pow(2,14) etc
The scaling factor is held in a array, but
#define SCALING_1 details[k].scaling // 0.5/pow(2,14)
does not work
grahamfff
|
|
|
|
|
Hello,
If your scaling factors are all in the same format, you should write a function that'll parse the string.
For exemple:
If the format would be < float ><opration>pow(< arg1 >< arg2 >) than you could write a function that will do the parsing for you.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I'm have a MFC project which includes a button. When pressed, i want the SaveFileDialog box to come up. I've been using the examples i've seen around online to get started but I still get errors. Here is the code I've been using:
void CProductVersionsDlg::OnButton2()
{
SaveFileDialog sdf = new SaveFileDialog();
sdf.AddExtension = true;
sdf.CheckPathExists = true;
sdf.InitialDirectory = @"C:\";
sdf.DefaultExt = "*.txt";
sdf.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
sdf.ShowDialog(this);
MessageBox.Show(sdf.FileName);
}
"Error:error C2065: 'SaveFileDialog' : undeclared identifier"
there are many more errors but this is the first one
I think I am missing a .h file to include.
What is the name of the file i need to include? I've been looking around online but i can't find any include files, or is it something else?
I'm running Microsoft Visual C++ 6.0 on a windows 2000 system.
|
|
|
|
|
well, SaveFileDialog is not an MFC class ...
maybe the example you looked at defined their own SaveFileDialog class to wrap the CFileDialog ( or GetSaveFileName API )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
jet915 wrote:
SaveFileDialog sdf = new SaveFileDialog();
just call the function (SaveFileDialog is not a class).
<font style="color:blue;">void</font> CProductVersionsDlg::OnButton2() {
SaveFileDialog sdf = SaveFileDialog();
sdf.AddExtension = <font style="color:blue;">true</font>;
sdf.CheckPathExists = <font style="color:blue;">true</font>;
sdf.InitialDirectory = @<font style="color:gray;">"C:\"</font>;
sdf.DefaultExt = <font style="color:gray;">"*.txt"</font>;
sdf.Filter = <font style="color:gray;">"Text files (*.txt)|*.txt|All files (*.*)|*.*"</font>;
sdf.ShowDialog(<font style="color:blue;">this</font>);
MessageBox.Show(sdf.FileName);
}
TOXCCT >>> GEII power
|
|
|
|
|
Hi
I am writing a program which Creates Three entries into the windows registry but on some systems instead of creating the registry it locks the registry HKEY_LOCAL_MACHINE\SOFTWARE part and shows error "Access is denied" and after that it does not allow to create a entry into the registry, it seems that registry got corrupted but windows still works fine. I don't know. Is it the problem of Rights to write into the registrry or something else.This program works fine on my machine but does not works on some machines. Please help...
BOOL CGenUniqueKeyXDlg::SaveValueToRegistry(char *pcszValue)
{
DWORD dwLen = 0;
int nReturnVal;
HKEY m_hContextKey;
DWORD dwDisp;
nReturnVal = RegCreateKeyEx(HKEY_LOCAL_MACHINE , //Handle to a currently open key
REG_LOC_PATH, // Sub Key Name
0, //Reserved
NULL,
0,
KEY_WRITE,
NULL,
&m_hContextKey,
&dwDisp );
if(nReturnVal != ERROR_SUCCESS)
{
ShowRegError(nReturnVal);
return FALSE;
}
nReturnVal = RegSetValueEx(m_hContextKey, UNIQUE_KEY, 0, REG_SZ, (PBYTE)pcszValue, (_tcslen(pcszValue) + 1) * sizeof(char));
if(nReturnVal != ERROR_SUCCESS)
{
ShowRegError(nReturnVal);
return FALSE;
}
strcpy(pcszValue,m_SyncURL);//"http://Nopd/CiteCapture/MDCSync.aspx";
nReturnVal = RegSetValueEx(m_hContextKey, URL_KEY, 0, REG_SZ, (PBYTE)pcszValue, (_tcslen(pcszValue) + 1) * sizeof(char));
strcpy(pcszValue,m_Port);
nReturnVal = RegSetValueEx(m_hContextKey, COM_PORT, 0, REG_SZ, (PBYTE)pcszValue, (_tcslen(pcszValue) + 1) * sizeof(char));
RegCloseKey( m_hContextKey );
return TRUE;
}
Any input will be appreciated
Thanks
Shailesh
|
|
|
|
|
aman2006 wrote:
...but on some systems instead of creating the registry it locks the registry HKEY_LOCAL_MACHINE\SOFTWARE part and shows error "Access is denied"...
Are you sure you have 'write' permission on those particular machines? Much like you can with folders and shares, the registry can be tuned to allow/disallow certain users/groups.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If i don't have write permission on that machine how can i write my entries in the Registry. In my code i am passing the Write Registry Permission as a parameter. Actuall i have made a installable with installed shield which runs my program at last for creating some entries. But it is corrupting the registry.... What about code is that fine or seems some problem?????
thnaks
Shailesh
|
|
|
|
|
One way to tell would be to use regedit.exe to try and write something to the same spot in the registry as the code is. Be sure and log in using the same credentials as the person running your code.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|