|
|
Give the exact error message and show the exact line where it appear.
|
|
|
|
|
I am calling 'GetProcessMemoryInfo()' API to retrieve information about the memory usage of the specified process. It is working in XP but notworking in Win2K.
Please help me out to make it work in Win2K
Regards,
Sangamesh
|
|
|
|
|
Sangameshwara wrote: ...but notworking in Win2K.
Why not? Does it return 0? If so, what does GetLastError() return?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hello, I'm a newbie about programming on smartphone, and I have just few
notions. Actually, I want to make a soft for a Windows Mobile 5.0 smartphone
which can take a picture with the camera and automatically place it on a FTP
server. I have to do this for my training course. I have Visual Studio
Professional 2005 and I downloaded the Windows Mobile 5.0 Smartphone SDK.
I want to know if it is possible, and if someone did a similar program
already. I just want to be sure that is realizable.
I made few searchs, and I found I can use the function SHCameraCapture of the Aygshell library to take picture. And I can
use the Connection Manager API to connect the phone on Internet and finally,
I can use WinInet library to place the picture on a FTP server with the function FtpPutFile.
So do you think it's possible?
|
|
|
|
|
Hello sir
I'm working on a project & i have to create a Form Editor IDE Component.
where user can design his form itself just like vb form designer.
i'm not getting the how to start.
what concept should i use?
plz can any one guide me.
|
|
|
|
|
The scratch is the SDI/MDI (DOC/VIEW ) concept. If you are a beginner, you should start from this.
NULL
|
|
|
|
|
In SDI I want to have a splitter window whose one pane consist of the BMP file names and the other pane shows the current selected corresponding files.
I am just a Beginner Please if anyone could help me out... in solving this problem
-- modified at 6:08 Friday 21st April, 2006
|
|
|
|
|
First, if you want help you have to describe your problem. What is EXACTLY the problem ?
|
|
|
|
|
|
The splitter-Window part is easy:
Define a CSplitterWnd in CMainFrame with the two panes you want.
Place the Views you want on the pane.
The program logic part is a litte more involved:
Have your view-classes handle OnUpdate to redraw themselves.
When your file-system view changes the selection, it sets the newly selecxted filename in a document variable, and the documents setter-routine calls UpdateAllViews .
The BMP-display view now does load an show the file just selected.
A splitter pane can use any CWnd* , not just a CView* , which may help you in your task, as you can place any control directly on the pane.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hi
How to send an email using smtp ?
thanx in advance
by
KK
|
|
|
|
|
There are a lot of sources here at CP.
Clickety[^]
|
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
The above class is export in a dll . So should i add new function to the dll ?
Can i have a sample code that achieves it?
class __declspec(dllexport) MyClass
{
public:
static char* LSGDecrypt(const char* key,const char* hex);
static char* LSGEncrypt(const char* key,const char* source);
}
Iam about access a static function
So is that required to instantiate the class object.
HINSTANCE hDLL; // Handle to DLL
LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer
char* key = new char [50];
key ="KEYVAULE";
char* strPlain = new char [50];
strPlain="password";
char* strResult = new char [50];
DWORD dwrd =NULL;
hDLL = LoadLibrary("Mydll.dll");
if (hDLL != NULL)
{
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"LSGEncrypt");
if (lpfnDllFunc1 ==NULL) // Fails here? so DLL is freed up?
{
FreeLibrary(hDLL);
}
else
strResult = lpfnDllFunc1("killer" ,"strikes HERE");
}
for thendral
|
|
|
|
|
hi young breeze,
U can use static linking for the dll. so that u don't require to get the function ptr for the LSGEncrypt funtion.
Natpudan,
Parthiban
|
|
|
|
|
Can i have a sample code that achieves it?
class __declspec(dllexport) MyClass
{
public:
static char* LSGDecrypt(const char* key,const char* hex);
static char* LSGEncrypt(const char* key,const char* source);
}
The above class is export in a dll .
So should i add new function to the dll ?
Iam about access a static function
So is that required to instantiate the class object.
HINSTANCE hDLL; // Handle to DLL
LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer
char* key = new char [50];
key ="KEYVAULE";
char* strPlain = new char [50];
strPlain="password";
char* strResult = new char [50];
DWORD dwrd =NULL;
hDLL = LoadLibrary("Mydll.dll");
if (hDLL != NULL)
{
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"LSGEncrypt");
if (lpfnDllFunc1 ==NULL) // Fails here? so DLL is freed up?
{
FreeLibrary(hDLL);
}
else
strResult = lpfnDllFunc1("killer" ,"strikes HERE");
}
for thendral
|
|
|
|
|
R.ilan thendral wrote: INSTANCE hDLL; // Handle to DLLLPFNDLLFUNC1 lpfnDllFunc1; // Function pointerchar* key = new char [50];key ="KEYVAULE";char* strPlain = new char [50];strPlain="password";char* strResult = new char [50];DWORD dwrd =NULL;hDLL = LoadLibrary("Mydll.dll");if (hDLL != NULL){lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL,"LSGEncrypt");if (lpfnDllFunc1 ==NULL) // Fails here? so DLL is freed up?{FreeLibrary(hDLL); }elsestrResult = lpfnDllFunc1("killer" ,"strikes HERE");}
You can use Exported class this way, because the function have no memory till the Classobject is created.this method is only used to load Dll function.
for loading class from DLL, first you have to create MFC extention DLL,secondly you can try this article...
http://www.codeproject.com/dll/noextensiondll.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
This is Taruni.I am working with MessageBoxes.Is it possible to change the caption "Ok" and set the caption according to our wish on the "OK" and "Cancel" buttons in the MessageBoxes.
-Thanks in Advance
Taruni
|
|
|
|
|
YA its possible.and u can do it dynamically using these calls SetDlgItemText(IDOK, "ABC");
More relaxed the person high is his status.
|
|
|
|
|
Taruni wrote: This is Taruni.I am working with MessageBoxes.Is it possible to change the caption "Ok" and set the caption according to our wish on the "OK" and "Cancel" buttons in the MessageBoxes.
That very tricky task to do. IMHO, you can try this wrapper class instad of normal MessageBox
http://www.codeproject.com/dialog/CPPMessageBox.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello everyone,
I have a tree view consisting of several nodes and when i right click on it a context menu is popped up ,where i enter the required details and preess ok.my code works fine until this.however i need to insert the details in the tree view. when i make a call to
m_PointsTree.GetSelectedItem my application is crashing.Please provide ur suggestion.
HEllo
|
|
|
|
|
Can you show some code segments?
- NS -
|
|
|
|
|
I have two modeless dialog, CDialog1, CDialog2, I use the two dialog in a formview. The formview have a member variable CDialog *m_pDlg;
I use them like this:
CMyForm::CMyForm() : m_pDlg(NULL)<br />
{<br />
}<br />
<br />
void CMyForm::OnDestroy()<br />
{<br />
DestroyDlg();<br />
}<br />
<br />
void CMyForm::DestroyDlg()<br />
{<br />
if (m_pDlg)<br />
{<br />
m_pDlg->DestroyWindow();<br />
delete m_pDlg;<br />
m_pDlg = NULL;<br />
}<br />
}<br />
<br />
short nDlgFlag = -1;<br />
<br />
void CMyForm::OnBtn1()<br />
{<br />
if (nDlgFlag == 0)<br />
return;<br />
<br />
nDlgFlag = 0;<br />
<br />
DestroyDlg();<br />
<br />
m_pDlg = new CDialog1;<br />
m_pDlg->Create(IDD_DIALOG1, this);<br />
m_pDlg->ShowWindow(SW_SHOW);<br />
}<br />
<br />
void CMyForm::OnBtn2()<br />
{<br />
if (nDlgFlag == 1)<br />
return;<br />
<br />
nDlgFlag = 1;<br />
<br />
DestroyDlg();<br />
<br />
m_pDlg = new CDialog2;<br />
m_pDlg->Create(IDD_DIALOG2, this);<br />
m_pDlg->ShowWindow(SW_SHOW);<br />
}
My question is when i click button1 and then button2 the taskmanager show that the appliction used memory increased, but when i minimize it the used memory decreased to lower, and show again the memory used lower than before minimized, I don't know why. Any one help me.
Is there any function can do this but needn't to mimimize it.
Thanks a lot.
Hongjun Ge
|
|
|
|