|
We can't answer this, by telling us what you want to happen, you're telling us what the code should do. You need to post some code so we can see why it's not doing that.
One possibility is that you're not cleaning GDI resources, and you're running out.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
oh i havent access to code right now
when i use LoadBitmap() do i have to clean it or something??
i also releaseDC() the DC. do i have to delete memDC??
and i have another question. i have a Draw() func. i call it in onTimer()
is it acceptable? or i should call Draw() in onPaint()?
|
|
|
|
|
You need to release everything explicitly.
Yes, you should be calling Draw from OnPaint and calling Invalidate.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to get a list of system created folders like C:\windows, C:\Program Files, etc.
1. Are these the only two the system creates, or are there any more? how do we identify them all?
2. SHGetFolderPath with CSIDL_PROGRAM_FILES will give you only C:\Program Files, how do get the program files directory in other drives like D:?
|
|
|
|
|
if you have many 'Program files' folders in several hard disks, only one is owned by the system (because the other have been made by you - or a user). so, if the system is installed on C:, ShGetFolderPath() will return only that one...
understand ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
actually, thats my question too. Does the system own the Program Files folder? I thought it is the applications that get installed create this folder, and you can chose to install it in D:\Program Files. And the system installation also installs a few applications, thats why that folder will be there.
Anyways, C:\Windows, C:\Program Files and C:\Documents and Settings are the only ones the system creates, right? can any user's home directory be configured on a different drive than the system drive?
|
|
|
|
|
Flace wrote:
Does the system own the Program Files folder?
yes, but it own only the one it created during its installation.
Flace wrote:
can any user's home directory be configured on a different drive than the system drive?
certainly ! right click on a "My Documents" icon (on the desktop for example) and see the change target into the target property tab...
but i don't know how to do this programmatically...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Flace wrote:
C:\windows,
GetWindowsDirectory()
GetSystemDirectory(): for System directory
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
actualy now days i m suffering a problem
if u have a solution den plz ...give me
i want to make a VPN connection through s/w
and after a connetion thr VPN
i wanr to transfer data from one database thr another one
i make all dis after making VPN conection
but the main prob is presently i making VPN manually.
mean thr windows inbuilt facility
but i want all this thr my s/w program so user can not suffer this manually VPN connection
coz i kno dat end user has not able to do dis .
so plz if u hav soln of dis den plz mail me
i want to use windos api to make VPN connection
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Hi,
I have to get the Fully qualified name of my machine. I am using the function gethostbyname, hostent -> h_name attibute for the fully qualified name.
My problem is,
I can modify the "Primary DNS Suffix" value of my machine. The function gethostbyname returns me "MyMachineName.Primary DNS Suffix Value", if the Primary DNS Suffix given is invalid also. All the other settings(eg. DNS Server) are perfect.
My Question is,
How can i get the Valid FQDN? Or i have to do something to validate it?
Thanks
|
|
|
|
|
Respected All
Regards!
I have to display an image on a dialog box which is large in size than the default size of the dialog box ,so to display bitmap I need the dialog box size upto maximum size so that my bitmap may easily show on dialog box.
help needed
Thanking you all.
david
|
|
|
|
|
If it is to maximize the dialog, you can use ShowWindow(SW_MAXIMIZE);
|
|
|
|
|
a_david123 wrote:
I have to display an image on a dialog box which is large in size than the default size of the dialog box ,so to display bitmap I need the dialog box size upto maximum size so that my bitmap may easily show on dialog box.
To set the Dialog Box size at Runtime you can use MoveWindow or SetWindowPos Api's
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
For instance, RGB(255,0,0), how can I display it in different luminance?
Thanks.
|
|
|
|
|
When you do, it won't be 255, 0, 0. You need to convert to HSL, increase the luminance, then go back to RGB.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Hi friends,
Can anyone suggest tips or tools or tutorials for improve perfomance for old Visual C++ projects ?
My company maintains a lot of Visual C++ projects of our customers. Our customer gives C++ projects of about 2-5 years old and request us to improve perfomance.
If anyone worked for such kind of maintanence projects which includes perfomance tuning, please help us by your valuable tips.
Thanks & Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
I offer this tongue-in-cheek:
When you initially create a project, lace it with gratuitous sleep and delay-type code. Then when the customer asks that its performance be increased, simply remove the extraneous code and voila...you delivered a faster product and the customer thinks you killed a bear!
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
U are a SuperHero James ,
I cant say it was good tip
but will surely say this will
help me to do business & from
a business mans point of view
it was great tip.
Thank you
Pls send me more business tips.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
It's hard to point to general techniques to improve performance in abstract.
As vague as it sounds, I'd say you first need to identify which are the parts of the program in which you find it slow to respond, and then visually inspect the code and make some profiling, looking for opportunities to improve.
Maybe if you posted about some concrete thing you want to optimize...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Dear Lamas,
Thank you for your reply. Actually that project is a mission critical backend application running in an ultrasound scanner product. Its build up on some alreay running frameworks. It uses a custom database. So no hope in optimizing those areas.
But the application is performing some communication by using winsock. So if you can comment on network communication optimization it will be helpful for me.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
A good site about networking with free code in Visual C++ of TCP/IP, ICMP, Finger, Ping, Trace, scan port, DNS, ...
http://www.ipmanager.com.ar
|
|
|
|
|
sebastianos@gmail.com wrote:
A good site about networking with free code in Visual C++ of TCP/IP, ICMP, Finger, Ping, Trace, scan port, DNS, ...
But's that's not in English....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
How do you build a project/Solution using the makefile of the project in VS.NET 2003?
For example, I have a sample that I'm trying to build form the DirectX SDK. Unfortunately there is no DSP, DSW, or SLN files given for the project. However all the .cpp and .h are there as well as the makefile for the project. How do I create a .VCPROJ or .SLN file for this projet ?
-Cindy
|
|
|
|
|
hi, all
does anybody know when should be release the auto pointer? thanks!
m_pdbf = std::auto_ptr<cb_dbf_ntx>( new CBNoMessageBox_DBF_NTX( pszFileName ) );
|
|
|
|