|
Ok,
thanks for your answer.
But could you be more precise regarding wich files I have to include or wich SDK I have to install cause I can't compile your code.
Also, I tried to find the COM object of MSN Messenger but with no success!
Regards!
|
|
|
|
|
|
Thanks very much for your precious help. I think I'll send a post to codeproject in order to publish a little class to instant message someone through MSN MESSENGER.
Regards.
Octopussy
|
|
|
|
|
I'm trying to create an MDI application to play around with OpenGL. I'm using the instructions at this link
http://www.codeproject.com/opengl/glenabledview.asp
under where it says:
Use
This article uses the trackball code introduced in the companion article A virtual trackball rotation controller .
To start experimenting OpenGL drawing you just need to follow these steps:
But its not working for me. Can someone possibly give me more elaborate instructions, I'm not sure what I'm doing wrong.
|
|
|
|
|
I didn't see it ,but it is better put message there,so author will help you.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
If somebody have sourse for transformation registry in win9x or win2k in txt format... please help me... I need it very much...
|
|
|
|
|
|
try this one :
regedit.exe /e "%temp%\reg.txt" "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
it's ugly but it's works..
|
|
|
|
|
Does anybody have an example how to use the 'IUserNotification' Interface ?
thanx
|
|
|
|
|
I want to prevent users from resizing certain columns in a ListCtrl (like MS Outlook prevents the Attachments column in the inbox).
How can I prevent it?
TIA and regards
Andrew Hirst
|
|
|
|
|
|
I was working on one of my projects and faced this problem:
I got a function that receives a LPTSTR parameter. This parameter can be a string, representing a file, or a resource (result of the MAKEINTRESOURCE).
It´s something like this:
void (LPTSTR lpszFile)
{
DWORD dwSize = strlen(lpszFile);
}
The problem is that if this string is the result of the MAKEINTRESOURCE macro, it´s not REALLY a string... it´s an resource ID. If I call strlen with this as a paremeter I´ll get a Access Violation.
The question is, how can I figure out if a string is a string or a resource Id ? I find a MACRO in MSDN docs called IS_INTRESOURCE but I tried to use it and it states that this macro is not defined. I checked the winuser.h and it´s not there. I don´t use the latest version of Plataform SDK, but I assume that this macro is defined there. Can someone gimme the definition of this macro or some other way to figure out if the string is really a string ?
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
|
|
|
|
|
Seen as a DWORD , an ID fake LPTSTR has its high order word set to zero:
inline bool is_resource_string(LPCTSTR lpctstr)
{
return (reinterpret_cast<DWORD>(lpctstr)&0xFFFF0000U)==0;
} (sort of, didn't try this).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Mauricio
MAKEINTRESOURCE returns a LPTSTR. But it should only be passed to resource functions. The best thing would be to re-prototype your function as :-
void blah(LPTSTR lpszFile,BOOL IsResource)
{
if(!IsResource)
{
DWORD dwSize = strlen(lpszFile);
}
}
My most recent CP article :-
A newbie's elementary guide to spawning processes
www.busterboy.org
|
|
|
|
|
Nish [BusterBoy] wrote:
MAKEINTRESOURCE returns a LPTSTR. But it should only be passed to resource functions. The best thing would be to re-prototype your function as :-
That´s the solution I found... but that macro could be really usefull.
Tks Nish
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
|
|
|
|
|
Hi,
Is there a "right" way for me to communicate with a CWinThread object???
My new, UI threaded smtp daemon now works like the following:
1. Primary thread has listening socket. In OnAccept(), I use a plain CAsyncSocket object to accept the new connection. I then detach this object from the socket in order to get the SOCKET of the connected socket.
2. Still in OnAccept, a AfxBeginThread a new instance of my CWinThread derived class. I set a member of this object to the SOCKET identifier i received on the Detach().
3. In my CWinThread classes initinstance(), i attach a member socket to the SOCKET i just shoved into the class.
Suprisingly, this seems to work. CWinThread's InitInstance doesn't seem to get called until after my OnAccept function has returned, hence the SOCKET handle in the CWinThread class is valid. But, it strikes me that this is pure fluke, the CWinThread could init itself at any time.
I thought about using a MUTEX to block the new threads execution in InitInstance, and release the mutex from the OnAccept function when i had finished detaching. But this seems crap too, since I'd have to use a named Mutex, because I cannot pass a handle to the CWinthread for the same reasons I can't get it a SOCKET.
Is there a better way to set up this object? An ideal way I think would be to have an overloaded constructor in the CWinThread derived class. But I *think* I can't do this becuase the class is dynamically created with RUNTIME_CLASS. Or is there a way to pass arguments to an overloaded constructor with dynamic creation????
Thanks
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
A safe way to perform object transfer is to create the thread with flag CREATE_SUSPENDED , do the transfer and then call CWinThread::ResumeThread .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Perfect!
That is ideal, thanks again Joaquin
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Dear Fellow Programmers,
I have managed to implement the Drag/Drop mechanism. I have also been able to implement a toolbar from which bitmaps can be dragged.
However when I drag the bitmap image over the container window it is unable to drop (it just stays attached to the cursor) when the button is released (On LButtonUp) the bitmap doesn't stay on the screen - it disappears.
I think i need to implement some sort of method in either the OnDraw or OnLButtonUp member functions - and this where the problem really starts!!!.
Can anyone tell me whats going wrong?
|
|
|
|
|
I'm trying to simulate key presses with SendInput. I've discovered that if the string I'm simulating contains 2 or more consecutive identical characters, only one of them appears.
Any ideas?
Thanks!
|
|
|
|
|
This is a stupid question, I know I can use EnumChildWindows () but isn't there a simplier way to do it ? Quick tip please.
Tx.
|
|
|
|
|
Why not just use GetWindow(GW_CHILD) on the mdiframe window, then call GetWindow(GW_HWNDNEXT) for all of its siblings which should be MDI children as well. This should be a small loop.
|
|
|
|
|
Hi all,
I used a ActiveX in my program, one of method in ActiveX appear a MessageBox, i wanna send a message for closing that ...
I wrote it after using of the method:
m_Control.Method() // MessageBox() appeared !
SendMessage( WM_KEYDOWN, 13, 0 );
But it doesn't work, how can do that ?
HELP ME
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
You will not be able to do it from the same thread that you called message box from unless you hook the creation of the message box and subclass the message box, because MessageBox is a modal function. The processing from the message box function will not continue until the Message box window is closed..
|
|
|
|
|