|
The available MSDN documentation is quite clear on the proper methods for setting up a TCP/IP printer connection using the TCPMON Xcv Commands, and I have had reasonable success in this area.
I came up dry when I started looking for information on specifying the IP Port (rather than the "Printer Port") that will be used to send data to a given TCP/IP printer. Certain TCP/IP printers (like HP JetDirect) expose multiple IP ports and one IP address.
Advanced Google searches have returned thousands of false hits on other uses of the word "port" that I am not interested in. Combining the word "port" with the names of printer-setup APIs does not provide any more clarity. Perhaps I need to use another language in which the same word is not used to describe these completely unrelated objects.
|
|
|
|
|
I would like my SDI/CFormView application to be either minimized or maximized but not zoomed. That much I have done.
But how can I get rid of the 'X' on the menu bar that closes the application?
cs.style = WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX ;
|
|
|
|
|
I am not sure you can get rid of it if you have a minimize box. What I do in an app is gray out the box and handle the OnQueryEndSession() message.
BOOL CCommonApp::DisableClose(BOOL bDisable)<br />
{<br />
BOOL retVal = (m_pMainWnd != NULL);<br />
if ( retVal ) {<br />
CMenu* pMenu = m_pMainWnd->GetSystemMenu(FALSE);<br />
if ( pMenu ) {<br />
CMainFrame* pMainFrame = DYNAMIC_DOWNCAST(CMainFrame,m_pMainWnd);<br />
<br />
pMenu->EnableMenuItem(SC_CLOSE,MF_BYCOMMAND | bDisable ? MF_GRAYED : MF_ENABLED); <br />
<br />
}<br />
}<br />
return retVal;<br />
}
John
|
|
|
|
|
Simply get rid of WS_SYSMENU.
|
|
|
|
|
How does one create a resource dll containing only bitmaps? Is it just a normal DLL with only bitmaps in it?
My brain is a bit fuzzy at the moment.
I am the handsome one in the crowd.
|
|
|
|
|
yes, just create a normal win32 DLL, then add a resource file to it. Now add all the bitmaps you want, just like you would with an application.
-- Rocky Dean Pulley
|
|
|
|
|
Thanks.
Winter and what the cold does to the brain!!!!
I am the handsome one in the crowd.
|
|
|
|
|
You might also wish to alter your build settings such that debug information isn't linked in, and there is no entry point generated (/NOENTRY linker option). May as well make it as light as possible...
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades.
I don't know what you thought; I'm not your astronaut...
|
|
|
|
|
Hey guys
My app has a mem leak which results from ExitInstance() not being called when I terminate the program.
I have traced into MFC and descovered that in the THRDCORE.cpp file, the following code is causing ExitInstance() to NOT be called.
==============================================================
// phase2: pump messages while available
do
{
// pump message, but quit on WM_QUIT
if (!PumpMessage())
return ExitInstance();
==============================================================
Does anybody know what some of causes of pumpMessage() to return true??
Thanks George
George W
Software Developer
www.zsystems.ca
|
|
|
|
|
If your message pump processes a WM_QUIT, then the GetMessage returns false.
Per MSDN ---
"What Is WM_QUIT?
Normal message-processing loops in an application's WinMain routine usually exit when the GetMessage function returns a FALSE value. Internally, if GetMessage is about to return a WM_QUIT message, it returns FALSE instead of TRUE even though the message returned in the MSG structure (a WM_QUIT message) is valid. The only time GetMessage will ever return a FALSE value is when it is returning a WM_QUIT message. Conversely, PeekMessage returns WM_QUIT messages as it would any other message. Applications that use PeekMessage in their main message-processing loop must explicitly look for the WM_QUIT message.
The PostQuitMessage function does not actually post a WM_QUIT message to the application's task queue. Instead, it sets a flag that is tested inside GetMessage and PeekMessage. WM_QUIT is returned when GetMessage or PeekMessage detects that this flag is set and no other messages or events are pending for the application."
|
|
|
|
|
That is pure GOLD!
Thank you....I have been struggling with this problem for a while.
I knew exactly where to look as soon as I read that.
Problem fixed!
Thanks again
IGeorgeI
George W
Software Developer
www.zsystems.ca
|
|
|
|
|
I tried build Setup project in Visual Studio
Everything works ok, but I am not able to find
how to do some features.
I need to Setup ask user for system reboot after install
...it should be there, but where?
And I am not sure if it is there but i need Uninstall part
delete whole folder
(program during its lifetime create files and after uninstal
these files are not deleted)
Does anyone know how to solve this?
Thank you
viliam
|
|
|
|
|
Hi,
I have a really annoying problem. When I build my application (which is quite large), the build succeeds and I press F5 to start debugging it, Visual Studio .NET 2003 always gives me this MessageBox:
These project configuration(s) are out of date:
ApplicationName - Debug Win32
Would you like to build them?
If I select Yes, the resources are rebuilt but nothing else. There are multiple resource files in this project BTW. Has this happened to anyone and are there any solutions?
Best regards,
Daniel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Check the modified dates of your .rc files and any external graphics (.bmp, .ico, etc.). One of those files probably has a date that's in the future.
--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Thanks for the suggestion Mike, however I can't find any resource file with modified date in the future. Any other ideas?
Best regards,
Daniel
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Try using 'touch' i.e. http://www.codeproject.com/file/timestamp.asp to change the time stamp to now of all the files, including any that may be in directories other than the project directory.
If that fails do you have a macro running during compilation that changes a file?
i had a similar problem during Windows 3.1 days when the files existed on a server, I never figured it out!
Good luck.
"An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr
|
|
|
|
|
I had the same problem once. It was because my computer's date was set to the wrong year.
Kevin Shaffer
kshaff03@msn.com
|
|
|
|
|
Hi, i have got 1 question.
i am searching for an application, that works as a nt service. this programm must be a server which replies to a client.
for example the server works as a service and i type in my client "1", then the server reboots the computer. i know that you must write some privilegs, can someone help me ? I am a noob in this section and dont wanna waste all my time on this exercise. i just wanna have the source codes or examples
i dont find correct tuts here, because they doesnt work at all. i have studio .NET 2003 with C++ in it. please help me.
THX
|
|
|
|
|
Hi,
im trying to write a function in C++ which will create a virtual directory in IIS 5.0. Can anyone offer some assistance, I am new to programmatically dealing with IIS.
Kind regards,
BMK.
|
|
|
|
|
Communicate with the IIS ADMIN COM object, or execute windows scripting (VBScript) to create them. See this in MSDN - Internet Information Server Technical Articles : Automating Web Site Administration Using IIS
|
|
|
|
|
Thanks Blake, I had a look at the stuff on msdn previously and understand how to create virtual directories from the command line and using VBScript, but there does not seem to be any samples or snippets of C++ code which can create virtual directories without the need to go near VBScript or the command line... ?? Do you know where I could see sample C++ code alone which creates Virtual directories in IIS?
|
|
|
|
|
Something weird is happening with my 3d apps.
I've downloaded some 2d/3d tutorials (like drunken hyena). Now, when I run the already compiled executables that come with them, I get a framerate well over 200 and text is rendered just fine. But after recompiling it myself (without changing anything to the code or project settings), framerate drops to 60 and some glitches appear when rendering text.
Anyone knows what's going on here?
btw: interval=D3DPRESENT_INTERVAL_IMMEDIATE
dx9.0c release
using: [VISUAL STUDIO .NET] [WINXP PRO SP2]
|
|
|
|
|
Are you compiling the project in release or debug mode?
-- Rocky Dean Pulley
|
|
|
|
|
dx9.0c release
release or debug, doesn't matter, same problem.
60 is the default rate, though, but I clearly state D3DPRESENT_INTERVAL_IMMEDIATE as presentation interval.
using: [VISUAL STUDIO .NET] [WINXP PRO SP2]
|
|
|
|
|
Since the downloaded executables run fine on your system, it doesn't sound like a driver problem, so we can eliminate that from consideration. So the prime candidate is the build step itself.
When you build the apps, is there a radical difference in the sizes of the executables that you build vs. the size of the downloaded executables? It may be that when you link, you're unknowingly linking with the DirectX Debug libraries.
Although it seems that you've addressed this issue, it may not be the case. This is independent of your main Source File project settings, and has to be manually configured under the Link tab in the Project Settings. So even if your project is built in Release mode, this doesn't guarantee that you're linking with the DirectX Release libraries.
The executable file sizes should be the telltale sign of which DirectX libraries you're linking with.
Also, as a side note, the PresentationInterval is a device capability, not something you can set explicitly. You may be thinking of the SWAPEFFECT presentation parameter used when creating a 3D Device.
Bob Ciora
|
|
|
|