|
if u want i can have look at your code!!! Send it to my email.!!
|
|
|
|
|
but I have wrote it down in my question
pls help me
It has puzzled me for 3 days
and no one could give me a correct answer
--oly--
|
|
|
|
|
You must pass the resource ID to AddBitmap , not the index of the bitmap. The resource ID will be found in resource.h .
Gary R. Wheeler
|
|
|
|
|
Hi
I'd like to get the user's input from the console, if the user put in some text, this information will be put in a buffer, if the user type in nothing in and press enter then the program is terminated. But how do i know if the user has type in something???
i've attempted to play around with this, first with cin.getline, cin.get ...and finally come up with gets(), however it still seem has not done the job.
this is the code that i've attempted
<br />
char input[MAX_PATH];<br />
char *pInput = input;<br />
<br />
cout << "Enter the text " << endl;
<br />
char delimeter =(char)gets(input);
<br />
while( delimeter != '\r' )<br />
{<br />
<br />
<br />
cout << "Enter the text " << endl;<br />
delimeter =(char)gets(input);<br />
}<br />
<br />
Any ideas, helps or suggestions are highly appreciated!!!
Regard,
|
|
|
|
|
getchar maybe what you need instead of gets .
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
|
Try something like this:
char input[MAX_PATH];
do {
cout << "Enter the text " << endl;
gets(input);
if (strlen(input) != 0) {
}
} while (strlen(input) != 0);
Gary R. Wheeler
|
|
|
|
|
You may have problems mixing cin /cout and gets /printf . For console hacks, I use gets /printf .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I created a Win32 Console Application with MFC support. Everything was working fine until I decided to add ADOX. I have the code for access database interaction in a separate static library from the console application itself. I can build the library fine, but when I try to link it in with the console app, I get several linker errors that look something like this:
\PATH_TO_VC98\comutil.h(562) : error C2668 : 'memcpy' : ambiguous call to overloaded function
From what I understand, when you get this kind of error, it is from a naming collision of some sort. The only problem is that I haven't written my own 'memcpy'. I can only assume that the compiler sees two different versions on the system somewhere. The really strange part about the whole things is that the application builds fine when I am using the exact same code on a button handler in a GUI. I do have the Platform SDK installed (not sure if that matters). Anyone heard of this kind of thing? Please help!!!
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
In a listbox I want to handle the on LButtonDown so that I can quickly select items in a listbox. The default is the curent selection is only updated on LButtonUp. Any ideas?
|
|
|
|
|
I'm so use to a lot of quirks coming from ClassWizard, I'm beginning to wonder whether it's normal.
For example, I instructed ClassWizard to add a new class for me, chose "New" and continued to fill in the class name and its derived class name (etc.). Then I click OK and CW produced a message saying it couldn't open the file I had just asked it to add. I clicked OK again and it came back with a message about how it found remants of the class I had just asked it to add (that it earlier said it couldn't).
I checked the workspace, checked Explorer and even brought the newly created file into the Source Editor and made modifications to it (etc.), compiled and linked the program. Everything went well, 0 errors; 0 warnings.
Still, CW did not have the new class included in its list.
I deleted the ".ncb", the ".opt" (and some other files), compiled and linked the program again, and still the new class was not included in CW.
Finally, I deleted the ".clw" file, compiled and linked the program again, but this time CW asked if I wanted to create a new CW file. I clicked OK, and behold! the new CW file this time included the new class I had a few moments ago created.
Is this just another one of CW quirks that I'll have to live with, or did I do something wrong it didn't like?
Thanks.
William
|
|
|
|
|
do you have any anti-virus apps running? i've seen this kind of thing with Norton. it makes life exciting.
-c
Green's Law of Debate:
Anything is possible if you don't know what you're talking about.
|
|
|
|
|
Yes, I do have anti-virus software running continuously!
My machine is heavily equiped with anti-virus software, including Norton's enterprise edition.
Thanks for the tip.    I appreciate it.
William
|
|
|
|
|
According to MSDN, TransparentBlit is not supported in 95 (or i mis-read it ).
Anyone know of a way to support this under 95? ie updates, dll etc
Thanks
Robert Cannell
|
|
|
|
|
Not that I am aware of, you will need to implement your own version. As far as I can remember though, there is a sample implementation in MSDN that shows how you can implement this function for windows 95 and Windows NT 4.0.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thanks, I will have a look.
|
|
|
|
|
Hi,
I'm new using CWinThread, what I'm doing is to show a progress bar window, mean while the GUI of the main window is being updated.
All goes fine, but... when I have to finish the CWinThread I do it in this way:
pThread->m_pMainWnd->PostMessage(WM_CLOSE,0,0);
pThread->PostThreadMessage(WM_QUIT, 0, 0);
WaitForSingleObject(pThread->m_hThread, INFINITE);
To have this working, I have to set in the InitInstance of the CWinThread class, this flag to false:
m_bAutoDelete = FALSE;
Do you know why ?, Or what I'm doing wrong ?
Thanks in advance, Greetings
Braulio
|
|
|
|
|
Hola Braulio,
m_bAutoDelete=TRUE instructs the CWindThread object to delete itself upon exiting; that means that all member data of the thread (including m_hTread ) gets deleted, so it would be wrong to refer to it in a call to WaitForSingleObject . Having m_bAutoDelete==FALSE , the object remains in memory after the thread exits for you to inspect its data as you please. Remember that in this case you have the responsibility of disposing of the thread when no longer needed with delete pThread .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hola Joaquin !!, Qué tal ?
Yes, you are right, thanks for the info. Mmmm... I've seen there is not very clear info and samples about CWinThread in MSDN or here in Codeproject, I'm thinking about making a new article, with the Progress Bar Dialog stuff ( in a CWinThread), do you think it's a good idea ? Is there some article or thing about CWinthread that is interesting ?.
Gracias de nuevo Joaquin !, Un saludo
Braulio
|
|
|
|
|
There's a couple of articles in the threads section of CP dealing with worker and UI threads; I haven't looked at them in detail, so maybe you've got something new to add Besides, the progress bar stuff can be useful, and publishing in CP is a lot of fun. Regards.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello,
I need convert an unsigned data type to a char *. How can I do this??
The problem is originated in ...
for(int counter=0; counter<house.length(); counter++)="" {
="" <i="">get_the_unsigned_from (house.room( counter );
convert_the_unsigned_to_char*;
append_(_char*_(_counter-1_)_,_char_*_(_counter_)
}
I'll appreciate your help!
Sp
|
|
|
|
|
well - you can simply go for a cast... or try stripping the sign bit.
--
John Clayton
|
|
|
|
|
|
Hi Everyone
I am trying to find out how I can hook 'onidle' from within an AddIn module for VC6. I know (using AfxGetApp()) that I can get to the CWnd* instance for MSDEV, but how on earth do I tell this CWnd* guy that I'd like to be called back when OnIdle() is being called?
Ideally, I would like to do :
AfxGetApp()->TellMeAllAboutOnIdleEvents(my_callback_interface);
(of course, this method don't exist!)
This could all be explained by my MFC naievity as well. Is it something to do with CCommandTarget perhaps? Well, while I continue to flex my eyes at the included MFC docs I shall hope for a reply.
Any help is massively appreciated! Thank you.
--
John Clayton
|
|
|
|
|
Hi.
I want to debug code that manages printing. However, I do not own a printer or have access to one. Is it possible to get print preview to emulate a printer? I just need the program to show an sample of what the print would looks like.
Thanks,
Kuphryn
|
|
|
|
|
Install a printer driver that manages PostScript (most, actually). Then, when printing, set the check box that reads "Print fo a file", rename the resulting output to .ps and use any utility (Ghostview, for instance) to see the results.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|