|
hi,
i was trying to create irregular shaped figures on the desktop,i was able to do that in winnt using
HWND hwnd = ::FindWindow("Progman","Program Manager");
HRGN hrgn = createrectrgn(10,10,100,100);
::setwindowrgn(hwnd,rgn,TRUE);
& it worked fine ,but in the case of win98 the setwindowrgn always returns 0,so i changed the setwindowrgn to a MFC call it returns success but no desired results are seen.
And after all now iam confused over Createrectrgn about what it returns.It is said that it returns the handle to the region ,but is it region on the desktop or current.
I am really lost and confused.
any suggestions will be really helpful.
thanx in advance
regards
udaykumar
|
|
|
|
|
You should be able to get at the desktop window by calling GetDesktopWindow() or CWnd::GetDesktopWindow() . This should work across all (non-embedded) versions of Windows.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi guys
Long time ago, I had a problem to manage keyboard in a CFormview and I solved using accelerators.
Now I have another one.
When I open a dialog from the CFormview (the old one with accelerators) of my SDI app, I don't know how to manage the keyboard inside it. OnKeyDown doesnt't works.
There is a way to perform the same or similar accelerator's solution?
There is a way to have accelerators for each dialog that I open?
How can I do this?
Thanks in forwarding.
Doc
|
|
|
|
|
|
How can the sub item editing be handled for a list created at runtime.
laiju
|
|
|
|
|
push((v, (holder1<void* Class::*>){i->standard}));
I get the following compiler error:
<br />
error C2958: the left parenthesis '(' found at '\class\class.hpp(148)' was not matched correctly
|
|
|
|
|
I don't know why this forum software keeps stripping my code.. The following is hopefuly the code as I meant to post it originally:
<code>push((v, (holder1<void* Class::*>){i->standard}));</code>
|
|
|
|
|
I have to develop a product for Windows XP using VC++.Net with the following features:
1. It has a installer file. After running the installer file, a connection will be created in \My Network Places
2. Double click the connection, a dialog will be shown to type a username and password in. The typed username and password will be used to authenticate to connect to another computer using 802.1x
After authenticating, my computer will be connected to the other computer.
Any one know what steps I should do to implement this product? Does Windows XP provides API to create a connection with 802.1x authentication or I have to develop a 802.1x client?
I really need your advice.
Thank you very much
|
|
|
|
|
i use windows media sdk ....but i dont know how to get interface ....i want get IWMPMedia's Method ...teach me....
|
|
|
|
|
I am not a COM expert by any means, but you might find your answer in one of the articles at http://www.codeproject.com/com/#Beginners[^]
I do not know why people have voted your query down without answering it. If you don't know the answer, ignore the question. If the answer is so simple to you then give a pointer, don't vote the query down. Remember, the only stupid question is the one that is never asked.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I'm using WinXP+sp2 and .NET 2003
when i compiled a cpp file including the following line:
#include "Winhttp.h"
however the compiler can not find the file "Winhttp.h".
where can I get it?
|
|
|
|
|
|
thanks ,i got it
|
|
|
|
|
I am having problems compiling an app that simply includes the following template definition, any idea why?:
<br />
template<> struct get<SQInteger> <br />
{<br />
inline static SQInteger from(HSQUIRRELVM v, int idx)<br />
{<br />
SQInteger p;<br />
if (SQ_FAILED( sq_getinteger (v, idx, &p) )) throw exception(v);<br />
return p; <br />
}<br />
};<br />
Here is the error I'm getting from VS.NET 2003
<br />
\primitives.hpp(18) : error C2143: syntax error : missing ';' before '<'<br />
\primitives.hpp(18) : error C2913: explicit specialization; 'squadd::types::get' is not a specialization of a class template<br />
\primitives.hpp(18) : error C2059: syntax error : '<'<br />
\primitives.hpp(19) : error C2143: syntax error : missing ';' before '{'<br />
\primitives.hpp(19) : error C2447: '{' : missing function header (old-style formal list?)<br />
|
|
|
|
|
Actually I pasted that in wrong, this is the specialization that is causing me problems:
template<> struct get<sqinteger>
{
inline static SQInteger from(HSQUIRRELVM v, int idx)
{
SQInteger p;
if (SQ_FAILED( sq_getinteger (v, idx, &p) )) throw exception(v);
return p;
}
};
|
|
|
|
|
A little more context is need to provide a sure answer, but I'll try my luck. I understand you're specializing a previously defined class template named get , right? If so, please check that the general definition of get is included before the specialization. Additionally, the syntax for a full specialization like yours (assumming you're specializing on HSQUIRRELVM ) is:
template<> get <HSQUIRRELVM>
{
...
} Does this help?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
Alright so, I have this server, but I want to know the IP address of the client BEFORE I accept the connection...I have a feeling I might need to gain this from the communications layer, but I don't know how, or if there is a winsock function that would help me with this...been trying to just find the damn thing for hours now. Someone please advise?
|
|
|
|
|
I think the client's address is present in the SOCKADDR passed to CAsyncSocket::Accept() . See this[^] MSDN link.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Unfortunately, I need the IP address before I make the accept call, the pointer passed to accept is used to store the ip address upon accepting the request. Also, I need to figure out how to simply ignore clients...that is if an IP address attempts to connect, I send them nothing, not even a SYN_ACK packet(which is what I assume accept does)
Using TCP/IP protocol btw.
|
|
|
|
|
Try ::WSAAccept().
It allows you to specify a callback function that determines if the accept should succeed or fail.
The callback receives information about the connecting entity.
[EDIT]
I also found this article:
http://www.windowsitpro.com/Articles/Print.cfm?ArticleID=9632[^]
[/EDIT]
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Thanks a big fat ton! So, now my issue is specifying that callback function, would you happen to know how to do this...when it says use this prototype, I try making the function body, but get syntax errors etc...But I'll keep tinkering with it, if you have any pointers let me know! (get it pointers...)
|
|
|
|
|
What errors ?
I've never used it - i generall use AcceptEx with IOCP.
Without the ability to use it in an overlapped manner you will be limiting the scaleability of your server app.
I do find it interesting though, i'm going to add it as an option to my server code.
I'll let you know how it goes.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I'm actually fairly green in terms of Programming with winsock, and using intermediate programming steps such as these. Basically, I'm not rightly sure how to set up the callback function, or ANY callback function....
I'm thinking I'm getting a little warmer, do I just add:
int CALLBACK EXPORT WSAAccept()::ConditionFunc(IN LPWSABUF lpCallerId,
IN LPWSABUF lpCallerData,
IN OUT LPQOS lpSQOS,
IN OUT LPQOS lpGQOS,
IN LPWSABUF lpCalleeId,
OUT LPWSABUF lpCalleeData,
OUT GROUP FAR *g,
IN DWORD_PTR dwCallbackData)
{
//condition code
}
And that should work? I basically add this just like a normal function right now...to the tail end of my code getting a few syntax errors:
error C2061: syntax error : identifier 'WSAAccept'
error C2059: syntax error : ';'
error C2059: syntax error : ':'
Again, Callback functions are a fairly new concept for me, as is about everything to do with winsock
|
|
|
|
|
You're a little off there.
More like:
int CALLBACK ConditionFunc(
IN LPWSABUF lpCallerId,
IN LPWSABUF lpCallerData,
IN OUT LPQOS lpSQOS,
IN OUT LPQOS lpGQOS,
IN LPWSABUF lpCalleeId,
OUT LPWSABUF lpCalleeData,
OUT GROUP FAR *g,
IN DWORD_PTR dwCallbackData
) {
// condition code
}
...
SOCKET sockListen,
sockClient;
SOCKADDR_STORAGE addrClient;
int addrLen = sizeof(addrClient);
...
// MyData may be a structure or could be 'this' is called within a class
// it is passed unmodified as dwCallbackData in ConditionFunc
sockClient = WSAAccept(sockListen, &addrClient, &addrLen, ConditionFunc, &MyData);
...
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Thanks again, I'm stumbling through this, though now I'm getting some very disconcerting warnings:
warning C4113: 'int (__stdcall *)(struct _WSABUF *,struct _WSABUF *,struct _QualityOfService *,struct _QualityOfService *,struct _WSABUF *,struct _WSABUF *,unsigned int *)' differs in paramet
er lists from 'int (__stdcall *)(struct _WSABUF *,struct _WSABUF *,struct _QualityOfService *,struct _QualityOfService *,struct _WSABUF *,struct _WSABUF *,unsigned int *,unsigned long )'
warning C4047: 'function' : 'unsigned long ' differs in levels of indirection from 'void *'
warning C4024: 'WSAAccept' : different types for formal and actual parameter 5
And my WSAAccept call is
socketClient = WSAAccept(listenSocket, (LPSOCKADDR)&SockAddr, &nLen,ConditionFunc,NULL);
Don't really care about the data at the moment, but it does build and link, so I'm not sure of the implications on the execution yet
oh and the
IN DWORD_PTR dwCallbackData
Had to be removed from the parameter listfor some strange reason otherwise I would get....
error C2146: syntax error : missing ')' before identifier 'dwCallbackData'
error C2081: 'DWORD_PTR' : name in formal parameter list illegal
error C2061: syntax error : identifier 'dwCallbackData'
error C2059: syntax error : ';'
error C2059: syntax error : ')'
error C2449: found '{' at file scope (missing function header?)
error C2059: syntax error : '}'
Thanks a lot, I really appreciate your effort...
|
|
|
|
|