|
Jayaraman K wrote: a installshiel setup
If you really want to use InstallShield, why didn't you look at the company website[^] ?
On the other hand, if you would like to use a free tool, I suggest InnoSetup[^]
|
|
|
|
|
Hi,
Can you please help me and told me how can i set option of my RichEditCtrl to display the All line which exceeds the width of RichEditCtrl and not with scroll.
ie when i have a text string like that "blablablablablablablablablablablablablablablablablablabla"
and the width of the RichEditCtrl is less than the length of this string it should display the part of this string and display the rest in newline.
|
|
|
|
|
Did you even bother to read my reply when you posted this yesterday?
The text will wrap automatically when you use the ES_MULTILINE style.
|
|
|
|
|
VS6.0, C++
I have a control I need to 'interact' with, I set it up the usual way with
ID = IDC_TINY1 and using ClassWizard to assign a variable CStatic m_Tiny1, as expected this gives me:-
DDX_Control(pDX, IDC_TINY1, m_Tiny1);
and in the header:-
CStatic m_Tiny1;
Now though I have 11 more identical controls and instead of having m_Tiny1, m_Tiny2, m_Tiny3 etc I think it would be better to have an array m_Tiny[12] but there seems to be no way to assign each element of the array using ClassWizard. So I decided to edit these entries manually to give me:-
DDX_Control(pDX, IDC_TINY1, m_Tiny[0]);
DDX_Control(pDX, IDC_TINY2, m_Tiny[1]);
DDX_Control(pDX, IDC_TINY3, m_Tiny[2]);
.
.
.
DDX_Control(pDX, IDC_TINY12, m_Tiny[11]);
and:-
CStatic m_Tiny[12];
This appeared to work just fine until I came to edit another control using ClassWizard I then got the error:-
Parsing Error: Expected ")" Input Line:"DDX_Control(pDX,IDC_TINY1,m_Tiny[0]"
I'm assuming this is VS telling me I have an entry in the DDX that it didn't put there even though it quite happily will compile and run it.
So to the problem: Is having array elements in DDX entries a valid thing to do? If yes then how do I do it without the error?
Thanks
Apathy Rules - I suppose...
Its not the things you fear that come to get you but all the things that you don't expect
|
|
|
|
|
stevepqr wrote: Parsing Error: Expected ")" Input Line:"DDX_Control(pDX,IDC_TINY1,m_Tiny[0]"
You forgot ");" at the end of the line. That's exactly what VS is telling you also
|
|
|
|
|
cedric, i dont think he has forgotten to add the closing bracket because in the query where he is adding the control variable i can see the bracket being put properly.
|
|
|
|
|
Thanks for that but I forgot it from the post not the code! message actually reads:-
Parsing Error: Expected ")" Input Line:"DDX_Control(pDX,IDC_TINY1,m_Tiny[0]);"
Sorry!
|
|
|
|
|
put the above code after like this //}}AFX_DATA_MAP
<blockquote class="FQ"><div class="FQA">stevepqr wrote:</div>DDX_Control(pDX, IDC_TINY1, m_Tiny[0]);
DDX_Control(pDX, IDC_TINY2, m_Tiny[1]);
DDX_Control(pDX, IDC_TINY3, m_Tiny[2]);
.
.
.
DDX_Control(pDX, IDC_TINY12, m_Tiny[11]);</blockquote>
in DoDataExchange Function. It should work.
|
|
|
|
|
Thanks but the code is already included inside the '//}}AFX_DATA_MAP' I didn't change this part just added lines inside the markers.
|
|
|
|
|
i had the same problem and this was solved by adding the code outside the markers.
|
|
|
|
|
ClassWizard only parses the lines inside its comments.
You should place your custom lines outside the class wizard's special comments. Just below the comment line //}}AFX_DATA_MAP, for example.
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_TINY1, m_Tiny[0]);
DDX_Control(pDX, IDC_TINY2, m_Tiny[1]);
You should also take definitions into account in header file.
enum { IDD = IDD_DIALOG1 };
CStatic m_static1;
CStatic m_Tiny[12];
The lines added manually in that way, won't be parsed by ClassWizard.
|
|
|
|
|
I thought of this already - when I try it I get 'Cannot Add New Member' when I try to add a new member but otherwise it works ok. I'm getting round this by commenting out the above lines adding new members and then uncommenting them, PITA!!
|
|
|
|
|
The problem may be with <your project="" name="">.clw file. Close project then rename that file. ClassWizard will re-create it. Or you may edit yourself if you know what you do.
|
|
|
|
|
Thanks! Deleting the .clw and regenerating it did the trick - strangely, after recreating it I had to exit VS and restart but now all is good.
Thanks to everyone else too for their suggestions.
Apathy Rules - I suppose...
Its not the things you fear that come to get you but all the things that you don't expect
|
|
|
|
|
I am trying to Saving and Restoring Toolbars status by sending TB_SAVERESTORE message. MSDN says if you don't have user data to store with the toolbar buttons, you don't need to handle TBN_SAVE or TBN_RESTORE notification. So, now, the saving and restoring are fine, the program restores toolbar buttons correctly. However, if I try to kill that toolbar control restored, Visual Studio gives a warning message "Unhandled exception at 0x7c901230 in win32tst.exe: User breakpoint." This warning only shows if the program is launched inside the Visual Studio. It just runs fine if launched outside of Visual Studio. So I tried to debug with WinDbg.exe, and it gives a more detailed description of that user breakpoint warning "Invalid Address specified to RtlFreeHeap". Anybody knows what's wrong with the restoring? Thanks.
case WM_NOTIFY:
{
switch (((LPNMHDR)lParam)->code)
{
case TBN_GETBUTTONINFO:
{
LPTBNOTIFY lpTbNotify = (LPTBNOTIFY)lParam;
// Pass the next button from our array. There is no need to
// filter out buttons that are already used; they will be
// ignored.
int buttonCount = sizeof(tbButtons) / sizeof(TBBUTTON);
if (lpTbNotify->iItem < buttonCount)
{
lpTbNotify->tbButton = tbButtons[lpTbNotify->iItem];
return TRUE;
}
else
{
// No more buttons.
return FALSE;
}
}
break;
case TBN_QUERYINSERT:
case TBN_QUERYDELETE:
return TRUE;
case TBN_ENDADJUST:
{
TBSAVEPARAMS tbSave;
tbSave.hkr = HKEY_CURRENT_USER;
tbSave.pszSubKey = "Software\\key";
tbSave.pszValueName = "tbsave";
SendMessage(GetDlgItem(hWnd,ID_TOOLBAR),TB_SAVERESTORE, TRUE, (LPARAM)&tbSave);
}
return TRUE;
}
}
break;
|
|
|
|
|
We have a huge C++ code, developed on Microsoft Visual Studio 6.0. This contains but server and client code. Now the requirement is to add a support for memory leak detection.
So can any one help me to code, which should check the existing whole code base for memory leaks.
Thanks,
Nandu
|
|
|
|
|
|
Thanks, But the above mentioned will not support VS6.0, I need a similar solution for VS 6.0
-Nandu
|
|
|
|
|
See Visual Leak Detector [^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Help me with these program
/* program to illustrte read function with pointer */
//this program may not work properly because of memory problems in read
#include<stdlib.h>
#include<stdio.h>
#include<unistd.h>
#include<string.h>
int main()
{
char *buf,c;
int nread;
memset(buf,0,0);
buf=malloc(1024);
nread=read(0,&buf,100);
printf("characters read: %d\n",nread);
if(nread == -1)
{
write(2,"An error occured in read function\n",27);
}
else
{
if(nread==0)
write(2,"Data is not written to the filedescriptor\n",27);
else
write(1,&buf,nread);
}
free(buf);
}
output:
sandeep@sandeep $ ./a.out <x
characters read: 75
this is Kead program
which is throwing lots of errore
lets correct them
Segmentation fault
|
|
|
|
|
sandeep_dhruwa wrote: char *buf,c;
int nread;
memset(buf,0,0);
buf=malloc(1024);
You have to call malloc before calling memset. Otherwise, you will try to write into an invalid pointer.
|
|
|
|
|
still I am getting the error
|
|
|
|
|
And for the read and write functions, don't pass the address of your buffer variable: it is already a pointer. Pass the pointer directly:
read(...,buffer,...);
(apply that for every read and write).
|
|
|
|
|
thanks it solved
thankyou
|
|
|
|
|
sandeep_dhruwa wrote: nread=read(0,&buf,100);
sandeep_dhruwa wrote: write(1,&buf,nread);
You should use buf , not &buf .
For instance
nread = read(0, buf, 100);
BTW your code is a mess, you really need a good C tutorial.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|