|
What was return value of dwResult ?
|
|
|
|
|
Hi all,
Actually i want to find out that particular path exist or not, for that i am using _accessApi. like this
TCHAR CurrentPath [ MAX_PATH ] ;
GetTempPath(MAX_PATH, CurrentPath);
_tcscat(CurrentPath,_T("$insert\\new folder"));
_access(CurrentPath,NULL);
but compiler is giving this error
error C2664: '_access' : cannot convert parameter 1 from 'TCHAR [260]' to 'const char *'
how could i remove this
|
|
|
|
|
You should use _taccess instead (it is also a macro that doesn't depend if UNICODE is declared or not).
|
|
|
|
|
i am creating a user accound using NetUserAdd api ,
i need to map the user to a group ,only group name is supplied
NetUserSetGroups is used for this ..but i got return value 2200
0x8ac ...Any body have any idea of this ....???
vineesh
|
|
|
|
|
vineeshV wrote: NetUserSetGroups is used for this ..but i got return value 2200
Which equates to NERR_AlreadyLoggedOn . That's odd.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
Incase of Dialog we use DoModal for calling dialog.
anyone can tell me that what can i use for calling formview.
or what can i use in place of OK(), because OK() is not working for formview.
thanks in advance.
|
|
|
|
|
Do you mean formview as in CFormView, in MFC? If so, you let MFC do the heavy lifting. Internally, it will call CreateDialog, etc, but you don't need to worry about that.
To see how it works, make a fresh MFC project using AppWizard, and choose form view as your view type. Then have a look at the CMyApp::InitInstance member function to see how little work you need to do.
Good luck,
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
ThatsMe. wrote: anyone can tell me that what can i use for calling formview.
This imples that you are using either an SDI or an MDI application. Correct?
ThatsMe. wrote: or what can i use in place of OK(), because OK() is not working for formview.
Since an OK button is present, are you wanting a dialog-based application instead?
To mix the two just seems a bit out of the ordinary.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all ,
when i run my application,or click for open any form then it gives this error "Windows has triggered a breakpoint in project.exe.
This may be due to a corruption of the heap, and indicates a bug in project.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information"
how can i remove it please tell me.
thanks in advance.
|
|
|
|
|
It feels like repetition, but anyway, see here[^]
|
|
|
|
|
i checked this but i dont get anything which helps me.
|
|
|
|
|
Well, if you want some help, you'll need to give us much more information than what you gave. Some relevant source code around the crash location, the exact assertion message, which exception is thrown, the callstack details, ...
|
|
|
|
|
hai to all...
am the beginer of vc++, i want to create the new window when press the button. how can i do that any one explain me with some code sample.
Thanks in advance.
Regards
Mani.
|
|
|
|
|
You can use of CreateWindow.
|
|
|
|
|
hai to all...
am the beginer of vc++, i want to create the new window when press the button. how can i do that any one explain me with sompe code sample.
Thanks in advance.
Regards
Mani.
|
|
|
|
|
in which type of window do u want to open.
if u want to open any dialog then simply open by DoModal.
or ther is no need to submit your question again n again.
|
|
|
|
|
Actually i dont know which type is this. Just want to create window with simple controls like button.
I tried with CreateWindow but it returns NULL value for the Handle.
Snap Code :
HWND window=CreateWindow("MyWindow","SampleWindow",WS_VISIBLE|WS_CHILD
,0,0,100,100,this->m_hWnd,NULL,NULL,NULL);
|
|
|
|
|
I think you really need a good book about MFC (are you using MFC ?). Without that you won't even be able to explain your problem (not talking about understanding what we explain to you).
Anyway, if what you need is a dialog box, then design your dialog using the resource editor then associate a class with it. When you want to display it, create an instance of that class and call DoModal on it.
|
|
|
|
|
|
Since you are using the straight Win32 API, suggestions about MFC are inappropriate, so...
When you want to go the old-fashioned route, you need to understand Window Classes first. In order to create a window, Windows needs to know all of the properties of the window you are about to create, such as its background, if it has a menu, icon, cursor, etc. Many of these properties are stored in something called the Window Class.
You must first create, and register a Window Class in order to use it with CreateWindow(...) . Lookup the WNDCLASS structure and the RegisterClass(...) /RegisterClassEx(...) functions for more information.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
If you select the New->Project on Visual Studio IDE and the choose a Win32 application then the IDE will generate the code for you. Have a look at it.
BTW Probably a good tutorial about Win32 programming is needed.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Dear All,
Can anyone tell me, how to write such a program that can transfer files (either binary or text) behind NAT devices( such as for computers behind firewalls and routers and other NAT devices) using TCP socket programming.
I have a mechanism through which the public IP of the router and Port number will be forwarded to me. But after that I am not sure that simple TCP/IP socket programming will suffice or I need to do something more for that.
If you have any article link or article or any example that shows how the File Transfer can be done for such a case then please help me regarding this.
Any sought of help or idea will be appreciated from you all.
from-
Saurabh Srivastava
|
|
|
|
|
Saurabh Srivastava wrote: I have a mechanism through which the public IP of the router and Port number will be forwarded to me. But after that I am not sure that simple TCP/IP socket programming will suffice
If the two endpoints are able to connect with TCP/IP, then yes, simple TCP/IP will suffice.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Saurabh Srivastava wrote: have a mechanism through which the public IP of the router and Port number will be forwarded to me. But after that I am not sure that simple TCP/IP socket programming will suffice or I need to do something more for that.
That should work fine.
One additional comment, if only one host is behind NAT/firewall you don't even need to setup the forwarding. What I mean is the one that isn't can always directly connect to the other, it is just a question of who intialises the TCP connection. But if both hosts are NAT-ed you need to do something more elaborate, possible solutions are: set up forwarding on the router, use a host in the middle that serves as a hub, use UDP hole punching.
Hope it helps.
/M
|
|
|
|
|
Hi All,
Actually I like to represent a timeline visually using VC++ and MFC components. Is it possible to represent the Timeline that is available in Windows Movie Maker using VC++ and MFC? Can anyone give me some tips in creating Timeline(Front Design) visually?
Whether their is any ActiveX components to do this tasks?
Thank You in Advance
With regards
Raja Bose
|
|
|
|