|
hi, i noticed if i set border of a dialog to resizing, then there is an icon on the left hand side of the title bar, how can i remove it?
nathan
|
|
|
|
|
Remove these codes of your program
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
|
|
|
|
|
i don't hv SetIcon() function called in my code...
|
|
|
|
|
Whats your application type?
|
|
|
|
|
I think WhiteSky meant to set the icon handles to NULL
::SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)0);
::SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)0);
or with MFC
SetIcon(NULL, TRUE); // Set big icon
SetIcon(NULL, FALSE); // Set small icon
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i put
SetIcon(NULL, TRUE); // Set big icon
SetIcon(NULL, FALSE); // Set small icon
into my OnInitDialog method, no use...
app type is a multi document windows application, this is a dialog of it
|
|
|
|
|
Is the dialog window a client of another frame window?
What are all the window styles and extended styles you use when you create the dialog?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
:->Some software,after you have installed,can open assiociated files just double click it.How to do that or how to write the code.I will be very thankful if somebody give me a little information or some code samples would be better.
|
|
|
|
|
Hi,
Simply you need the following information on the system registry,
HKEY_CLASSES_ROOT\.<fileextension> "<yourFriendlyName>"
HKEY_CLASSES_ROOT\<yourFriendlyName>\Shell\Open\command "<yourApplicationPath>"
HKEY_CLASSES_ROOT\<yourFriendlyName>\DefaultIcon "<yourApplicationIconPath>"
How to,
1. MFC will do for this using Doc/View Architecture
2. In Win32 you can use registry APIs
3. You can manually edit registry using regedit
Best Regards
Raj
|
|
|
|
|
1)My application is Dialog based. Then you mean that MFC will not do it for me automatically?
2)I think my application can not open the file directly. It only open the file with its menu item "Open File". Maybe I need to write a main() function to open the file in command line just like Java. But I am not very sure how does this main function really look like.
Thanks for your attention.
BR.
|
|
|
|
|
Hi,
I think your query was to associate the file type with your application so that windows will create your application instance when the file is double clicked.
I hope this link provides coding information for associating file types.
http://www.codeproject.com/shell/cgfiletype.asp[^]
What is your problem, do you want to associate file type or want to get file names from command line.
Best Regards
Raj
|
|
|
|
|
Peter, Chan wrote: 1)My application is Dialog based. Then you mean that MFC will not do it for me automatically?
Correct. So why not just create an SDI project to see what type of .reg file it puts together? Then you'll know exactly what to put in the registry for your dialog-based application.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello
In my application, i want to perform some logical operation.Ie "AND" operation, "OR"operation,"Exor" operation..
For example..
Enter value1 :-1011
Enter value2 :-1100.
Answer is
AND :- 1000
OR :- 1111
EXOR :- 0111
Any idea how can i get it..I am trying to Enter binary value as a string but then how to convert string to binary...
Please help me..Any new logic ??
Thanks
Shah
Shah
|
|
|
|
|
Shah Satish wrote: ..I am trying to Enter binary value as a string but then how to convert string to binary...
Assuming you need to do that, use atoi to convert.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: use atoi to convert.
In that case, the string need to be in decimal representation, not in binary representation.
|
|
|
|
|
Shah Satish wrote: how to convert string to binary...
Take a look at strtol[^]. You can provide 2 as the basis and it will convert your string representing a binary into a long. Then you just perform logical operations on your long (&& for AND, || for OR, for XOR I don't remember what it was but you can make an OR and then invert the result with !).
|
|
|
|
|
Thank you dear..I got my solution.
|
|
|
|
|
Hi Shah,
Following routine should do the job:
int StrToBinary (LPCTSTR szString)
{
int nBit = 1;
int nResult = 0;
int i;
i = strlen (szString);
while (i > 0)
{
if (szString[--i] != '0')
nResult |= nBit;
nBit *= 2;
}
return nResult;
}
Good luck
William
|
|
|
|
|
Hi Wim..Thanks for your reply..
|
|
|
|
|
I am running 5 instances of an exe. every instance deals with same database. I know that i have to use CMutex for synchronization. but i dont know how to use it. niether MSDN provided a solid example. please tell me how to do it. Thanks in advance
Anil Jillella
|
|
|
|
|
Hi,
I think MSDN provides full documentation of API's and I think such support are not available for other Operating system.
The following link is from MSDN providing example program for CMutex usage
http://msdn2.microsoft.com/en-us/library/ms386471(VS.71).aspx[^]
There are lots of tutorial you can find if you google it.
Best Regards
Raj
|
|
|
|
|
Hi,
If you are using CMutex you should use Named Mutex as your problem is accross process boundary.
Best Regards
Raj
|
|
|
|
|
CMutex is a syncrhonisation object that is very close to CCriticalSection.
The only difference is that CMutex can be shared accross different processes.
At the startup of your application, initialize a new instance like that :
CMutex test(TRUE,_T("MyMutex"));
The name of the mutex is very important of course, it allows windows to link different mutex that have the same name.
Call Lock() to enter a critical section, if another thread has already entered this portion of code, then you thread will wait for the other one to leave the section before entering.
Call Unlock() when you are done with database calls
Tout programme dont la fiabilité dépend de l'homme n'est pas fiable
|
|
|
|
|
Would you please forward me a simple program that will overload << operator in C++?
|
|
|
|
|
pan_angel wrote: Would you please forward me a simple program that will overload << operator in C++
That would be only if we get PAID here .
And why do you need this? Read some books buddy. A good C++ book would be surely having an example for operator overloading and that would help you in developing the code in the time to come rather than seeking help from others each and every time.
You should atleast give it a GO!!!
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|