|
Look up WM_CTLCOLORSTATIC in MSDN.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I downloaded their library package and attempted to make a project but my compiler complained that I was missing header files and I was. I have not been able to find the missing files or a work around. Has anyone successfully used this library?
Sparselib++
Normality is a weakness...
|
|
|
|
|
I want only one instance of my VC++ 6.0 app to run at a time. How do I prevent users from running 2 or more instances at the same time?
John
|
|
|
|
|
Put this code in your InitInstance function:
HANDLE hMutex = CreateMutex(NULL, FALSE, "MyAppName"); <br />
<br />
switch(GetLastError())<br />
{<br />
case ERROR_SUCCESS:<br />
break;<br />
<br />
case ERROR_ALREADY_EXISTS:<br />
return FALSE;<br />
<br />
default:<br />
return FALSE;<br />
}
Geert
Want to spread the newest version of your software automatically? Use Updater!
Visit my website: www.gvhsoftware.org
|
|
|
|
|
John Schwartz wrote:
How do I prevent users from running 2 or more instances at the same time?
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I need to convert an existing library to use auto_ptr
So say in one class
class C
{
public :
auto_ptr<ccriticalparser> parser ;
} ;
Now in code that manages an Object of C I need to pass a pointer to CCriticalParser
class D {
void Foo-D()
{
C c1(char *fileName) ;
E e1(c1->parser);
}
}
class E {
E(const CCriticalParser *parser);
}
I get a compiler error in
E e1(c1->parser);
Now I want to be able to pass the Raw pointer , but still want the auto_ptr to maintain the object in C , hence I do not want to use auto_ptr::Release() .
I need to know a call in auto_ptr where I can obtain the Raw Pointer . Also where can i find proper documentation for auto_ptr ?
Engineering is the effort !
|
|
|
|
|
you can always call get() (a method on auto_ptr) to get the raw pointer.
You should easily be able to find documentation for any STL class on the web.
|
|
|
|
|
What is the best way of forcibly deleting the pointer pointed by the auto_ptr
My compiler complains about
autoPtrVar.reset(NULL) ;
Engineering is the effort !
|
|
|
|
|
Try release(), then delete the returned pointer.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
Hello,
I have a CListView - derived class with the LVS_ICON style. My text for the icons only wraps to two lines. I need the text to wrap more than two lines. Is there a way to do this?
NOTE:
This is how it looks now (pretend this is an icon):
|====|
|icon|
|====|
LineOne
LineTwo L...
This is how I want it to look:
|====|
|icon|
|====|
LineOne
LineTwo
LineThree
Thanks!
|
|
|
|
|
This is default view the list view will work. If you want to wraps the text then simply change the size of the icon dynamically, then it will wrap the text to the next line. But it all depends upon the size of the Icon you want to display in the ListView.
|
|
|
|
|
Hi all,
Is there a way to pre-allocate some large amount of virtual memory for a process and then let it use?
I have the following problem: there is a very important service that use large amount of memory (up to 400MB and more) but its memory usage depends on time: sometime uses as low as 4MB of memory, sometimes 400MB. Sometimes it happens that it cannot find 400MB free because other less important processes uses it. A possible solution would be to pre-allocate 400MB, and then let 'malloc' and 'new' allocate from the pre-allocated pool.
Do you know a way to do it in W2K/XP?
Thanks a lot in advance.
Regards,
Andrea
|
|
|
|
|
You could overload the new operator and handle the details yourself...
See MSDN article "How to overload new..." http://support.microsoft.com/default.aspx?scid=kb;en-us;139638[^]
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Did you try VirtualAlloc?
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
Hi,
unfortunately I have to reserve a large amount of global virtual memory because virtual memory (either physical or in page file) is a shared, limited resource. The article about the heap should fit but I still do not undestand how to use STL::new and malloc without making custom allocation classes.
So the problem is still open...
regards,
Andrea
|
|
|
|
|
For a potentially unicoded application.
I use the alias "MS Shell Dlg" font in my application; I believe this is a proportional font.
Is there an equivalent for a fixed sized font ? does Courier ( Courier New ) fit what I'm looking for ?
Or Am I completly off the subject ?
Thanks.
Max.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
this is very important (fatal) for me. I think you can help me.
I need code of a Scentefic Calculator with C++ or VC++
that can draw functions like (y=sin(x)) and so on.
If you can give me an address or guidance.
Thank you very much again and again.
TA RedStar
|
|
|
|
|
certainly...
do you want it by e-mail, by postal mailing, drawn on a wing of a paper plane, or do you want me to send it to you with a carrier pigeon ???
man, forum are not stores for full designed applications... we're are not here to do the job the teacher excpects you to do. we are just here to HELP you making your project complete on the point you cannot reach by yourself...
moreover, there are several of good graphical calculators on CP ; i doubt you search for that first (see here[^] for more)...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I need help in drawing section for exp how ishoud draw sin(x)
and textbox that can be edited but when i refer to it it readed as string
i know vb but ihavn't enough time to neccessery cnversion
TA RedStar
|
|
|
|
|
TA-RS wrote:
Scentefic Calculator
a calculator that smells ?
anyway ... where are you exactly in your project ?
Do you have problems with the UI ? the calculation part ? or the graph drawing functions ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I'm very rusty, but I can't find any function on MSDN about returning a date. Can anyone help me?
|
|
|
|
|
Camron wrote:
...I can't find any function on MSDN about returning a date.
That does not stand for Microsoft Singles Dating Network!
Have you tried time() ?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Time Functions[^]
time, _time64[^]
(you need to look up "time" for date functions. kind of like pressing "start" to shutdown... )
- Indivara
"...This city desert makes you feel so cold.
It's got so many people but it's got no soul..."
- Gerry Rafferty, Baker Street
|
|
|
|
|
in doc/view structure, how to load a bitmap file and display in a desired position in the view?
Thanx
|
|
|
|