|
I think your problem may actually be that your szStoreFolder is terminated only with a single NULL character and it should be terminated with double NULL characters.
MSDN[^]says to use fully qualified path names (not relative) - this allows the files/folders to be moved to the recycle bin.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Maybe that is true. I tried to build the string like there but the code didn't delete the folder.
Anyway I want to permanently delete the folder so it is ok like it is now.
The problem was related with full path and full name of folder that I want to delete (for the folder name you must use the short name not the long one).
Anyway that was a weird problem because in 50%-60% of case the code was working fine, without any changes.
|
|
|
|
|
I have created toolbar and statusbar controls on dialog.
But if i do not call the below function the controls are not appearing.
RepositionBars(......)
I have specified the controls position too..
Please explain.
|
|
|
|
|
How did you make your statusbar?
|
|
|
|
|
Here is the code
static UINT indicators[] =
{
ID_INDICATOR_COORD,
ID_INDICATOR_TIME,
};
.........
.........
m_StatusBar.Create(this);
m_StatusBar.SetIndicators(indicators, 2);
CRect rect;
GetClientRect(&rect);
m_StatusBar.SetPaneInfo(0, ID_INDICATOR_COORD, SBPS_NORMAL, rect.Width() - 100 );
m_StatusBar.SetPaneInfo(1, ID_INDICATOR_TIME, SBPS_STRETCH, 0);
........
..........
|
|
|
|
|
Well use of this code and it works for you 100%.
CStatusBarCtrl m_StatusBar;
CRect rect;
GetClientRect(&rect);
int m_status[2]= {100, 160};
m_StatusBar.Create(WS_CHILD|WS_VISIBLE,rect, this, 0);
m_StatusBar.SetParts(2, m_status);
m_StatusBar.SetText(_T("Oh"),0,0);
m_StatusBar.SetText(_T("RSAK"), 1, 0);
|
|
|
|
|
I need samples for creating toolbar in a dialogs.
link?
|
|
|
|
|
I think I gove you links about make statusbar,right?
|
|
|
|
|
No its given by Cédric Moonen
|
|
|
|
|
No you wrong see here[^] its good example.
|
|
|
|
|
Why would that help him ? The status bar is used in a SDI application, not a dialog application. Furthermore, the only thing it does is displaying text, so how is it related to his problem ?
|
|
|
|
|
Realy I didnt see it I saw that link of my messages.I answered to more a question about statusbar in these days so maybe my address was wrong
|
|
|
|
|
I have added status bar using the link given by you.
Kindly share a link for adding Toolbar in a dialog.
How to display status text if i move cursor over toolbar buttons?
|
|
|
|
|
RSAK wrote: How to display status text if i move cursor over toolbar buttons?
The search function on codeproject hasn't been disabled yet you know. Anyway, here[^] is what I've found after 20 seconds searching.
|
|
|
|
|
Actually the link which you gave for statusbar is simple, clear and easy to do also.
Thats why i requested for toolbar.
|
|
|
|
|
Yes. I was wrong. Its also given by Cédric Moonen.
Ok we are going away from my query...thats about RepositionBars(...)...
|
|
|
|
|
When I'm running an application, I got a Debug error Message(R6034), which says,"An application has made an attempt to load the C Runtime library without using a manifest". I've developed this application using Visual C++ 2008 Express Edition. How do I resolve this error?
modified on Tuesday, June 10, 2008 2:32 AM
|
|
|
|
|
|
In the Manifest tool node If I select Embed Manifest to No, the manifest file is created. But When I ran the application, it shows me an Assertion Failed Error. How do I resolve this error?
|
|
|
|
|
I have created two DLL .One is PracticeDLL_1 and otherone is PracticeDLL_2
PracticeDLL_1 has a function called Calc(int * ,int *)and PracticeDLL_2 has a function called Sub(int * ,int *).I am calling Calc function from
main function and which inturn calling Sub function from DLL but the function sub is not excuting .I have given the path of practiceDLL_1 in Link option in project settings and copied that dll in application folder.still i am not getting desired result. what is the probelm? can anyone help me ?
--------------------------------------------------------------
// CallingFunctionFromDLL.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include "MethodHeader.h"
int main(int argc, char* argv[])
{
int m,n;
m=100;
n=90;
//Sub(&m,&n);
char *t=Calc(&m,&n);
printf("%s \n",t);
printf("%d %d \n",m,n);
return 0;
}
----------------------------------------------
PracticeDLL_1
#include<stdio.h>
#include<conio.h>
#include "DLLHeader.h"
//#include "CodeHeader.h"
extern "C" _declspec(dllexport) char* Calc(int *no1,int *no2)
{
int sum;
char *result="successfull";
//sum = no1 + no2;
Sub(no1,no2);
//printf("%d %d",*no1,*&no2);
return result;
}
-------------------------------------------------------------
PracticeDLL_2
#include<stdio.h>
#include<conio.h>
//#include "CodeHeader.h"
extern "C" _declspec(dllexport) void Sub(int *swe,int *tur)
{
(*swe)--;
(*tur)--;
}
----------------------------------------
any help appreciated .
Thanks in advance.
|
|
|
|
|
Copy .Lib file also in Application folder and give lib name in link don't give whole path.
-@SuDhIrKuMaR@-
|
|
|
|
|
sudhir_Kumar wrote: Copy .Lib file also in Application folder and give lib name in link don't give whole path.
Why would that help ? Your lib file can be located anywhere on your disk, that doesn't make any difference.
|
|
|
|
|
I am trying to solve the problem with minimizing the complications.Nothing else you can have .lib anywhere.
-@SuDhIrKuMaR@-
|
|
|
|
|
Please read the posting guidelines before posting: put your code into the "code block" tag, otherwise it is difficult to read it.
cristi_alonso wrote: still i am not getting desired result
It would help a lot if you explain what happens exactly. Do you have a compilation error, a crash, nothing works, blue aliens invading your desk ?
cristi_alonso wrote: extern "C" _declspec(dllexport)
If the function is always exported, how will it be imported in your executable then ? You have to use dllimport in the executable. Something like this:
#ifdef DLLEXPORT1
#define DLLAPI extern "C" _declspec(dllexport)
#else
#define DLLAPI extern "C" _declspec(dllimport)
#endif
You then declare the functions this way:
DLLAPI char* Calc(int *no1,int *no2)
You then have to define DLLEXPORT1 in the first dll project options. You have to do something similar for the second dll (but use different constants, otherwise you will mix import and export).
|
|
|
|
|
There is no compilation error no crash but nothing works .I have included one header file which contain dllimport statement.
------------------Myheader.h-----------------------
<br />
<br />
extern "C" _declspec(dllimport) char * Calc(int *,int *);<br />
extern "C" _declspec(dllimport) void Sub(int *,int * );<br />
-------------------------------------------
What i am really trying to do is calling one function from a dll which inturns call another function from another dll .can anyone tell me how to do this ?now what really happens here is that calc () is getting executed but sub() is not .
any help appreciated.
Thanks in advance.
|
|
|
|