|
That did it!!
muchas gracias!
|
|
|
|
|
Dear All..
I am going to work on build an SMSC (Short Message Service Centers) application (SMS Connector to GSM Server) and i am new with dealing this subject in vc++, i make my own research on this field but i had good idea about the hole process of SMSC but i still need technical information so if there is any one had been worked on something like that to help me with this application or if anyone know web site i can use to guide me in that i will be grateful..
Best Regards,
Rasha
|
|
|
|
|
ask this on the Mobile/eMbedded forum
TOXCCT >>> GEII power
|
|
|
|
|
|
Ok, this is a bit odd to explain, I am trying to create a dialog class that is essentially modal only, and that is dismissed when the user clicks outside of the dialog window.
Furthermore, this dialog can display subdialogs with these same properties. So clicking outside of all nested dialog will dismiss all of them, while clicking on some parent dialog will only dismiss that dialog's subdialogs.
I am a bit lost of as to how to go about implementing this behavior, I have formulated a couple vague solutions using Hooks, CSubclassWnd, or regular messages. None of these are quite there, I think I am missing some key elements.
Any suggestions as to how one should go about this?
Much appreciation,
Jon
|
|
|
|
|
jonathanleebrown wrote:
I am trying to create a dialog...that is dismissed when the user clicks outside of the dialog window.
Is this really your intent? If so, it goes against how most folks perceive a dialog to behave.
What if someone is filling in the blanks on the dialog, but needs to open up another application to find something?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
This is indeed a valid concern, certainly a impediment to the general applicability of this design.
Though this class has to be general enough to use in a few different contexts, the primary usage is selecting options via listboxes, buttons, etc.
|
|
|
|
|
jonathanleebrown wrote:
...the primary usage is selecting options via listboxes, buttons, etc.
Ok, that's what dialog boxes do anyway. So why make it go away when it loses focus?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Below is the rationale for this design, perhaps you can think of a more appropriate way to offer the characteristics described there?
BTW, thanks for the discussion David. I'm very appreciative!
The dialog design allows for a different organization of controls from some typical dialog (or property sheet) layouts.
For instance: if you offer a property sheet for a complex object (in a direct manipulation environment), there can be many controls required to offer full access to those properties. Offering more than just a few controls really necessitates multiple property pages. The problem here is that this can greatly limit visibility of controls (and so properties of the object).
Furthermore, if certain properties relate to control groupings on more than one page, you pretty well have to duplicate that control on multiple pages. Study results on this topic show that new users might not realize that this particular control is duplicated, causing many usability problems.
So what we need is a some control layout that can offer the conceptual grouping of controls while maintaining good visibility that helps maintain the user's understanding of control relationships.
Finally, considering the hierarchical nature of this design; if the dialogs required pressing the OK button for every dialog presented, this can increase task time beyond what is acceptable for the project.
|
|
|
|
|
Thinking about this a bit more, the dialog class would behave much like the VC++ unpinned properties (dialog? Miniframe?) sans caption bar and close button.
|
|
|
|
|
You might want to look at the WM_ACTIVATE and WM_ACTIVATEAPP messages. These are the messages being sent to the unpinned Properties dialog.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hmmm, thanks a lot for the tip. I'll do that.
|
|
|
|
|
I'm trying to broadcast a message using this:
<br />
::SendNotifyMessage(HWND_BROADCAST, WM_MYMSG, 0, 0);<br />
If another app, I've got a handler in my CMainFrame class that handles that message, like so:
In the header file:
<br />
protected:<br />
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);<br />
afx_msg LRESULT OnReadyRemote(WPARAM wParam, LPARAM lParam);<br />
DECLARE_MESSAGE_MAP()<br />
And in the CPP file:
<br />
LRESULT CMainFrame::OnReadyRemote(WPARAM wParam, LPARAM lParam)<br />
{<br />
wParam;<br />
lParam;<br />
AfxMessageBox("Kicker Ding");<br />
return 1L;<br />
}<br />
The message is registered like so (in a common header file used by both apps):
<br />
----------------------
I'm fairly certain that the app braoadcasting the message is actually doing so, but I know for a fact that the other app isn't seeing it.
Anyone have any ideas?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm
|
|
|
|
|
Are you missing:
ON_REGISTERED_MESSAGE(WM_MYMSG, OnReadyRemote); in the message map?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
ON_MESSAGE won't handle a registered message?
I'll give it a go.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
"You won't like me when I'm
|
|
|
|
|
John Simmons / outlaw programmer wrote:
ON_MESSAGE won't handle a registered message?
If it did, I suppose there would not be much need for ON_REGISTERED_MESSAGE() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Could someone please help with marshalling to .NET. I posted this question here, not in C#, 'cause I know for sure the mistake is somewhere in .idl or cpp file.
I have a Win32 C++ project with the following three files:
//tlbsamp.cpp///////////////////////////////////////////////////
#include <windows.h>
interface ITest{bool MyFunc();};
class Test:public ITest{
int i;
public:
Test(){i=10;}
int MyFunc(){return i;}
};
ITest* __stdcall MyDll_CreateTest(){
return new Test();
}
int __stdcall MyDll_CreateInt(){
return rand();}
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{return TRUE;}
//tlbsamp.def//////////////////////////////////////////////////////////
LIBRARY TLBSamp
DESCRIPTION 'Sample DLL'
EXPORTS
MyDll_CreateTest
MyDll_CreateInt
//tlbsamp.idl/////////////////////////////////////////////////////////////
import "oaidl.idl";
import "ocidl.idl";
[ uuid(983EE63A-7FB0-494a-AD63-14F48347DB7A), lcid(0x0409), version(1.0) ]
library TLBSample
{
[object,uuid( 1F707072-05C6-4501-AD74-CFD57AB8002C)]
interface ITest:IUnknown
{int MyFunc ();}
[ version(1.0), dllname("TLBSamp.dll")]
module MyDllFunctions
{
[entry("MyDll_CreateTest")]
ITest* __stdcall CreateTest();
[entry("MyDll_CreateInt")]
int _stdcall CreateInt();
} };
I am compiling the project and get tlbsamp.dll ,tlbsamp.tlb, tlbsamp.lib, then I create a c# project, AddReference->COM->
Browse, all the .tlb file. In object browser I can see my ITest interface with MyFunk function. Here's the c# code.
using System;
using System.Runtime.InteropServices;
using TLBSample;
namespace Test_Call_MSDN_Dll
{
class Class1
{
[DllImport(@"E:\MyProgs\NET\TLBSamp\debug\tlbsamp.dll")]
public static extern TLBSample.ITest MyDll_CreateTest();
[DllImport(@"E:\MyProgs\NET\TLBSamp\debug\tlbsamp.dll")]
public static extern Int32 MyDll_CreateInt();
[STAThread]
static void Main(string[] args)
{
Console.WriteLine(MyDll_CreateInt().ToString());//OK-works fine
ITest spClass=MyDll_CreateTest();//ExecutionEngineException(???)
Console.WriteLine(spClass.MyFunc().ToString());
Сonsole.Read();
}
}
}
What am I doing wrong?
Thanks in advance!
|
|
|
|
|
Ick. I don't think the P/Invoke and COM marshallers work well together. Use one or the other, but not both.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I copied a project over to another directory in VC 6.0, and I had some trouble with it not recompiling so I hit rebuild all. Now ALL the IDE will do is recompile - it is ignoring the precompiled headers, and rebuilding every single time. Is there a directory pointer that may be misplaced? Anybody encountered this problem before?
|
|
|
|
|
The only time I have seen this is if the date/time of the file is after the current date/time.
Can be encountered when you save files and alter the clock backwards!!
Ant.
|
|
|
|
|
Yep - that was it, thanks for the help.
|
|
|
|
|
All I want is the ability to share data between a DLL (Loaded dynamically) and a EXE application.
I have tried the shared data segment - no good (only for instances of the same program). Works with 2 EXEs - tried it today.
Next I tried Mailslots, but the Mailslot (Server) need to be in the DLL, so how does it read the Mailslot and how do you arrange for it to be created as no Entrypoint in the DLL.
I did try and arrange when one of the functions wa called it would first setup the Mailslot, but never managed to have the Client attach to it.
They must be a simple way to have 3 interger values shared between this EXE and DLL.
Been on the problem all day now!
Help!!
|
|
|
|
|
|
Just to elaborate a bit on what Michael said, what I would do is define a data structure that will contain your shared data. Then write a function that will return a pointer to the shared data. Within that function use the implemention that Michael described. I have used this technique many, many times and it is very easy.
__________________________________________
a two cent stamp short of going postal.
|
|
|
|
|
I have already define a simple structure for the data (3 integers and a 80 char string).
I have used Mailslots (hence the structure already defined) and Sockets, but never used File Mapping before. Any simple examples?
I have seen some but wapped up with other IPC stuff. Also never used the GUID before.
regards,
Sweep.
|
|
|
|