|
Some icons contain two files:
1 file 16x16 icon ( thats for winExplorer )
2 file 32x32 icon ( for desktop and thumbanail view )
If you define icon with only one file, the other will be replaced with built-in icon. So just create two file icon.
CRPG, FRPG, Oblivion Fan
Hater of Counter Strike ( i hate it soo much damn it );
|
|
|
|
|
I need to get input boxes on html web form, I using IHTMLDocument2
<br />
m_pHtmlDoc->get_body(&m_pBody);<br />
CComPtr<IHTMLElementCollection> pForms;<br />
m_pHtmlDoc->get_forms(&pForms);<br />
long lFormLenght = 0;<br />
pForms->get_length(&lFormLenght);<br />
IDispatch *pDispatch = NULL;<br />
for (int i =0 ; i < lFormLenght; i ++ )<br />
{<br />
VARIANT variant;<br />
variant.lVal = i;<br />
variant.vt = VT_I4;<br />
pForms->item(variant, variant, &pDispatch);<br />
CComPtr<IHTMLFormElement> pForm;<br />
<br />
pDispatch->QueryInterface(IID_IHTMLFormElement,(void**)&pForm);<br />
BSTR bstrTemp;<br />
long lLen = 0;<br />
pForm->get_length(&lLen);<br />
CComPtr<IHTMLElement> pElement;<br />
for (int j = 0; j < lLen; j++ )<br />
{<br />
IDispatch *pDispInput = NULL;<br />
VARIANT varInput = {0};<br />
V_I4(&varInput) = j;<br />
<br />
HRESULT hr = pForm->item(varInput, varInput, &pDispInput);<br />
CComPtr<IHTMLInputElement> pInput;<br />
hr = pDispInput->QueryInterface(IID_IHTMLInputElement, (void**)&pInput);<br />
pInput->get_name(&bstrTemp);<br />
pInput->get_value(&bstrTemp);<br />
BSTR bstrNewValue = L"Hello word";<br />
pInput->put_value(bstrNewValue);<br />
pDispInput->Release();<br />
}<br />
}<br />
in string
<br />
hr = pDispInput->QueryInterface(IID_IHTMLInputElement, (void**)&pInput);<br />
in pInput I get only first input box, but on my form two input boxes.
Why I can't get second input box?
|
|
|
|
|
Im using boZoi library to implement Elliptic curve cryptography to my VC project.The functions output r in the format of hexadecimal and OCTETSTR(octant string) now if i want to show the output in the edit box control of a dialog box...???.
ECDSA sig;
HexEncoder hex(sig);
CEdit* poEdit = static_cast<cedit*>(GetDlgItem(IDC_EDIT3));
poEdit->SetWindowText(hex);
HexEncoder is a class which converts to hexadecimal format & i want to convert it converted to CString or LPCTSTR...How i do that?
borZoi can be found at:
http://dragongate-technologies.com/products.html[^]
|
|
|
|
|
|
Yup it worked fine...thanx.But that converts Octant string to Hex String....here i want to convert Hexadecimal to char* or CString to show in edit box....I dont know if the same method can be applied here?
|
|
|
|
|
OK as u suggested i used ostringstream to store hex vaue as a string and then convert it into a CString form to show in the edit control of dialog box.It gives no error but at the time of execution of this code "illegal operation error" message box is displayed.Where Im doing wrong?
std::string s("");
ECDSA sig1(sk, OS2IP(hash)); // generate the signature
DER der_str (sig1); //DER class function
HexEncoder hex_str(der_str); //Hexencoder class function
std::ostringstream str;
str<<hex_str; storing="" hex="" value="" as="" a="" string
s="str.str();
CString" cs="s.c_str();
CEdit*" poedit="static_cast<CEdit*">(GetDlgItem(IDC_EDIT3));
poEdit->SetWindowText(cs);
|
|
|
|
|
OK as u suggested i used ostringstream to store hex vaue as a string and then convert it into a CString form to show in the edit control of dialog box.It gives no error but at the time of execution of this code "illegal operation error" message box is displayed.Where Im doing wrong?
std::string s("");
ECDSA sig1(sk, OS2IP(hash)); // generate the signature
DER der_str (sig1); //DER class function
HexEncoder hex_str(der_str); //Hexencoder class function
std::ostringstream str;
str<<hex_str; storing="" hex="" value="" as="" a="" string
s="str.str();
CString" cs="s.c_str();
CEdit*" poedit="static_cast(GetDlgItem(IDC_EDIT3));
poEdit-">SetWindowText(cs);
Hope ull reply soon.
|
|
|
|
|
titi@yahoo.com wrote:
It gives no error but at the time of execution of this code "illegal operation error" message box is displayed.Where Im doing wrong?
Hard to tell without knowing at what point in the code you get that error.
In any case, if you looked at the DER declaration in borzoi.h, you'd note DER objects hold their data in an OCTETSTR public member named v , and as I already shown you how to code an OctetStrToHexString , you'd realize you can simply use OctetStrToHexString passing der_str.v .
ECDSA sig1(sk, OS2IP(hash));
DER der_str (sig1);
CWnd* pWnd = GetDlgItem(IDC_EDIT3);
if (pWnd)
{
CString sDer;
OctetStrToHexString(der_str.v, sDer);
pWnd->SetWindowText(sDer);
}
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Thnx for (late) reply but ive done it and through the same method as u told.
Since Im stuck in cryptography stuff nad Im using CryptoAPI Ive some data of type BYTE* (PUBLICKEYBLOB)I want to write it in a file then send it across the network and then read from file and use that public key.SIGH!!!!
now to write it in the file i covert BYTE* to CHAR* and then inverse to read ...but to dont get the same value back.
Do u have any better idea to do this??
Thanx again for ur help.
|
|
|
|
|
How to create multiple toolbars?]
Thanks
|
|
|
|
|
when I am setting any type of hooks within a DLL and I want to print any information in a file from that DLL (for example at what time a WM_xxx message was sent or things like that) my hook callback freezez it just doesn't respond. I am using fopen,fprintf,fclose functions. I know this is the problem because when I use a messagebox for example instead of writting in a file it works fine.
Can someone tell what is the problem. This used to work
Sorry for my english
gabby
|
|
|
|
|
Hi!
I'm just starting COM,and have to submit a project this semester... advanced networking and COM. we are a team of four... Can anyone suggest a good topic for the project... one such that i can show it on my resume... thanks!
|
|
|
|
|
They should of taught you about COM, before teaching you about networking.
(They are totally different subjects)
1) Don't think about the COM part (too much).
2) Write code that can send via the network, as well as receive.
3) Then write a COM wrapper around your code.
The term network does not matter, it is just a place holder, which applies to networking in general.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
hi!
thanks for the advice, but i know about networking..in fact we had developed a FTP client and server earlier this year.. what i wanted was to develop something new.. there are so many networking projects right?
|
|
|
|
|
hiho@ll
i have a prog (already compiled (.exe) and i don't have the source)
i want this prog, which only runs as single instance, to have it run more instances
is this possible?
if yes, how?
i had 2 ideas
both i don't know how to do:
1. change the prog itself, that it can run more instances (well, how?)
2. change some OS settings, if the prog already runs, so that if the program checks if there is already a running instance, the windows tells the prog "no you'r alone" (how?)
thx@ll
|
|
|
|
|
ThinkingPrometheus wrote:
is this possible?
unfortunately yes.
BUTT,
Most people who want to stop multiple instances (of their program), have a good reason for doing so.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
i know there is a reason
but not everytime! sometimes there are progs, which have this feature just to have it
do you know how it works? if yes, how?
thx
|
|
|
|
|
Without the source code I would not do it, because it requires reverse engineering at least part of its binaray code (which is normaly illegal).
In Windows (code wise):
1) Win16: You just needs to check the hPrevInstance handle.
2) Win32: You call CreateMutex() and then call GetLastError().
In both cases, you need to find where the check is ocurring, in the binary, and change the result.
So yes I know how it works and no I can not tell you how to do it.
Signed: John R. Shaw
P.S. Some thing is wrong with CP cookies again, it realy is me.
|
|
|
|
|
ok
i thought it would work something like:
get application handle, use some functions, ...
because i thought you can nearly change everything if you have the application handle
didn't really thought about reverse engineering cause i don't know how it works
another question: not really about this topic, but it seems you know reverse engineering
i was asking myself if it's possible to encrypt an exe
i mean, wouldn't it be impossible to reverse engineer a application if the executing file is encrypted?
i know it's also a performance question, but if i don't want my app to be reverse engineered, is't it possible to make it impossible
regards
|
|
|
|
|
I want to write an application to list down all the websites visited similar to the history folder.
How do i do it?
Is there any way that i can block the sites i wish to block?
|
|
|
|
|
It is said that "Once a reference is initialized to an object, it cannot be
changed to refer to another object."
But does this only apply locally. The following codes can compile successfully inside function which is controdict with the rule
int x;
int y;
int& r = x;
r = y;
-----------
Another question
extern class A;
void h(A*& a)
{
...
}
int main() {
A a;
h(&a);
A *b = New A;
h(b)
Why line 2 can't pass the compilation? I see no difference between "&a" and "b"
|
|
|
|
|
There's no contradiction.
Check this modified code
int x = 10;<br />
int y = 20;<br />
int& r = x;
r = y;
r += 10;
cout << r << " " << x << " " << y ;
For the second one, you have created reference to a pointer in the function parameter A*& a . By this it means a refers to a pointer of type A which it can modify. However when you pass &a to the function h , &a is not modifiable.
Check this sample code
A a1, a2;<br />
A* p1;<br />
A* &r1 = p1;
p1 = &a1;
r1 = &a2;
<br />
A* &r2 = &a2;
|
|
|
|
|
I see your point.
int x = 3;
int y = 1;
int& r = x;
r = y;
int main() {}
The above codes can't pass the compilation and with a error message "'r' : missing storage-class or type specifiers", It doesn't make sense to me, here the last line just assign "y" to the object "r" refers which is "x", and when I move it to local function the error disappears, why?
|
|
|
|
|
YongSheng Li wrote:
int x = 3;
int y = 1;
int& r = x;
r = y;
int main() {}
The first three lines are variable declarations that include their initialization. That's valid at the file scope.
The fourth line (r = y; ) is an assignment, which is not legal at the file scope; it's only valid in the body of a function.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|