|
WM_INITDIALOG happens when the dialog is about to inialize. i have a function that i want to run after the dialog is inialized.
|
|
|
|
|
I"m not sure about this, but
BOOL m_bFirstPass;
CDialog:CDialog()
{
m_bFirstPass = FALSE;
}
CDialog::OnInitDialog()
{
m_bFirstPass = TRUE;
}
CDialog::OnActivate()
{
if(m_bFirstPass == TRUE)
m_bFirstPass = FALSE;
}
This might work!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi
We have a problem adding message handling functions for Non Dialog Controls in MFC with Visual C++ 7.0.
We cant find a way to do this the easy way. The Class Wizard which existed under 6.0 doesn't exist here, and thru the events in the properties of a class only menu and accelarator IDs are accessible. None of the Buttons from a Toolbar for example is available.
Thanks
Lars
|
|
|
|
|
Well, first of all, in most cases where you have toolbar buttons, you should also have a corresponding menu item, or at least an accelerator. In these cases, the Events property sheet will work. If you absolutely cannot have a menu or accelerator for your button, it is trivial to add the message map entry manually:
ON_COMMAND(Command ID of button, Handler function)
Sometimes i only remember, The days when i was young Nowadays no one remembers when they were young and stupid... ADEMA, The Way You Like It
|
|
|
|
|
Is there any way GDi objects can be trapped,ie Images of the application.At the operating system level,Probably Input output request packet(irp) form the gdi objects,but that would involve hooking the kernel....
Thanks for spending time...
Vineet Sharma
|
|
|
|
|
You can try API Capture. Someone just posted an article on this topic. With this technique you could trap all of the GDI calls from a particular app, change the calls, or just spy on them, it up to you.
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
I know this is the C++ forum, however it was the suggestion of another to post this question here. Suppose someone were writing a "firewall" application that was "watching" or listening for activity over an incoming IP address, what is the best way to cover all ports. In all the examples I have read, someone creates an instance of TcpListener and supplies a port to listen to. Surely you don't have to do that for each of the 65,000+ ports. Could someone lead me in the right direction. I am going to do this in C#, Thanks in advance.
Nick Parker
|
|
|
|
|
OS only uses a predefined number of ports ..even there is more than 64000,like HTTP(80),FTP(21 i think...not sure ) such like...
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
Hi,
I use the htonl() fonction to convert an IP address from "host byte order" to "network byte order" but it does not work, or sometimes it work and sometimes not!!!.
here is the portion of code that i used to display the IP address :
in_addr addr;ip = htonl(ip);// ip is an u_long already initialized
addr.S_un.S_addr = ip;char* dst = inet_ntoa(addr);AfxMessageBox(dst);
what is going wrong ?
|
|
|
|
|
WSAStartup ?
|
|
|
|
|
hi friend
char szHostName[256];
char szIpAddress[256];
WSADATA wsaData;
HOSTENT *pHP;
SOCKADDR_IN myaddr;
myaddr.sin_family = AF_INET;
if (InitialiseSocket(wsaData))
{
gethostname(szHostName,256);
pHP = gethostbyname(szHostName);
memcpy((char FAR *)&(myaddr.sin_addr), pHP->h_addr,pHP->h_length);
wsprintf(szIpAddress,"%d.%d.%d.%d",myaddr.sin_addr.S_un.S_un_b.s_b1,myaddr.sin_addr.S_un.S_un_b.s_b2,myaddr.sin_addr.S_un.S_un_b.s_b3,myaddr.sin_addr.S_un.S_un_b.s_b4);
WSACleanup();
}
i t will solve ur problem..it is easy & cool ....
u will get the IP address in szIpAddress Buffer
try it now..!!
Renjith
Hai Friends me from Pandalam..and i think there is a sofware behind everything...
so enjoy with the codes...
|
|
|
|
|
The snipit of program below should create a table 25*25 with the alphabet in each row(in theory i think.
Dose any body know how i can use that table? i basically want to compare a word entered with that table. But cant seem to do this.
Any code will be very helpful
void CFinal3Dlg::OnBeta()
{
radio_select=2;
//create table
for (row= 0; row<=25; row++)
{
ch='A'+row;
for (col=0; col<=25 ; col++)
{
ch++;
if (ch>'z') ch = 'A';
}
}
// compare entered data with table
{
****
|
|
|
|
|
How do you want to compare a word ? This sounds like a solution looking for a problem to me.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
if you want to compare words you can use strcmp for char type. if you are using cstrings, they have a compare function built-in. note though they are case sensitive.
|
|
|
|
|
Hi there,
I wrote program by VC++ 6.0 on WinXP, and i made the setup disk by InstallShield ...
InstallShield added MFC42.DLL and MSVCRT.DLL to setup project !
When i run the setup disk on Win98SE, Win98SE crashes !!!
And Win98SE shows me error about MSVCRT.DLL error and something about NTDLL.DLL
(Now, i have to re-install Win98)
Hmmm, well i have reply for myself, WinXP is NT based and Win98 is not !
and the MSVCRT.DLL in WinXP is the main reason !
In fact i need the Setup disk for Win2000 Pro ...
I wanna know, Is there any problem later, If i run my setup program on this OS ?
By the way, what is exactly MSVCRT.DLL ?
Please reply about my main question that was about running the setup disk on Win2000 ...
And if you have time, please write some points about making setup disks ...
Thank you very much !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hadi_Rezaie wrote:
By the way, what is exactly MSVCRT.DLL ?
It's the C Runtime. You need, I believe, to install a different one for 9x and for NT based OS's.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
get the service pack 5 of visual studio from microsoft site
|
|
|
|
|
sometimes installing microsoft libs is like playing russian roulette. what i normally do is test my program on differnt os's and take the ms libs from the test pc's i then build a multi os install and install all needed libs that way.
|
|
|
|
|
Anyone knows a good VxD programming tutorial (in C++)?
Thanks
Dominik
|
|
|
|
|
Hi,
I wonder wether it's possible to launch/open an application from my Win32 application and identify when it's closed. I used ShellExecute to open another application from my Win32 application. But, I don't have any control over the newly opened process. So Is there any way to know when newly opened application closes? will CreateProcess() and EnumProcess() API functions any way useful for this? I'll be thankful for any suggestions.
thanks for spending time
|
|
|
|
|
Both CreateProcess() and ShellExecuteEx() return a handle to the new process. Use that handle in a call to WaitFOrSingleObject(). That API will unblock when the process ends.
--Mike--
"Jobs that don't allow you to visit the Lounge 25 times a day at the minimum are not worth having anyway."
-- Nish, 3/28/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
Thanks Mike, My problem solved .
Prasad
|
|
|
|
|
Hello guys
I haven't done too much doc/view stuff before and am now stuck with some doc/view stuff [elementary]
I have some member objects in my CDocument class.
And in my CView class's OnUpdate I use these objects to render my view.
Now my problem is that when I take New from the toolbar or the menu I expect my entire CDocument object to be destroyed and re-instantiated. But to my utmost disappointment I find that this is not so.
Now I have only one option as far as I see :-
In my CDocument's OnNewDocument()
I must manually clean up all the CDocument member objects.
Is this the right way?
Or am I worse than bugs bunny when it comes to doc/view?
Any help is hugely appreciated.
Warm regards
Nish [doc/view newbie]
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
Nish [BusterBoy] wrote:
In my CDocument's OnNewDocument()
I must manually clean up all the CDocument member objects.
Is this the right way?
No,You have to it in
DeleteContents()<br /> .
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Mazdak wrote:
No,You have to it in DeleteContents()
Thanks Mazy. I just discovered that. But what puzzles me quite a bit is the fact that the destructor never gets called. Maybe since this is a heap object [the entire document object in an MFC doc/view app], and since the program is quitting anyway, the MFC guys thought they need not call the destructor.
Peculiar though.
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|