|
|
oshah wrote: Link[^].
Does this work for console applications?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Yes (although I admit that the icon on the title bar just looks too weird for my tastes).
|
|
|
|
|
Hi everyone. anyone know how to setup an OpenGL window in an MFC Dialog ?? The code from steinsoft.net doesnt allow for complex terrain to be displayed inside the window.
Please Help!
Thanks in advance
Aman N
|
|
|
|
|
I think your answer in the example MFC (I think Cube) in the Example MSDN
that this is a square with Opengl
|
|
|
|
|
How to handle shell extensions for 64 bit pc?
-- modified at 5:40 Friday 10th March, 2006
|
|
|
|
|
Mostly recompile your 32-bit shell extension DLL to Win64 (making sure you eliminate all warnings). Crank up the warning level and enable /Wp64 to ensure you eliminate all 64-bit related problems.
Registering the DLL is slightly tougher, so you are recommended to use a setup package to do it for you (I heard that Inno setup was upgraded to support Win64).
|
|
|
|
|
i want to stop timer when mouse enter in the dialog and start timer when mouse leave from dialog.
so i handel NCHITTEXT event and killtimer at this event but now when mouse leave from dialog i want to start timer so how can i do this.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
U an get the mouse leave message if u use the API
TrackMouseEvent()
nave
|
|
|
|
|
Perhaps the WM_MOUSELEAVE will do the trick.
Steve
|
|
|
|
|
THERE IS NO SUCH EVENT
Bankey Khandelwal
Software Engineer
|
|
|
|
|
|
Normally OnkillFocus of dialog is not called when the mouse leaves the dialog. The one way to solve this problem is
First take a member variable of bool type in that dialog.
In constructor set the value of variable false.
in mousemove event check the value of that member variable if it is false then set it true and call SetCapture. and stop timer.
if value of member variable is true then check that coordinates come into point variable lies inside the dialog.if it lies outside the dialog then call ReleaseCapture, Set the value of variable false and start timer.
Basically when you setcpature in a dialog and mouse goes outside the dialog then window sends one WM_MOUSEMOVE message to that dialog with the coordinates lies outside the dialog. With the help of those coordinates you can easily get the mouse is inside the dialog or outside the dialog.
Manish Rastogi
|
|
|
|
|
well.. i am a novice as far as mfc prog is concerned.... so plz help
theres is this dialog class... CServerDlg
whose data i wanted to access from this func
unsigned WINAPI ClientThread(LPVOID threadInfo)
for which i used : CServerDlg *dlg = (CServerDlg *)AfxGetApp();
using this pointer i was accessing the data....
but thers some prob in this..and the app soon terminates.
probably this is not correct way of calling data from CServerDlg class....
plz helo with a solution to this problem
|
|
|
|
|
i suspect you to have set te data members as public inside the dialog box. you loose the use of encapsulation...
i know this doesn't solve your problem, but you could get into troubles later.
consider passing by member functions instead.
|
|
|
|
|
The problem is that AfxGetApp gets a pointer to an CWinApp instance and not a dialog class. You shouldn't be using C-style casts. If you had of used a function style cast as shown below you couldn't have made this mistake as the code wouldn't have compiled:
CServerDlg *dlg = static_cast<CServerDlg*>(AfxGetApp());
If you try to do something impossible, in a perfect world, you should get a compiler error instead of a crash: Switching to function style casts is a positive step in this direction.
In my own code I never use C-style casts.
Steve
|
|
|
|
|
This is the third time you have beaten me to it, and i forgot to mention CServerDlg as well
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Steve
|
|
|
|
|
Using MFC objects in seperate threads is not always a good idea due to nature of the library.
Instead define a struct
struct ThreadData {
};
when you create the thread
ThreadData *pData = new ThreadData;
CreateThread(NULL,0,ThreadFuncName,pData,0,&dwThreadId);
Then in the ThreadFuncName function
...ThreadFuncName(LPVOID lpVoid)
{
ThreadData *pData = (ThreadData*)lpVoid;
return 0;
}
And if u wish to communicate to some windows then use HWND's not CWnd's to send messages
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
hi all
i want to generate the code 39 barcode.i had search on the internet but could not find any algo for making the code 39 bar code any link u people visited or known.
ddd
|
|
|
|
|
|
Don't know much about bar codes but i saw this[^] once
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
How about using a font?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
I want to pass the reference(test) of the interface (ITest) define inside the COM DLL (TestCom.dll) in my application function.Example
GetMerchItemType( TestComLib::ITest &test, int Temp)
However I am facing the following error.
error C2653: 'TestComLib' : is not a class or namespace name
error C2061: syntax error : identifier 'ITest'
Can you please help me resolve this error.
Thanks
-- modified at 3:42 Friday 10th March, 2006
|
|
|
|
|
You have to import the typelib of the testcom.dll into your project.
|
|
|
|