|
Hi all,
I have changed the CDialog properties.
In CDialog i have changed Border syle as "Resizing" from "Dialog Frame".
If i changed this Property, An Icon is been displayed in the Dialog.
I dont want to have an extra Icon in the Dialog TitleBar.
What should i do.
I tried with SetIcon(NULL,TRUE) //remove the ICON from TitleBar when changing the Border Style.
Thanks & Regards
uday.
|
|
|
|
|
try with
SetIcon(NULL, FALSE);
SetIcon(NULL, TRUE);
|
|
|
|
|
Hi Dev,
As you given a solution
SetIcon(NULL, FALSE);
SetIcon(NULL, TRUE);
For both Big ICON and Small ICON. I am still able to see an Empty White ICON.
Any suggestions please.
Thanks & Regards,
Uday.
|
|
|
|
|
yes.. i apologize, for a resizing dialog box, it shows a white icon, whenever the system menu property of dialog box is true. What about loading a complete transparent icon and set it as dialog icon?
Others may have solid solutions to give you..
|
|
|
|
|
It seems the icon is displayed because of WS_SYSMENU style. So, one option would be to disable System Menu style.
|
|
|
|
|
Hi,
Can anyone tell me how to export a CListCtrl data into pdf/doc format?
Thanks
|
|
|
|
|
|
Hi Rajessh.T.S,
Thanks for your reply.The link you have given me for word document is in C#.I havent worked on C#.Please suggest me some links in C++/VC++.
Thanks
|
|
|
|
|
|
i can't convert int to CString.. need help pls..
here is my code, i want to print whatever the value of count is on a STATIC TEXT Control..
count += 1;
atoi(count);
m_StaticText.SetWindowText(_T("try lang = ")+ count);
i got------>
error C2664: 'atoi' : cannot convert parameter 1 from 'int' to 'const char *'
thanks ahead..
|
|
|
|
|
you may use:
CString str;
str.Fomat(_T("try lang = %d", count);
error is because your syntax for atoi() is wrong.
i think it is itoa() that you really intended to use
|
|
|
|
|
in these code :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
m_StaticText.SetWindowText(_T("try lang = ")+ count);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
you can not add a string value to a integer value.
|
|
|
|
|
|
Each item in the list box has a bind data( set with the func 'SetItemData') , if I delete the item which who's index is 7(based zero), so now , is the new 7 indexed item has the last eighth item's data or seventh 's data ?
|
|
|
|
|
the new 7 indexed item will be the old 8th item(with its data set with SetItemData). list box will handle this internally whenever you delete an item from it.
If you set a pointer to some dynamically allocated memory as SetItemData(index, ptr), take care to delete that memory before removing the list box item, if you don't need that memory again.
|
|
|
|
|
Thank you! I just know where are you come from?
|
|
|
|
|
you may email the forum members for further activitiees.. no such discussions here please.
|
|
|
|
|
Hi I want to find the number of comma(,) in particular string.
Like char* str = "a,b,c,d,e". So how many commas are there in str ?
Thanks
|
|
|
|
|
Use strchr in a loop.
char* str = "a,b,c,d,e";
int count = 0;
for (;;)
{
str = strchr(str, ',');
if (NULL == str)
break;
++str;
++count;
}
|
|
|
|
|
std::count is your friend. It does exactly what you'd expect it to do from it's name. The only problem you're likely to have is working out where the end of the characters in memory are, but if you're feeling lazy bung the characters in a std::string first:
std::string s( str );
std::cout << "There are " << std::count( s.begin(), s.end(), ',' ) << " commas in " << s << std::endl;
Cheers,
Ash
|
|
|
|
|
char c;
int commas=0;
while((c=*str++)!=0) if (c==',') commas++;
|
|
|
|
|
const char *p = "a,b,c,de,f,";
int c = 0;
for (;*p;c+=(','==*p++));
|
|
|
|
|
Ahh, the joys of C++. Did you make it so complex on purpose, or is all your code written like that ?
|
|
|
|
|
That was classic Kernighan and Richie C!
Sheesh, youngsters of today...
Whippersnapper!
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
[Untested]:
std::string str("a, b, c, d, e");
int count = std::count(str.begin(), str.end(), ',');
or if you insist on C-style strings:
int count = std::count(str, str + strlen(str), ',');
|
|
|
|