|
Lord Morlock wrote:
One more question, I assume templates are C++, not just MS?
That's correct.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Please help me with this situation that I have. How can I detect which version of Windows is running, that is , is Windows 95, 98 ,2000, ME, XP or NT is running?
Regards
Nashdaq
|
|
|
|
|
Call GetVersionEx() , which fills in a struct with the version numbers and 9x/NT flag. MSDN has a table showing which version corresponds to 95, 98, etc.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
hi i am new to Visual C++.Net.
i am uing a Document Window and it's needed to show some information to user Such as Score.
to aim this i have to Show a Dialog Box and Show this information on it.
i don't know which kind of Dialog box is UseFul for this reason (i mean i use this Dialog box only for Monitoring the information)
i know that i have to Creat a Class for that Dialog and then Creat a Variable of it and set Var.DoModal(); but it's not work can someone help me ?
-=Ehsan-de-Burge=-
|
|
|
|
|
i haven't worked on vs.net but in vc++ vs6.0 we do it like this::
1: add a dialog to the resource.
2: using classwizard add a class to this dialog resource.
3: in initinstance() write
CDialog1 dlg;
dlg.domodal();
4: or whereever you need this code i.e. if yo want to show this dialog at click of an button add this code to the message handler of that button's click event.
that's it.
i hope you get an idea of how to proceed.
cheers..
Himanshu
|
|
|
|
|
thanks for your answer. if i use a Dialog as CDialog Base Class then i can't use this Dialog for Moitoring the information. i want to Use a Dialog for monitoring (so the Focus is always Set on the Main Window and this Dialog never Gets Focus)
may be using Dialog for this reason is wrong. what should i do ?
|
|
|
|
|
my question:
in my app,i want to print some text by a bitmap.and the text is dynamiclly changed when printing .
now i want to do so:
build a temporary bitmap, load the bitmap and text out some text to the
bitmap ,and save bitmap .then if i use ACDSEE to look at the bitmap we can find the text in the bitmap;
but how can i do ?i want to programe a general function;
bool TxtToBitmap(CString &strBmpFile,CString &strOutputText)
then after i use the function ,i want the strBmpFile can include the strOutputText
who can help me?thanks!!
-----------------------------
Mr.Whelk
-----------------------------
Zhuhai City ,Guangdong ,China
|
|
|
|
|
at www.aoi.it, there is cximage (v5.50) with a DrawText method.
|
|
|
|
|
dear all,
i want my mfc dialog based application to detect system shutdown.
is there any way to do it?
thanx
|
|
|
|
|
Handle the WM_ENDSESSION message, you can examine the parameters to tell if it's a shutdown or just the user logging off.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
(hi,
I used following lines of codes::
CString strEdit;
GetWindowText(strEdit);
but it is giving an error as ATL::GetWIndowTextA() cannot convert parameter 1 from Cstring to unsigned short**. But when I type it is asking for a Cstring only.
can anyone help me out!!!!!!!Please...
Himanshu
|
|
|
|
|
The ATL function CWindow::GetWindowText() doesn't work with CString s, since CString is MFC. You need to pass a BSTR or a CComBSTR (easier to use, it handles memory management for you).
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
thanks a lot Mike. It worked.
cheers..
Himanshu
|
|
|
|
|
Hi,
I want to design a 8086 Assembler in VC++ for my college Project. Please tell me which book I should follow to design the Assembler .Please Help me.
|
|
|
|
|
I have a dll that includes a particular header file. In my main application code it too uses the same same header file. When I include the header file for my dll it tries to inclue the header file twice. How do I get the compiler to only include the file if it has not already been loaded?
Example:
DLL.h File -
#include "Myheader.h"
MainApp.h File -
#include "Myheader.h"
#include "DLL.h"
Thanks for the help,
-Eric
|
|
|
|
|
The standard way to prevent multiple inclusion of a header file is to add this in each .h file. This example depicts foo.h.
#ifndef foo_h
#define foo_h
...
#endif
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ok.. I found it.
Needed to use #if !defined and #endif in the header file.
-Eric
|
|
|
|
|
In Myheader.h:
#ifndef MYHEADER_H_INCLUDED
#define MYHEADER_H_INCLUDED
#endif There is also the #pragma once command, however I prefer the #ifdef method so that I can test for the presence of the symbol to tell whether a header has been included.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hi all,
I was wondering...
How can you give the desktop or taskbar the keyboard focus?
I know there is an SetFocus function but that only works for a window that's your app own.
Aidman » over and out
|
|
|
|
|
In the Platform SDK for SetFocus, it includes the following sentence:
By using the AttachThreadInput function, a thread can attach its input processing to another thread. This allows a thread to call SetFocus to set the keyboard focus to a window attached to another thread's message queue.
Which should help you get around the (deliberate) limitation. You could always detach straight after.
Iain.
|
|
|
|
|
But how can I get the Thread handle of the Desktop or Taskbar wich need to attach to?
Aidman » over and out
|
|
|
|
|
GetWindowThreadProcessId should give you the information you need.
Iain.
|
|
|
|
|
I tried to that, but I don't really understand how it is supposed to be done. Must I do this in a callback function or can I do it in the winman? Could you please demonstrate this process in code please?
Aidman » over and out
|
|
|
|
|
I'm using SetTimer() and KillTimer() with the simple WM_TIMER event in my CWnd application.
Given the ID number for a timer which has been set, is there a way to find out how much time is remaining before the next call for that timer?
|
|
|
|
|
No, for two reasons. 1, the timeout you pass to SetTimer() is usually not the same as the actual timeout used by the OS. The actual timeout is always a multiple of a hardware timer (about 55 ms I think on Win 9x). 2, WM_TIMER is posted to your message queue, and it's impossible to predict how much time will elapse before that message is processed.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|