|
Consider making it a dialog based app and removing the dialog's caption bar at design time. Then, in the dialog's OnInitDialog() handler call SetWindowPos() to maximize the window and keep it on top of all other windows.
PS: This won't cover the taskbar.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hey Ravi, Thats not a dialog based app..
that s a SDI app.
The returned pointer may be temporary and should not be stored for later use.
|
|
|
|
|
you can do the similar thing for the sdi application too.. in the onCreate event remove the caption style before the frame is created.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
ok lemme try
The returned pointer may be temporary and should not be stored for later use.
|
|
|
|
|
I have implemented 2 threads simulating the counting semaphore. One thread sleeps for 20 milliseconds as in Sleep(20);
The other thread writes the time into a file. When i observe the file, in my System it prints for 50 times/second, which should be the case (20 milliseconds * 50 = 1000 milliseconds = 1second).
In other computers, it writes only 32 times / second in the file.
What could be the problem.?
|
|
|
|
|
that might be beacause windows is not a real-time kernel. so, if an application is running in kernel mode, even if your interrupt signal must call your asynchronous function, that one will have to wait for the process running ends its part.
So, using such functions is not precise if you want your event to process each n seconds. prefer an interrupt handler.
TOXCCT >>> GEII power
|
|
|
|
|
nandha wrote:
What could be the problem.?
That you are relying on Sleep() , and assuming that time is consistent between computers, especially if they are running different OSs. Read this article on why time is not always accurate.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Get source of information, thank you.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Hi,
For SSL Tunneling for HTTP Proxy
connect command is CONNECT www.someaddress.com:5444(port) HTTP/1.0
But wt is the CONNECT command for Socks proxy
plz reply thanx
|
|
|
|
|
Is SSL a layer to, say, winsock or are you using SSL's buildin socket?
Kuphryn
|
|
|
|
|
Hello
I am working on a MFC SDI application.
On My one of the menu i am drawing something with the CDC which is Memory dc and is drawing in a bitmap.
Above mentioned CDC MemDC is global.
Now on Save
I am having two Options
save content of CDC to JPEG and
save as BMP.
Well I am using implementation fo ImageHandler (from Codeguru) so it works fine. With JPEG saving. It does uses the CDC for putting into JPEG image.
Now with BMP saving, previously i was using CDibSectionLite (from Codeguru) using the above Bitmap. I want to use CDC instead because of change in the design.
Is there any other way to save content of DC directly to the Bitmap file
Thanks in advance.
Sandeep
Leave your mark wherever you go
|
|
|
|
|
Hi there,
I'm a bit new to C++, been doing Java for a while now and I was just wondering if there is a way to get the 'Start Button' to appear as an entry in the context menu that appears when you right click on the desktop, if not any suggestions on how I should go about it?
Cheers,
/P/
|
|
|
|
|
First of all, i consider u r familiar with the VC++ IDE.
So, first of all, add a "Resource Script" to ur project. Then insert an MENU into it. Add a few feilds to the menu and give it a "DENTIFIER STRING".
Then to display a CONTEXT MENU u hav 2 write:
IN MFC:
void CMenuTestView::OnRButtonDown(UINT nFlags, CPoint point)
{
CMenu myMenu;
CMenu *ptrMenu;
myMenu.LoadMenu(IDR_MYMENU);
ptrMenu=myMenu.GetSubMenu(0);
ClientToScreen(&point);
ptrMenu->TrackPopupMenu
(
TPM_LEFTALIGN|TPM_RIGHTBUTTON,
point.x,
point.y,
this,
NULL
);
CView::OnRButtonDown(nFlags, point);
}
IN WINDOWS API:
case WM_RBUTTONDOWN:
POINT p;
GetCursorPos(&p);
TrackPopupMenu(GetSubMenu(LoadMenu(gloInst,"MYMENU"),0),
TPM_LEFTALIGN | TPM_LEFTBUTTON,p.x,p.y,0,hwnd,NULL);
break;
...Avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
|
Hi!,
I want to create a read-only view of excel,word or powerpoint file using the ole techonology.
I use the default object handler provided in ole32.dll
I dont know what steps to follow after creating the object using:
hr=CoCreateInstance(clsid,NULL,CLSCTX_INPROC_HANDLER,
IID_IUnknown,(PVOID*)&pUkwn);
the object handler basically implements IDataObject,IOleCache and IViewObject.
IViewObject::Draw will draw on the specified device.
but before that I want to pass data to the object.
which interface shall I use?
thanks
Anshuman
|
|
|
|
|
Im getting this error in a project Im working on, its referencing a .cpp file with function definitions, Im using the same .h & .cpp file on their own just using a main.cpp to test it and it works fine, but when I brought it over to the larger project I get this error:
fatal error C1010: unexpected end of file while looking for precompiled header directive.
I checked the MSDN library and it was of absolutly no help whatsoever, I dont know what it even means. Im using VC7 with win2k.
Cheers
We have a mathematician, a different kind of mathematician, and a statistician!
|
|
|
|
|
arf, i've already seen that error, and i've got abslolutely no idea about its cause.
To avoid that, check Your project settings and disable the precompiled headers... it will work.
if anybody know about the reason this error occurs, let us know !!
TOXCCT >>> GEII power
|
|
|
|
|
put #include "stdafx.h" at the top of the file.
Or, go to project->settings and select the file. Go to C++->Precompiled Headers and set it to "Not using precompiled headers"
|
|
|
|
|
Your larger project is setup to use precompiled headers. This allows you to setup a set of include files that are used through-out your project and have them compiled just once. This is normally done by including the required headers in stdafx.h. Then when compiling the project VC++ expects stdafx.h to be included at the start of each .cpp file.
Just add #include "stdafx.h" to the start of the new .cpp file.
|
|
|
|
|
|
Someone asked me this question this morning - and I didn't have an answer. Can anyone explain why it is bad to use a macro function?
Dylan
|
|
|
|
|
because there is no controle on the parameters passed to it. second reason, we are obliged not to separate the macro name and the opening parenthesis '(' that follow it, which is not very practical.
TOXCCT >>> GEII power
|
|
|
|
|
toxcct wrote:
we are obliged not to separate the macro name and the opening parenthesis
Only in the macro's definition, not its usage.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
ok sorry, it was confused in my mind... but, that was a bit right anyway
thx for the precision...
TOXCCT >>> GEII power
|
|
|
|
|