I am formatting html tags from my vc application. I need to print tickets in each page separatedly. Do we have any tags for page break. So that each ticket is printed in a separate page! I would be grateful if anybody can help!
I am using static control on a dialog box in MFC.The text which is to be shown in the static control is to big to fit in it so its gets crop (half text displayed).Is there any way by which i can acheive text wrapping in the static control?
I have a check box in my dialog, and make it as a push like style. And i want to show some bitmap over it. so i declare a cbitmapbutton object, and create the cbitmapbutton object with a owner draw style, then attach the check box with the cbitmapbutton object using the function: autoload. But I found the cbitmapbutton's drawitem function won't be called when we show the check box!! Could i owner draw the check box? (when i just use a button, this is no problem)
macros are #defines, that means that the preprocessor copies its definition where the macro was called, like inline functions are.
but BE CAREFUL, macros can be very bad. consider the following :
<font color=#0000FF>#define</font> INCRZ(xx) xx + 1
if you then call this :
OK, i == 3 at the end.
and what about this ? :
BAD CODE !! here is how the preprocessor inlines the macro : i = 5 * i + 1;
At the end, i is evaluated as : i = (5 * i) + 1; because you might know that multiplication is prior on addition.
be careful so when designing macros, and put a maximum af parenthesis :
The most efficient way I can suggest is the store your key string as all lowercase or all UPPERCASE. Then when you do a search, convert your search string first to lc/UC then to a lookup.
Otherwise the variations on uppercase/lowercase letters in your string would just be too much to think looping through.
ok... when i try and compile this code i keep gettin the error "fatal error C1010: unexpected end of file while looking for precompiled header directive"
anyone know y this is happening and how to help?
[code]//NFL Favorite Team
std::cout << "Who is the best team in the NFL?\n";
std::cout << " (please only use the first three letters in the teams name *not city*)\n";
std::cin >> NFL >> endl;
std::cout << "We Have a Winner!!!! *claps*\n";
std::cout << "How wrong could you be? Have you ever heard of a little team called the STEELERS?!\n";
Pheonix28 wrote: std::cout << "We Have a Winner!!!! *claps*\n";
Pheonix28 wrote: if (NFL=Ste)
if Ste (steelers?) is a constant then you might like to try this
if (Ste == NLF)
coz then you'll never stuff up with the opposite by accident as the compiler will catch you assigning to a constant (but wont ncessarily catch the assignment of a const inside the IF statement
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
Yes it is because you didn't include "stdafx.h" (like said in your first response).
To solve this, either include "stdafx.h" in the top of your .cpp file or open the file view (in the workspace), right click on the file, 'settings' -> 'C/C++' tab -> 'Precompiled Header' category and choose 'Not using precompiled headers'.
Here is some sample data that we created and also I changed where seps is to " " so that it will break it into pieces. Basically what it is doing is getting the first line and then breaking off th efirst piece and retaining that and then breaking the others off and adding those. We are making a graph if you are wondering.
If I comment out where it says "trun2 = strtok (NULL, seps);" Then it will run but it stays in an infinite loop inside that Internal while loop. But if I do not then I get a core dump. Please help me if you can it is due tomorrow. Thanks
OK I figured out my problem. When I am using the string token on the the the part that I used the getline. Instead of it moving to the next one it is just reverting back to the first so how do I make it remember which ones that it has tokened. Thanks
Didn't you declare str to hold 20 characters and the line fin.getline(str, 30, '\n');
will read up to 30 characters into a 20 character buffer?
Could this be your problem if you read a line more than 19 characters long?
Since you need to leave room for the terminating NUL byte?
Thanks for your response,
Of course, I did try WS_CLIPCHILDREN and it didn't help. I found an article here talking about this problem. Unfortunately, it works in XP and .Net only. That key is the extended style LVS_EX_DOUBLEBUFFER. No solution for other versions (2K, 98...)
And I'm still working and waiting.
I need to install my driver in the /windows/system32/drivers directory if it doesn't already exist. The user would prefer not to have to run an installer just to have one driver copied. The driver could live in my application directory but I want to share the driver with other applications
What is the correct way to do that is compatible with win 2000, win xp, win xp server, and other supported windows versions?
I found the function GetSystemWindowsDirectory. Should I just append /drivers/ to the path returned to this function and copy my driver to that path?
I faced with a hussle while developing an pocket pc application. I am developing an application on IPAQ h4100 with bluetooth support. But, it is using widcomm bluetooth stack which brings me to purchase a SDK. I just want to turn on and turn off bluetooth device programmaticaly. Can anybody help me to do that? One possible solution may be start COM6 (because bluetooth led flashing when I createfile con COM5) port device. This notion can light a bulb in somebodys' brain who want to help me.
SAP R/3 Software & System Support Specialist
I wrote a program and compiled it with Visual C++ on a WinXP computer. This program runs on a WinXP machine without problems. But when I put it on a Win98 machine it shows a strange behaviour. When I start the program everything but the program itselfs on the desktop becomes black. It seems that windows only refresh the active window. My english is not so good, but I hope someone can understand my problem description.
1. I cannot, in either CBuilder or CV++ create a DLL which loads with LoadLibrary. What is wrong?
The two error codes i get is: 7f (function not found) and 6 (handle is invalid)
The errorcodes are not documented and I just CAN'T understand how i should fix the problems. I have created about ten different DLL:s, with just a DllMain, and still i have the same problems. Depends, and PEExplorer shows correct exports, and I have manually read the PE-header. Although I cannot find anything wrong with the DLL.
Thanks for your response,
When WS_CLIPCHILDREN is used, children windows have to do their painting themselves. Unfortunately, static controls, group box controls cannot draw their background. My temporary solution is setting the WS_EX_TRANSPARENT to these kinds of control (e.g. group box). Of course, they will flick, but the others can enjoy flicker-free.
So, as what I said, I still used WS_CLIPCHILDREN to prevent flicker except static, group box controls.
I'm still waiting for a complete solution.
Last Visit: 31-Dec-99 18:00 Last Update: 31-May-16 4:28