|
Is it possible to enable MFC in vc2005 Express?
Is it allowed?
|
|
|
|
|
I am using CProgressCtrl in VS6.
I would like to know how to change its color?
Please help!
|
|
|
|
|
Subclass it and handle the WM_ERASEBKGND.
Or
If you wanna change the colors used in a progress bar control then you have to handle these two messages
1. PBM_SETBARCOLOR
2. PBM_SETBKCOLOR messages.
or The Easiest
CProgressCtrl myCtrl;
myCtrl.Create(WS_CHILD|WS_VISIBLE|PBS_SMOOTH, CRect(10,10,200,30),
pParentWnd, 1);
myCtrl.SetBkColor(RGB(255, 0, 0));
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!
I try
CProgressCtrl myCtrl;
myCtrl.SendMessage(PBM_SETBKCOLOR,0,RGB(255,0,0));
It's alright now!
|
|
|
|
|
Try SetBkColor...
That's why it is provided for...
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I have a program compiled using multi-byte character set accessing a DLL/LIB compiled using UNICODE character set. When I run the program in debug, memory leak was detected. Same thing happened for UNICODE program accessing DLL/LIB compiled using multi-byte character set. The problem went off when both program and DLL were compiled using the same character set. Is there a workaround for this? The DLL was built and compiled in UNICODE in order to support both UNICODE and multi-byte character sets whereby conversion to UNICODE data type will be done if UNICODE is not defined in the calling program. The intention here is to have only one DLL, and not one DLL in UNICODE version and another DLL in multi-byte version.
|
|
|
|
|
Hello all,
I have a working win32 console c++ application. I developed the application
in a machine(XP Professional) which had an installed copy of visual studio
.NET 2003.
now my question is this? Is there a way in which I can statically load all
the required libaries into the executable while building it itself, such th
at i can just grab the executable and run it in another machine(windows XP P
rofessional, but does not have visual Studio .NET 2003 installed)??
Or does every system that executes the c++ application, needs to have a co
py of VS.NET 2003 installed?
Or is there any other alternative?
Kindly help me out. It's kinda urgent.
Sree
|
|
|
|
|
In MSVC (6) its usually Project -> Settings -> General : 'Microsoft Foundation Classes' :: 'Use MFC in a Shared/Static DLL' for MFC if your console app uses it ..
AFAIK you still need the core Microsoft Version 7 'redistributable' DLL's on your deploy platform/machine, but they are available as a seperate download (dont have a link, sorry) that you can install easily on the target machine, without having to install .NET .
edited: found a useful link http://msdn.microsoft.com/netframework/downloads/framework1_1/[^] for the .NET redistributables - see bottom of page in link ..
'g'
-- modified at 19:06 Wednesday 28th December, 2005
|
|
|
|
|
|
yes, I think I remember saying he neeeded the MSVC V7 Redistributables, of which that
GflPower wrote: msvc7d.dll
is one, and a debug one at that !
which is why I suggested he look for the redistributable download from MSDN which should have ALL the dll's he'd require - do you know where it is ? - Ive assumed its in the .NET Framework download, but have been known to err
'g'
|
|
|
|
|
hello garth & gflpower,
thanks a lot. the .net framework 1.1 download proved enough. though i also installed the redistributable download also. thanks a lot once again.
sree
Sree
|
|
|
|
|
Ok, Im tired and stumped - I whipped up a 'quicky' late last night to fix some data files for the business - that I probably should have done in perl or such - but instead I generated a new MFC console project, cut and paste entries from other guff into it.. when I built the project, I noticed the debug directory (usually just 'debug') was
project-name__WIN32_DEBUG
which isnt bad in itself - I just dont know how MSVC suddenly decided to name project directories like that, not having entered any naming convention for myself - can anyone point out the relevant chapter of the manual please ? I cant see where the settings are in the Studio for this - Ive checked everything I think I can see ...
thanks, Garth
|
|
|
|
|
This is an artifact of the wizard used to generate the project. You can change this to just plain 'debug' if you like.
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
thanks Gary - I was afraid it was a permanent thing I couldnt 'undo' - 'artifacts' I can handle <insert thumping sound> ..
have a great day wherever you are
'g'
|
|
|
|
|
The steps required to fix this vary depending on the version of studio you're using. If you're using VC6, you have to manually edit the .dsp file. For VS.NET, you can change a configuration name from the Build, Configuration Manager menu item.
Garth J Lancaster wrote: have a great day wherever you are
Xenia, Ohio, USA.
My day is over; time to head downstairs for an evening of mind-rotting television .
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Hey all,
I'm building a server based application (Server 2003) that traps each user login to the domain.
I'm using WMI sinks to achive that.
I can then get an active directory user object to get all kinds of information about the user.
So far so good.
Can anyone tell me how I can determine the hostname/IP that the user is logging into?
|
|
|
|
|
Is there a limit to the number of computers that can access an executable at the same time? Would the file be locked at certain times?
|
|
|
|
|
Joshua Lunsford wrote: Is there a limit to the number of computers that can access an executable at the same time?
None that I am aware of, unless the application itself has restrictions.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
wouldn't the server(pc) OS have a restriction on how many concurrent connections it will allow?
I think XP and lower only allow like 10-15 connections, and then the NT4 & Up series limits it at some point as well(i think) but can't remember the number.
Would that constitute as a restriction on the # of connections to the exe?
|
|
|
|
|
|
i want to develop an application to copy files from one PC to another. the app maintains a logfile which keeps the record of all the files visited in a day(i.e. opened, modified, renamed, deleted etc). now the files should be copied to the portable media alongwith the logfile which would then be transfered to the destination PC. and at the destination PC the files will be copied in the same directory structure as of source PC. for this reason a logfile is to be maintained. my application should reside in the system tray.
please help me how to develop this application in MFC. reply me as soon as possible. i hope u get it now.
RabiaAslam
|
|
|
|
|
looks like you want to do a mirror/backup software.
The first time this is used, the original log will have all the files from PC-A; and they will all be transfered to PC-B; the log files will be the same on both machines.
the next time you do it, make a list of files on PC-A, compare it to what is on PC-B, if file on PC-A exists on PC-B and has been modified on PC-A, copy new version on PC-B, if file on PC-A does not exists on PC-B, copy it to PC-B, if file on PC-B is not in the PC-A log, remove it from PC-B, ...
Does it really matter if a file is only openned on PC-A ? it should not have repercussion on PC-B
renaming a file is like copying it and deleting the original, so, you will create a new file ( new name ) and delete the old file ( old name ) from the destination PC.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I am working on an MFC MDI application and I have some problems about doing the things below if you provide any help I would be very happy.
Like Macromedia applications, I want my application to have a start up dialog when there is no child window. This dialog contains options such as New , Open and Resent File List. I examine the Macromedia Fireworks and I think they opening a Dialog based FormView or just a Dialog...My problems are:
1. I cant start my MDI application empty, without a child window.
2. When I open a dialog window ( FormView or other kind of Dialog) I cant use the MainMenu in MainFrame, I know this is normal because of the focus. But in Macromedia Applications you can both use the Startup dialog or the menu in the main frame. So decided that its not a dialog its another CView. But I cant find a way to open my CView derived window when there is no MDIChild. I dont know how to call it or Create it.
3. When I tried to use Dialog (FormView) still unable to call or create it.
4. Another thing is I am using DialogBars instead of Toolbars, and I want my DialogBars to be shown without a standart splitter on the left side. They wont be dockable so I dont need them to have splitter.
I am using Visual Studio .NET 2005 with MFC 8.0 library. most of tutorials or examples in this site , returns with linker 2019 errors I tried hard to repair them but no way....
Any codes, any articles, any suggestions I would be very happy.
-- modified at 12:45 Wednesday 28th December, 2005
|
|
|
|
|
Hi all,
I'm using Edit() and Update() functions to update the fields in the table. However, at particular (always) record, I got error exception which can't catch with CDBException or CException. So I used catch(...) to catch any exception. Then used sqlcomman to update the field. That particular record, let's say recnum=600,
exception got thrown, caught it by using catch(...), the field2 of recnum=600 got updated executing sql command "UPDATE ... SET". But got exception at the next following record,which is in this example, recnum=601, and got another CDBException after calling SQL command, . Error is saying "connection to DB got lost".
Why??
Why can't always at some particular record cant' update and throwing exception that can't catch with neither CDBException nor CException.
Why after that particular record get updated with SQL command, the next record can't update by using Edit() and Update() or ExecuteSQL()?
my code looks like this
<br />
while(!rs.IsEOF())<br />
{<br />
if(recnum==600 || recnum==953 )
rs.MoveNext();<br />
rs.Edit();<br />
rs.field2 = newdata;<br />
rs.Update();<br />
<br />
}<br />
catch(...)
{<br />
CString qstr;<br />
qstr.Format("Update %s set field2=%d where recnum=%d",tablename,newdata,recnum);<br />
rs.m_pDatabase->ExecuteSQL(qstr);<br />
}<br />
<br />
|
|
|
|
|
Does your code fail to update any record, or just the two following rows 600 and 953?
pnpfriend wrote: Error is saying "connection to DB got lost".
Are you sure this is the exact text of the message?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|