|
thanks, i appreciate it!
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
Hello,
In MDI project i want to remove View's border, i already try pView->ModifyStyleEx(WS_EX_CLIENTEDGE, 0, 0); , but i have always the border.
if someone know how to remove the border ?
thx in advance
|
|
|
|
|
In OnInitialUpdate , before calling the parent's implementation, insert:
ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_FRAMECHANGED);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thx it's perfect !
|
|
|
|
|
Another alternative is to override PreCreateWindow if you are using MFC. It would allow you to adjust the flags even before the window is created.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi, i took a look at custom drawing under the Listview control section. I want to make my own Listview control. But for this, i need to see wether the mouse i over a item/subitem. For example i would adapt the font of one item when the user moves his/her mouse over it, when he/she moves the mouse out, it goes back to normal. Unfortunately, i have no idea how to do this... Do i catch a mousemove/nchitest message over an item(if thats possible) and set a flag so i can see in the drawing code wether the flag is set and disable the flag by catching the same message in the proc of the entire control, i really have no idea (this doesnt seem right to me btw). Can anyone give me directions for this?
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
One way to do this is to add a timer to your subclassed CListCtrl .- In your
OnTimer() handler, check if the mouse is over an item or subitem. If the state of the mouse (the item/subitem it is/was over) has changed, save the index of the new item/subitem (if any) under the mouse and invalidate the list control.
- This will cause your custom draw code to kick in.
- Your custom draw code should check the the index and draw the cell appropriately.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi
I do use Visual C++ 6 on Win2000 and WinNT4 and have an MFC application in development in which I want to add some custom informations at its compilation. Those informations should/could be the date, time, the current user and the current computer the application is compiled on. They should later be seen in the AboutBox dialog of the application itself.
Furthermore I do want this infos only in this application, not in all my other ones (a lot of the build number increasing tools/addins always apply to all my applications - I don't want that).
To even excess that I do use SourceSafe for this application so me and my work-mates can work together on it.
Is this possible?
Thanks in advance for answers,
Matthias
|
|
|
|
|
For date and time use the __DATE__ and __TIME__ macros. Not sure how to help you with USER and MACHINE NAME yet.
Kind regards,
Tim
|
|
|
|
|
I'm looking for some information regarding Memory Resident Databases, sometimes called Main Memory Databases (or MMDB).
I can't seem to find a decent explanation of it. The advantages should be obvious, but I'm looking for some more technical information, e.g. how it can co-operate with RDBMS's, in which environments they're actually used, if they're used merely for single-user systems (one MMDB per user/application) or also for multi-user environments (one MMDB for a small company or workgroup).
I find some references to Angara (www.angara.com) but that company seems to be non-existing anymore.
Anyone tips or references ?
Enjoy life, this is not a rehearsal !!!
My Articles:
- Implementing a Subject/Observer pattern with templates
- Different ways of writing class factories
|
|
|
|
|
i have huge problem in doing this, i tried virtually everithing, does anybody has examplecode??
i can change the icon, but i can not change it to a freely selectable ore selfmade icon. by default the icon wich is assigned in the pCommands->AddNamedCommand method
is a smiley, and has the value 59. when i change this value, i see another icon, but is there a list or something, where i can see, which icon has which ID ??
please help me!
thanx a lot
|
|
|
|
|
Hi!
I am new to c++ and I have a small problem.
I have a text file that I dont know how many lines are in and I want to read each line and put each line in a buffer... Does anyone know how to do this?
I use the ifstream function to read the lines and if I know how many lines are in that text file I can create a buffer for each lines. But the problem is if I have a file with 1000 lines.... what can I do to read each line?
The reason why I want to read each line is that I want to put "" tags on each...
Can anyone help me? Or if there is a webpage about this just give me its address... I'm really confused.
Thank you for your future answers!
|
|
|
|
|
Scolinks wrote:
and if I know how many lines are in that text file
You could just read through it, counting, in a first run and then do the read-in in a second run, after having allocated the memory you would need.
Or simply use containers that C++ offers you:
std::vector < std::string >
You can call push_back()( with every new line, and as long as your file is not larger than the available memory, the container will grow.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
I have different descriptions to the same file, such as "c:\tmp\test.dat", "c:\tmp\..\tmp\test.dat" etc - the variations are endless.
What is the easiest way to normalize the paths so that I can compare two or more and determine they refer to the same file?
Note the file may not yet exist.
I thought the Shell API had something but was unsuccessful with my search through MSDN. Anybody to point me to some standaed Win32 API to solve that problem?
TIA,
Bernd
|
|
|
|
|
Does GetFullPathName() do the trick?
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Unfortunately not. GetFullPathName() does what the name suggests, but does not normalize.
Thanks for making an effort anyhow
Bernd
|
|
|
|
|
How about _fullpath() ?
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
How can I clear a file with fstream?
I've opened my file with append flag, so I can't do:
my_fstream.write("", 0);
Bye
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
How can I clear a file with fstream?
I've opened my file with append flag, so I can't do:
Why not just close the file and re-open it with ios::trunc? .... I suppose there is probably a faster way.
-Nick Parker
The true measure of a man is how he treats someone who can do him absolutely no good. - Samuel Johnson
|
|
|
|
|
Nick Parker wrote:
Why not just close the file and re-open it with ios::trunc? .... I suppose there is probably a faster way.
... and better.
I've derived a class from fstream and when my app starts I open a log file and keep that log file opened while my app i running. I don't want to close it during runtime...
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Have you looked at fstream::fd
A file descriptor as returned by a call to the run-time function _open or _sopen. filedesc is a typedef equivalent to int.
Then use it in _chsize( int handle, long size );
I have never tried this, so I don't know if it will work, it is supposed to
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
A C function?
Okay, it's seems that there is no way to do it in C++....
Thank you!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I may be wrong of course. But that is the best I could find, after all fstream does use standard C calls eventuallyt.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
dear all,
i've an sdk application with a window.
on the WM_QUERYENDSESSION message, a message box pops up.
i 've 2 problems
1) if i make my window hidden (SW_HIDE), all the message boxes are also hidden( fired on WM_QUERYENDSESSION)
so how do i ensure that the message box is visible even if window is hidden.
2) how do i kill the message box say after 5 seconds
thanx and regards
rishabhs
|
|
|
|
|
Try IsWindowVisible(). As for a clock, one solution is a SetTimer. Another solution is a thread, event kernel object, and WaitForSingleObject). Finally, you can implement a timer queue timer.
Kuphryn
|
|
|
|