|
viral_umang@hotmail.com wrote: Thank you for coordination.
You're welcome. I'm glad I could cooperate with you.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I need copy an exe file when a button on my application is pressed.
I have created a resource by importing that exe.
insert->resource->import...
Now how can i get that file from the resource id and copy that into another location?
Is there a way?
Thank u.
KIRAN PINJARLA
|
|
|
|
|
Something like this, perhaps?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
struck here.
hResource = FindResource(NULL, MAKEINTRESOURCE(IDR_EXE1), RT_RCDATA);
if (NULL != hResource)
{
hResourceLoaded = LoadResource(NULL, hResource);
if (NULL != hResourceLoaded)
{
lpBuffer = (LPBYTE) LockResource(hResourceLoaded);
if (NULL != lpBuffer)
{
}
}
}
I have loaded my one.exe into a resource with id IDR_EXE1 using wizard. now when im trying it with FindResource() it returning NULL. where is the problem?
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: ...FindResource() it returning NULL. where is the problem?
If the function fails, the return value is NULL . To get extended error information, call GetLastError() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You don't create the resource of that file.
The problem is solved with the file reading and writing in binary mode.
as the path of your source exe file and destination file is fixed.
Just open the file in binary mode using ifstream and read it byte by byte
after reading flush the byte array to destination file using ofstream.
|
|
|
|
|
I dont want to take that exe every time with my project exe. I want to integrate that exe with the project exe.
KIRAN PINJARLA
|
|
|
|
|
Hello
I have a activex control.
Inside the control i drew a circle.
Now I want to load a bitmap into this circle.
The bmp should also be within the circle.
Could anyone please help me in this regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
Ok
This is how i did it.
Create a Circular region. Using CreateEllipticalRgn().
Set the windows region to the created region.
Now load the bitmap. the bitmap will be confined to the created circular region.
Is this is the best method to do that?
Regards
The Best Religion is Science.
Once you understand it, you will know God.
|
|
|
|
|
helo.. can anyone help me in my research. im looking for application that can detect cpu temperature? does anyone who have knowledge in this? using either c++,vb,vb.net.
Astalavista
|
|
|
|
|
How about the Win32_TemperatureProbe WMI class?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
i need to protect some data (simple txt files). The idea here is just to protect data for wrong manipulation (i dont want to implement encryption at first place, 100 text files, i first thought i could zip/rar and use password but this seems bit unnecessary now)
I remember in one program, the data is stored in a DLL file.
My question is how i can store a simple text file in a DLL? or is it possible?
Thanks in advance.
Bekir.
|
|
|
|
|
beko wrote: My question is how i can store a simple text file in a DLL? or is it possible?
How about as a RT_RCDATA resource?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I have seen your article about using RT_RCDATA, thanks for the pointer.
I will give a try.
Thanks.
|
|
|
|
|
void CMFCTest8Dlg::OnBnClickedButton1()
{
CFrameWnd* cfw = new CFrameWnd();
RECT rect;
rect.bottom =300;
rect.right =300;
rect.top=0;
rect.left=0;
LPRECT lprect=(LPRECT)new LPRECT();
this->GetWindowRect(lprect);
//cfw->Create(L"hi",L"hi",SW_NORMAL,(*lprect),this->GetWindow(1),0,0,0);
cfw->Create(L"hi",L"Ex04a Text Output",WS_CHILDWINDOW,CRect(20,30,350,140));
cfw->ShowWindow(SW_NORMAL);
cfw->UpdateWindow(); // Error here
}
Debug trace:
<br />
BOOL CWnd::ShowWindow(int nCmdShow)<br />
{<br />
ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));<br />
<br />
if (m_pCtrlSite == NULL)<br />
return ::ShowWindow(m_hWnd, nCmdShow);<br />
else<br />
return m_pCtrlSite->ShowWindow(nCmdShow); <---Threw erro here<br />
}<br />
286? WOWW!
|
|
|
|
|
_8086 wrote: cfw->Create(L"hi",L"Ex04a Text Output",WS_CHILDWINDOW,CRect(20,30,350,140));
Whats this API is returning ? I thing this call is failed. And probably, you need to set parent here.
|
|
|
|
|
_8086 wrote: ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));
This should probably be using the logical AND operator (i.e., you want to assert that both conditions are true, rather than just one of them).
_8086 wrote: return m_pCtrlSite->ShowWindow(nCmdShow); <---Threw erro here
What error?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: _8086 wrote:
ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));
This should probably be using the logical AND operator (i.e., you want to assert that both conditions are true, rather than just one of them).
He is refering to CWnd::ShowWindow code.
|
|
|
|
|
prasad_som wrote: He is refering to CWnd::ShowWindow code.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
That's an unusual way of creating a pointer to a RECT. May I ask why you did not write?
LPRECT lprect = new RECT();
I'm just curious.
Tom
Philosophy: The art of never getting beyond the concept of life.
|
|
|
|
|
Tom,
your code also has the benefit of allocating a RECT struct for the GetWindowRect() function to write into - his code allocates a pointer only (a RECT** that he casts to a RECT*) - so GetWindowRect() will corrupt something when it writes to it.
Peter.
|
|
|
|
|
Does it look better now?
CFrameWnd* cfw = new CFrameWnd();
cfw->Create(L"hi",L"Ex04a Text Output",WS_CHILDWINDOW,CRect(20,30,350,140));
cfw->ShowWindow(SW_NORMAL);
cfw->UpdateWindow();
what's wrong with this? Plz help.
286? WOWW!
|
|
|
|
|
I suspect that the Create call is failing - did you take Prasad's advice and check the return value?
If it is failing, carefully check the documentation and your parameter list. In particular, have you registered a windows class called "hi"?
Peter.
|
|
|
|
|
Dear all
i am developing a dll that will contain some data which has to be protected from reverse engineering,
is there is any ideas to achieve this ?
Thanks
MiNa
|
|
|
|
|
MinaFawzi wrote: protected from reverse engineering,
What do you mean by reverse engineering?
Love is like pi - natural, irrational and very important
- Lisa Hoffman
|
|
|
|