|
Kitos for the suggestions, but the dialog box doesn't get destroyed until the end of the main routine. The main routine can run for days, that's why I need to interrupt it sometimes. End dialog only happens at the end and then everything appears to terminate normally.
I have experimented with early enddialog and hiding and minimizing the dialog box. You're right, early enddialog leads to unpredictable results. What is also curious and probably related is that when the ok button is clicked, the resulting minimized window also becomes unresponsive, i.e., can't repaint it by clicking on it.
|
|
|
|
|
move ur return LRESULT(0) within the parantheses.It shud work.
|
|
|
|
|
You mean into the prior if statement?
|
|
|
|
|
move the return LRESULT(0) within the brackets.
|
|
|
|
|
The problem is the EndDialog(0) inside your OK button handler. Once EndDialog() is called, the window is destroyed, so any messages that get sent to it are lost, including the ones from the tray icon. Instead of calling EndDialog() , call ShowWindow(SW_HIDE) to merely hide the window without destroying it.
<rant>
Don't you dare offer me a g**** account. If I hear about it one more time I am likely to go insane. Anyone who mentions it should be executed on the spot.
</rant>
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
This solution also makes no changes in the icon behaviour, or anything else.
|
|
|
|
|
void CBotDlg::OnBnClickedOk()
{
//go retrieve web pages and follow links
//til no more links
::Shell_NotifyIcon(NIM_DELETE,&m_nTrayData);
this->EndDialog(0);
}
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
This solution didn't work. Nothing changed at all not better or worse.
|
|
|
|
|
Hian your code has million of problem,i am emailing you a working applictaion based on your code
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
typedef FT_STATUS (WINAPI *PtrToOpen)(PVOID, FT_HANDLE *);
PtrToOpen m_pOpen;
FT_STATUS Open(PVOID);
FT_STATUS CBitBangDemoDlg::Open(PVOID pvDevice)
{
if (!m_pOpen)
{
AfxMessageBox("FT_Open is not valid!");
return FT_INVALID_HANDLE;
}
return (*m_pOpen)(pvDevice, &m_ftHandle );
}
Can someone tell me wat this means.And especially wat that WINAPI is.
reeves.
|
|
|
|
|
In WinDef.h you can see that it can be
#define WINAPI CDECL
or
#define WINAPI __stdcall
or
#define WINAPI
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
It's meant to replace the PASCAL calling convention that was used in 16-bit Windows.
Jeremy Falcon
|
|
|
|
|
Hi everyone,
Is there an IStream like interface that I can use for stream like writing into physical memory. I know there is a MemoryStream class in .NET but I cannot use it for my current needs.
I have a binary file format that is OLE2 storage based. However, I cannot use the IStream interface directly and need an IStream like interface to physical memory.
Thanks,
Sincerely,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
pankajdaga wrote:
Is there an IStream like interface that I can use for stream like writing into physical memory.
No, there is no COM interface for writing to a memory location. Why would you want one?
pankajdaga wrote:
I have a binary file format that is OLE2 storage based. However, I cannot use the IStream interface directly and need an IStream like interface to physical memory.
Are you saying that you have loaded a OLE2 compound file into memory but don't have access to the IStream interface so you want to access the memory directly? That does not sould like a good idea. Why don't you have access to the IStream interface?
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hi,
Thanks for replying.
My problem is that my specifics state that I need to manipulate the data in the memory and should write to disk only on demand. The IStream interface writes to disk and I was wondering if the same functionality could be achieved in the physical store instead of the virtual one.
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
take a look at ILockBytes. i've used it with IStorage to create a memory-based file.
Software | Cleek
|
|
|
|
|
Thanks... I had no idea what he was talking about.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
In an application I'm making I need to use a menu to launch a modal dialog box. I seem to be struggling a bit with this task. How do I do it?!?!
Thanks!
Phillip
|
|
|
|
|
Hm, you handle the menu selection (add a handler with the Class Wizard if you use MSVC++ 6.0 ). In the handler, you declare a variable of the dialog class. Then, you call DoModal on the variable.
|
|
|
|
|
the menu part or the dialog part ?
did you create your dialog ? in the resources and in the code ( generated by the wizard )
did you add the menu item ( in the resources ) ?
did you create an handler for the menu item ? ( can be created from the wizard )
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I've made the menu, made the handler for the menu item, and made the actual dialog box (and a corresponding class). I'm having trouble making an instance of the dialog class and calling DoModal for some reason. It's quite baffling, actually.
Phillip
|
|
|
|
|
#include "MyDialogClass.h"
//...
CXXX::OnSomething()
{
CMyDialogClass dialog;
dialog.DoModal();
}
|
|
|
|
|
Fixed it! Thanks. (I didn't include the header -duh!)
Phillip
|
|
|
|
|
error C2065: 'CDialogRates' : undeclared identifier
It doesn't seem to recognize CDialogRates as a valid class.
Phillip
|
|
|
|
|
I created a service which creates a pipe to communicate with another app. The service starts on boot-up and I telnet into the PC to start the app. The app communicates fine when I telnet over. However, certain people cannot seem to get it to work. I checked the task manager to see if both processes are running; the app and the service. Could the issue be a permission thing?
|
|
|
|