|
Have you tried
CDC::SetBkMode(TRANSPARENT) .
Regards,
Paresh.
|
|
|
|
|
What is the background of your dialog or window? A Image, or just filled with a color?
|
|
|
|
|
you can also use the radio button without text and paint the text yourself or in another static. Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi all,
i working on SMS sending application,
i able to send sms in Text mode by AT command,but some mobile not supported the Text mode format to sending sms,
so i want to send sms in PDU format.
please tell me how can i send sms in PDU mode by AT commands,
if possible please provide me any sample or example.
please tell me also how can create PDU code.
thanks in advance.
|
|
|
|
|
Hi
I am having listcontrol with different many columns in report view.
I need to setup a different color for a single columns depending upon the status such as started,finished etc.,
Kindly help me..
Regards
Ganesh.P
|
|
|
|
|
|
|
How can i add drag drop target line when drag an item from one tree and drop it in to the another tree?
|
|
|
|
|
You want CTreeCtrl::SetInsertMark or TVM_SETINSERTMARK.
To find out which item you should display the mark at, look at: CTreeCtrl::HitTest / TVM_HITTEST message, and the TVHITTESTINFO Structure.
For an application that does these things brilliantly, have a look at Dan.G.'s todo list article here on codeproject. If you look at one of the earlier versions so it's smaller, that may help you.
Good luck,
Iain.I have now moved to Sweden for love (awwww).
|
|
|
|
|
Forgive me if this has already been answered recently. I have a solution that I am ready to distribute. I want to package it with a licensing/registration utility to disperes as shareware. Your typical use for period then force registration. It doesnt need to be real hardcore protection as my application is not that big of a deal. But does need to be simple to implement. And appear to the user to be a decent product. I have been searching for some time and most of these are big bucks! I dont mind paying for this product, but not what most are charging. Also, I want to know that the program works well. I dont want people not being able to register my product. Any help in this matter is greatly appreciated. What programs would you recommend? What are you using?
Thank you very much for your time.
|
|
|
|
|
bump......nobody?
|
|
|
|
|
I have a program that maintains a log file. The file is created at the start of the program and appended to as needed. In normal operation this works fine, but I added the program to my "Run at windows startup" list, and while the program runs fine, the log file doesn't exist where I placed it. According to fstream::is_open, the file opened correctly and I have no error messages anytime I use the stream, but the file is just not there.
I know the simple solution is to keep the data in memory until it needs to be written to file (sometime far after windows startup), but I was more interested in why it won't create the file and why I don't get any errors. Is there anyway to account for this other than rewriting the where and when the file is opened?
|
|
|
|
|
Are you sure you're not getting errors? Are you checking? I'd suggest making the file stream throw exceptions on errors (it makes them harder to ignore):
fs.exceptions(ios::eofbit | ios::failbit | ios::badbit); Steve
|
|
|
|
|
I'm not too familiar with exceptions, I was checking return codes for any error messages. After a quick google though:
file.exceptions ( fstream::eofbit | fstream::failbit | fstream::badbit );
try
{
file.open("test.txt", ios::out);
file << "Test";
file.close();
}
catch (fstream::failure e)
{
MessageBox(NULL, "File Failed", "Error!", MB_OK);
}
I still don't receive an error though, and no file when windows starts up, but it does create it if I open it manually
|
|
|
|
|
Zacory wrote: file.open("test.txt", ios::out);
Give the absolute path while opening or creating the file. Use GetModuleFileName() function to create absolute path.
CString strPath;
char *pChPath=strPath.GetBuffer(_MAX_PATH);
GetModuleFileName(NULL,pChPath,_MAX_PATH);
strPath.ReleaseBuffer(_MAX_PATH);
int nPos=strPath.ReverseFind('\\');
strPath = strPath.Mid(0,nPos+1);
strPath+="test.txt";
pChPath = strPath.GetBuffer(_MAX_PATH);
MessageBox(pChPath);
strPath.ReleaseBuffer(_MAX_PATH);
This issue you are facing only in Start up because, the current working directory of the exe is not the actual path where the exe is located.
modified on Monday, March 22, 2010 5:32 AM
|
|
|
|
|
Thank you soo much, I never would have thought of that. Moving to absolute paths solved this little problem.
|
|
|
|
|
|
|
what kind of question it is?
|
|
|
|
|
because i need to distribution memory to write something,
if memory is not enough, tip to user
|
|
|
|
|
Try this[^]. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
im making a program that has a button on the dialog. When pressed, it pops up another dialog.It is a math calculator program. This specific button calculates square root. I need to have the thing go in a child window(modal dialog) because i have other formula buttons to add...
So i go in the class wizard, create a dialog of the CDIALOG BASE ....then i try to add a message handel.....
then on my main dialog, i add the code
CDialog aboutDlg(IDD_ABOUTBOX);
// Create and show the dialog box
INT_PTR nRet = -1;
nRet = aboutDlg.DoModal();
// Handle the return value from DoModal
switch ( nRet )
{
case -1:
AfxMessageBox("Dialog box could not be created!");
break;
case IDABORT:
// Do something
break;
case ID_SOMETHING:
MessageBox("hello", "bonjour(s)", MB_OK);
break;
case IDCANCEL:
// Do something
break;
default:
// Do something
break;
};
i know DOMODAL IS RESTRICTED in a few perimters but someone told me to create a class and make message handles...than override domodal with my code...nothing happens....message box does not appear
....i just lost though..nothing is working at all..please give me detials or a tutorial on how to create a class derived from CDIALOG than add message handles.
|
|
|
|
|
in that case can you give code of your DOMODAL function?
if you want a simple work around then you can store that square root value in some global or class variable and then use it in parent dialog. But if you want to go with domodal then share that code.
Thanks.
|
|
|
|
|
The code you've shown has little, if anything, to do with the question you've asked.
acce55 wrote: please give me detials or a tutorial on how to create a class derived from CDIALOG...
If you have already designed the dialog template, open ClassWizard (Ctrl+W). It should prompt you for creating a class or selecting an existing class. Selecting the former should bring up a New Class dialog with the Base class and Dialog ID already filled in.
The steps in VS200x are different. I do not have that version in front of me to provide details."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hello,
I have downloaded the last 0.2.8version of log4cpp from source forge, but I have to build the sources because they dont provide the binaries.
There's a MSVC6 folder in the distrib, but I only have visual studio .net 2003 (VC7).
I tried to build it anyway, but ran into build errors. I would appreciate if someone can help here..
This is what I did:
1. start msvs.net 2003.
2. File->Open project->...->log4cpp-0.2.8->msvc6->msv6.dsw
3. I got the following msg box:
"The project 'log4cpp.dsp' must be converted to the current Visual C++ project format. After it has been converted, you will not be able to edit this project in previous versions of Visual Studio."
4. I said "yes to All"
5. Build->build log4cpp
6. This is the o/p from log file:
log4cpp-0.2.8\src\PatternLayout.cpp(134): error C2593: 'operator <<' is ambiguous
log4cpp-0.2.8\src\OstringStream.cpp(78): error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
7. line 134 of PatterLayout.cpp is: message << t;
8. Line 78 of Ostring.cpp is :
*this << vstrprintf(format, args);
Any help?
Thanks a lot.
-R
|
|
|
|