|
BTW, I am starting now with the NSIS to do an installator to my application, as you say that you know it well.
Do you know any site where a step by step tutorial or example is?
I have taken a look into the help file (very complet and good explain) but just definitions and how to, but none example for newbies. I would be thankfull if you can recommend me something.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
|
Thanks, I will take a look. BTW, yesterday I found another link quite good http://nsis.sourceforge.net/Category:Real_World_Installers[^]
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hi all,
I am having and E_ACCESSDENIED HRESULT at my code at OpenAttach when I try to open an attachment here it is
HRESULT hResult;
enum {CLASS,MSG_PROPS };
SPropValue lpPropValueArray[MSG_PROPS];
lpPropValueArray[CLASS].ulPropTag = PR_MESSAGE_CLASS;
lpPropValueArray[CLASS].Value.lpszA = "IPM.Note";
IMAPITable *m_pAtTable = NULL;
hResult = m_Message->Interface()->GetAttachmentTable(0, &m_pAtTable);
if (hResult !=S_OK)
throw(HResultException("GetAttachmentTable failed in redmap::loopMSg", hResult));
std:tring sName = _T("");
LPSPropValue pProps = NULL;
ULONG cVals = 0;
LPATTACH lpAttach = NULL;
LPSRowSet attachRows;
ULONG ulNumChars = 0;
ULONG lCount = 0;
SPropValue *vals;
LPATTACH attach;
std:tring strAttachmentFilename = _T("");
SizedSPropTagArray(1,g_sptMsgProps) = {1,PR_HASATTACH};
if (SUCCEEDED(hResult = m_Message->Interface()->GetProps((LPSPropTagArray) &g_sptMsgProps, 0, &cVals, &pProps)))
{
if (PR_HASATTACH == pProps[0].ulPropTag && pProps[0].Value.b)
{
static SizedSPropTagArray(6,sptCols) = {6,PR_ATTACH_LONG_FILENAME_W,
PR_ATTACH_NUM,
PR_DISPLAY_NAME,
PR_ATTACH_FILENAME_W,
PR_ATTACH_METHOD,
PR_ATTACH_DATA_OBJ};
if (SUCCEEDED(hResult = m_pAtTable->SetColumns((LPSPropTagArray)&sptCols, 0)))
{
if (SUCCEEDED(hResult = HrQueryAllRows(m_pAtTable,
(LPSPropTagArray) &sptCols,
NULL,
NULL,
0,
&attachRows)))
{
for (unsigned int ctr=0; ctr < attachRows->cRows; ctr++)
{
if(SUCCEEDED (hResult = m_Message->Interface()->OpenAttach(attachRows->aRow[ctr].lpProps[1].Value.l, NULL, MAPI_BEST_ACCESS, &attach)))
{
if(SUCCEEDED (hResult = attach->GetProps((LPSPropTagArray)&sptCols, 0, &lCount, &vals)))
{
if (vals[4].Value.l == ATTACH_EMBEDDED_MSG)
{
LPMESSAGE pMessageEmbAttach;
hResult = attach->OpenProperty(
PR_ATTACH_DATA_OBJ,
&IID_IMessage,
0,
MAPI_MODIFY,
(LPUNKNOWN *)&pMessageEmbAttach);
ULONG lCountSub = 0;
static SizedSPropTagArray(1,sptSubject) = {1,PR_SUBJECT};
SPropValue *valsSub;
if (SUCCEEDED (hResult = pMessageEmbAttach->GetProps((LPSPropTagArray)&sptSubject, 0, &lCountSub, &valsSub)))
{
sName = valsSub[0].Value.lpszA;
hResult = pMessageEmbAttach->SaveChanges(KEEP_OPEN_READWRITE);
if (hResult !=S_OK){
throw(HResultException("pMessageEmbAttach->SaveChanges failed in redmap::loopMsg", hResult));
}
hResult = attach->SaveChanges(KEEP_OPEN_READWRITE);
if (hResult !=S_OK){
throw(HResultException("attach->SaveChanges failed in redmap::loopMsg", hResult));
}
}
if (valsSub)
MAPIFreeBuffer((LPVOID) valsSub);
if (pMessageEmbAttach)
pMessageEmbAttach->Release();
}
else
{
}
}
}
}
}
MAPIFreeBuffer( attachRows );
}
}
}
if (pProps)
MAPIFreeBuffer((LPVOID) pProps);
What do i need to change in this code to make it work? Is this possible? after that will there be further errors to my code? (I have not tested it because I can't get pass the OpenAttach
Thanks,
Jj
|
|
|
|
|
Hi all,
I think this fails because the first attachment number is 0 because the second attachment which has an attachment number of 1 opens successfully, any ideas how this can work?
Thanks,
Jj
|
|
|
|
|
Hello World...
Want to ask how can I create a search keyword code to search in diferrent pages?
For example: I have three personal pages and I search "house" in my main or fourth page how will it search the other three pages I have.. Need your help. Thanks...
-=H=-
|
|
|
|
|
|
I mean any word sir, and can you give me how to do it and c# language. Thanks
-=H=-
|
|
|
|
|
Do you want to search on the html files?
|
|
|
|
|
hi all
i want to allocate memory for two diamentional sring
like CString mydata=new CString[10];
for "TWO DIAMENTION". I done CString mydata=new CString[10][10]; but compiler raise error how can i solve this problem;
thank u in advance
malik
|
|
|
|
|
Try with this
CString *mydata=new CString[10];
|
|
|
|
|
Sorry this is wrong, u have to use CStringArray Class
|
|
|
|
|
Sorry: use a CString* is legal
but you ar right using a CStringArray is best practice :->
Greetings from Germany
|
|
|
|
|
What is your requirement ? Will CStringArray helpful ?
Regards,
Paresh.
|
|
|
|
|
rajneshmalik wrote: I done CString mydata=new CString[10][10];
Two dimension array cannot be created like this.
You have to do like
CString** pStr = new CString* [10];
for( int i = 0; i < 10; i++ )
pStr[i] = new CString[10];
- NS -
|
|
|
|
|
hi
first thank u to help me,my concept r not so clear because i m new for mfc but i want to describe my problem to u.
i have a directory that have unknown number of file i want to show and sort those file for this i want a CString type variable(object) so that i can show those file,i think u have to modefied ur statement.i am also getting memory leak problem.please reply soon thank u
malik
|
|
|
|
|
I CStringArray is enough for the purpose.
rajneshmalik wrote: i am also getting memory leak problem
May you are not calling delete in the proper way.
- NS -
|
|
|
|
|
rajneshmalik wrote: i want to allocate memory for two diamentional sring
try
typedef std::vector<CString> vecCString;
typedef std::vector<vecCString> vecTwoDimensionCString;
typedef std::vector<vecTwoDimensionCString> vecThreeDimensionCString;
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
While you probably should use an array class as others have mentioned,
you can create multi dimension arrays on the heap if you use the proper
syntax:
CString (*mydata)[10] = new CString[10][10];
...
delete[] mydata;
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi
first thank u to help me,my concept r not so clear because i m new for mfc but i want to describe my problem to u.
i have a directory that have unknown number of file i want to show and sort those file for this i want a CString type variable(object) so that i can show those file,i think u have to modefied ur statement.i am also getting memory leak problem.please reply soon thank u
malik
|
|
|
|
|
rajneshmalik wrote: i have a directory that have unknown number of file i want to show and sort those file for this i want a CString type variable(object) so that i can show those file,
In that case I don't see why you need a multi-dimension array.
Directory listings are one-dimensional.
A CStringArray is an excellent choice IMO.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I view some code style like
<br />
if (CListCtrl::GetItemData() & 1)<br />
{<br />
}<br />
Anybody could explain clearly? thx first!
|
|
|
|
|
CListCtrl::GetItemData(),this function will return something and you r anding the return value with 1
bye...
|
|
|
|
|
I think like
<br />
if (GetStateKey(VK_SHIFT) & 0x8000)<br />
{<br />
}<br />
means press the SHIFT key down,
<br />
if (CListCtrl::GetItemData() & 1)<br />
{<br />
}<br /> must mean something specail. Anyone could help me understanding it ?
|
|
|
|
|
The '&' is a bitwise operator. It can be used for checking whether a specific bit is set or reset. For example, 10 & 1 means 1010 & 0001 in binary, the result will be zero since the first bit is zero. 0101 & 0001 will result in 1 because the the first bit is 1.
Similarly the data obtained from list control through GetItemData is being checked for first bit set or reset. All other bits are avoided. The if block will be executed only if the first bit of the obtained data is 1.
Hope you are clear about it now.
- NS -
|
|
|
|