|
I replaced "hwnd" with the handle of the window I want to bring to the top but it gives me a compiler error:
error C2661: 'SetWindowPos' : no overloaded function takes 7 parameters
|
|
|
|
|
|
if you use CWnd/CWindow member function SetWindowPos, it receives six parameters, without hwnd, since it is implied, so you must ommit it.
Version with seven parameters is an API function so you must prefix it with global scope operator:
::SetWindowPos(hwnd, ...)
|
|
|
|
|
how to insert a toolbar into windows taskbar like Windows Media Player 9 does?
when you minimize it a mini player toolbar is shown in the taskbar.
|
|
|
|
|
What you want is a "DeskBand". Google for it or search CodeProject, there are enough examples here
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Respected sir,
i am getting an error: "BK1506: can not open debug\stdafx.sbr"
"error executin c1.exe"
i am getting this type of error in each and every vc++ program whenever i try to compile any program.
I can not find the solution,please help me.
please give me some useful suggestions.
It is urgent.
Thank you.
|
|
|
|
|
This is what microsoft had to say about your problem:
BSCMAKE Error BK1506
cannot open file 'filename' [: reason]
BSCMAKE could not open the given file. This message may be followed by a message from the operating system, giving additional information.
One of the following may have occurred:
The file was locked by another process. If reason was Permission denied, the browser in the development environment might be using the file. Close the Browse window and repeat the build.
The disk was full.
A hardware error occurred.
The specified output file had the same name as an existing subdirectory.
It is impossible to reason someone out of a belief if they were never reasoned into it.
|
|
|
|
|
Hi Folk,
I would like to know where it's possible to know some example of application that uses the IMAPI method.
I'd like to integrate the possibility to burn data on CD in my application.
Each suggest or internet link is welcome.
Thanks in advance.
Andrea;P
|
|
|
|
|
Hello,
I need a MFC component to select multiple folders using a CFileDialog-like dialog. I found tons of wrappers but none of them allow me to select multiple folders. I wonder if such a component exist or do I have to develop it by myself ?
Maybe there's a good MFC components library out there that supports such a great feature. My ideal component is like the Kazaa one, you select folders from a Explorer tree view, each folder name is prefixed by a check box. This way you can select folders from all around your network disks and local hds. Thing you can't do with CFileDialog. However such a component sound very hard to develop as I can't figure out to use the default ShellBrowser component. I would only have to hook its treeview and set its checkbox attribute to true... So easy
Last but not least, as I don't think such a "free" component exists (not found on codeproject nor codeguru), would you be interested by such a component ?
Kind regards,
JM
Web: http://goa.ifrance.com
|
|
|
|
|
created an SDI application, made a Dialog , Connected to the Database using ADO, retrieved the data in CString, but they are not shown in Dialog (Edit Box), I tried UpdateData(), nothing
How to do this?
|
|
|
|
|
Exceter wrote:
retrieved the data in CString
I suppose this is the CString from the edit box ?
Exceter wrote:
I tried UpdateData(),
Did you try UpdateData(TRUE) or UpdateData(FALSE) ?
~RaGE();
|
|
|
|
|
I tried both of them
UpdateData(TRUE) and UpdateData(FALSE)
my CString (CString MyStr) object is of EditBox.
I checked the MyStr with AfxMessageBox, it catches the data
|
|
|
|
|
Exceter wrote:
I checked the MyStr with AfxMessageBox, it catches the data
very odd ... well I'm not 100% sure about it since I always work with controls, never with straight values, but UpdateData(FALSE) should have done it.
Try to create a control member data m_EditBox with the class wizard, and set the text with m_EditBox.SetWindowText(MyStr); . If it is still not updating it, then the display refreshing must hang in another part of your code. (You could also first try a RedrawWindow() after the UpdateData(FALSE) ).
~RaGE();
|
|
|
|
|
Hi, everyone!
I want to developing a new protocol based on IP using raw
socket on windows platform. And I also want to developing
a server and a client using the protocol. I simply want to
define the a new header field of the protocol.
I have referred some materials about how to use raw socket on
windows. But they almost deal with writing a ICMP package. They
have not covered how to develop a new protocol.
Where can I find some materials about how to developing a new
protocol based on IP? Are there some tutorial on this topic?
Thanks in advance,
George
|
|
|
|
|
Check the Raw IP Networking FAQ at http://www.whitefang.com/rin/
PS: Perhaps consider reusing one of the common IP "wrappers" TCP or UDP, while TCP is great for reliability, maybe you could like UDPs approach? However, TCP and UDP provide a lot... I recommend reading 'Effective TCP/IP Programming' from Jon Snader.
|
|
|
|
|
Thanks, Moak buddie!
I think your suggestions are reasonable. And I think
I can use TCP plus RAW socket to resolve my trouble.
Now I meet a new trouble. I have found many sample
codes about how to send raw socket from client. But
I have not found how to write a server that can receive
raw socket from client and write back raw socket. Can
you tell me where can I find the sample codes?
regards,
George
|
|
|
|
|
Hmm, I think there are some ways, but I have to ask - Why to do it with so complicated way?
At first, you will be limited to W2K+ (and of course un*xes), at second the app will must run under the administrative account...
I don't see the benefit of developing a completelly new transfer protocol. I'm also afraid that the amount of code required to achieve that goal will be much higher than the whole rest of the application (client + server).
If you need fast transfers, but don't need to have it reliable - use UDP, if you need that all your data will be delivered and delivered in order, here TCP does it's job.
If you need just attach some your data to the packet use the Options part of the UDP/TCP headers...
But maybe there are benefits I do not see, then pls, try to explain it shortly.
|
|
|
|
|
Thanks, geo_m buddie!
I think your suggestions are reasonable. And I think
I can use TCP plus RAW socket to resolve my trouble.
Now I meet a new trouble. I have found many sample
codes about how to send raw socket from client. But
I have not found how to write a server that can receive
raw socket from client and write back raw socket. Can
you tell me where can I find the sample codes?
regards,
George
|
|
|
|
|
Hey Friends
Can Someone Suggest How To Format VARIANT VT_DATE to MM/DD/YYYY fixed format independent of System Settings ,without Using MFC.
|
|
|
|
|
Must be something like this:
SYSTEMTIME st;
VariantTimeToSystemTime(v.date, &st);
TCHAR szDate[12];
wsprintf(szDate, _T("%02d/%02d/%d"), st.wMonth, st.wDay, st.wYear);
rechi
|
|
|
|
|
Thanks
I was Looking Exactly For The Same
Thanks Again
|
|
|
|
|
hi mates;
look at here at first :
//stripdec.h
#pragma once
#ifndef ipaddressing_strIPdec
#define ipaddressing_strIPdec
#include "stdafx.h"
using namespace std;
using std::string;
typedef unsigned long ulong;
// strIPDec in order to deploying A.B.C.D strandard IP address from plain
// string a.b.c.d
namespace stripdec
{
class StrIPGet
{
public :
StrIPGet();//constructor
string get();//getting input string a.b.c.d
void findindex();//finding index of each '.' in the string
void setseg();//now we have A.B.C.D which each segemnt is in digit form.
private:
string _inputstr;
short inpindex[3];
string segment[4];
};
class StrToDec
{
public:
ulong conv(string& _segstr);
};
}
//
#endif
////////////////
//stripdec.cpp
// strIPdec.cpp : Defines the entry point for the DLL application.
//
#include "stripdec.h"
#include "stdafx.h"
using namespace std;
using namespace stripdec;
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
//start
//------------------------------------------
string StrIPGet::get()
{
int count=0;
do
{
getline(cin,_inputstr,' ');
int j = _inputstr.find('.');
// While not at the end of the string:
while(j != _inputstr.npos)
{
count++
//find the next '.'
j = _inputstr.find('.', j);
}
if (count != 3)cout<<"invalid IP address ,try again."<<"\n";
}
while (count != 3)
//input is plain a.b.c.d along with error recovery.
}
//------------------------------------------
StrIPGet::StrIPGet()
{
inputstr.clear();//init...clearing an input string
}
//------------------------------------------
void StrIPGet::findindex()
{
for(j=0;j<=2;j++)
{
inpindex[j]=_inputstr.find('.',j);
}
}
//-------------------------------------------
void StrIPGet::setseg()
{
segment[0]=_inputstr.substr(0,inpindex[0]-0);
segment[1]=_inputstr.substr(inpindex[0],inpindex[1]-inpindex[0]);
segment[2]=_inputstr.substr(inpindex[1],inpindex[2]-inpindex[1]);
segment[3]=_inputstr.substr(inpindex[2],input.end-inpindex[2]);
}
//-------------------------------------------
ulong StrToDec::conv(string& _segstr)
{
return strtoul(_segstr);
}
errors :
/////////////////////
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(25): error C2065: '_inputstr' : undeclared identifier
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(26): error C2228: left of '.find' must have class/struct/union type
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(28): error C2228: left of '.npos' must have class/struct/union type
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(19): error C2653: 'StrIPGet' : is not a class or namespace name
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(5): error C2859: e:\codes\ip_addressing_solution\april11 ,2003\stripdec\debug\vc70.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(7): error C2871: 'stripdec' : a namespace with this name does not exist
e:\codes\IP_Addressing_solution\April11 ,2003\strIPdec\stripdec.cpp(28): fatal error C1903: unable to recover from previous error(s); stopping compilation
//////
so what is the problem here;
thank u for u'r comments;
bye;
|
|
|
|
|
Probably in strIPdec.cpp you should have
#include "stdafx.h"
#include "stripdec.h"
rechi
|
|
|
|
|
hey do anyone know how to sniff outgoing packets in a system, and do anyone have dnsapi.lib . if so i would be pleased
|
|
|
|