|
Hi All,
I'm having problem with hiding the system menu close (X) button for MessageBox, please help me on this.
Thanks & Regards,
Pradeep
Pradeep
|
|
|
|
|
I don't think you can do it. You need to build your own message box.
Best,
Jun
|
|
|
|
|
Try with
SetClassLong(hDlg, GetClassLong(hDlg, GCL_STYLE) | CS_NOCLOSE);
to disable it.
If you want to hide it, remove the system menu style in dialog editor, if is acceptable.
|
|
|
|
|
Ya i will try for it. Thanks for the info.
|
|
|
|
|
You could always try using the Xmessagebox[^] which you are able to customize as much as you want.
|
|
|
|
|
There are so many tutorials and posts about this that it's kinda hard to find exactly what I want. I have two processes, both sharing the same dll. Each process uses a class located in the dll. basicly the first process initializes the class, the second process reads it. The class itself contains many C type strings, some of them quite large, but when trying to read from the class I am getting NULL pointers. The class itself is not the problem, but sharing it and the data within is.
#pragma data_seg (".shared")
CMyClass cMonitor;
BOOL bSuccess = FALSE;
#pragma data_seg ()
#pragma comment(linker,"/SECTION:.shared,RWS")
My first attempt was to store a pointer to the class, but that failed misserably. I'm guessing the same problem is affecting the strings within the class, but I have no idea how to do it correctly.
|
|
|
|
|
|
yeah I figured the only way to do what I want is to use a mapped file. I'm now scouring the internet looking for examples. I realise there are many on CP, but each of them only show the method of storing a single string. I'm looking to store multiple strings in the same file. I know it's possible by placing the strings one after another, but handling the location of each is where it gets tricky. So before I start writing the code for this, i want to make sure it hasn't already been done (and probably done better).
|
|
|
|
|
I'd try in two ways:
1. The dll keeps internally its data as desired, and the client processes will supply buffers to the exported dll class; in return, the dll will fill buffers back to client (a la COM).
Dll:
<br />
class Dll {<br />
...<br />
public:<br />
virtual bool GetMeData(IN "ID" whatYouNeed, IN OUT ULONG *pulSize, IN LPTSTR pStr) {<br />
_tcsncpy(pStr, m_pszString, *pulSize);<br />
*pulSize = lstrlen(pStr);<br />
return true;<br />
}<br />
...<br />
private:<br />
LPTSTR m_pszString;<br />
}<br />
Process:
(ULONG ulSize = 255;<br />
LPTSTR pStr = new TCHAR[ulSize + 1];<br />
pDll->GetMeData("thatOne", &ulSize, pStr);<br />
2. GlobalAlloc/GlobalLock, or an IPC mechanism.
|
|
|
|
|
I am taking the IPC approach on this one. It's about time I got my head around all this inter process chit chat. I'm currently putting together a small class which will store multiple strings/(who knows what else) into the mapped file. This may even turn into an article.
|
|
|
|
|
how i can catch message come out from dll that i use in my program so i can post another message instade of dll one
|
|
|
|
|
Can you be a little clearer?
Steve
|
|
|
|
|
Do you want some notification for the completion of task that is being done in a dll?
You can use a flag variable, modify it in the dll(Pass it to the dll by reference) and then check for the value that if it gets modified, you do some other task.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
in my program i use function in dll when this function fails it post message(from insde the dll)like(Erorr number ...) so i dont want this message to appear i want to now win its posted and prevent it to appear to user and then i post my own message.
|
|
|
|
|
If it's some unexpected error or your DLL cannot handle it, you may throw a string (instead of displaying it). Your caller should catch the string thrown from the DLL and process it any way you like.
Best,
Jun
|
|
|
|
|
hi,
i am doing program on tooltips,i know how to create tooltip on button but i have to create tooltip on icons(images also),i tried but i didnt get
please anyone help me,
thanks.
kanth
|
|
|
|
|
Using CToolTipCtrl::AddTool() you can specify different tooltips for different areas of a window. So for the window that is displaying the icons simply call AddTool() with each icon's rectangle area.
If you are not using MFC then take a look at the TTM_ADDTOOL message.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Hi,
I need to write a relatively simple function for getting and setting values in the system security settings. For instance, I know how to use the SetEncryptionLevel() of the Win32_TSGeneralSetting class. But I need a method for getting the current value of the encryption level, e.g., GetEncryptionLevel(), but I can find no such method. Does anyone know how to get this value? I also need to be able to get and set the TLS 1.0 setting.
Thanks,
Royce
|
|
|
|
|
I Want To Get Pixel Directly From Vga Memory
And Then Modify Them and write Them Directly In To Vga Memory Again.
|
|
|
|
|
AFAIK this can not be done. You can however get a device context for the entire screen and call GetPixel() and SetPixel() on that device context.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
SetPixel Or GetPixel Are Speed Low
|
|
|
|
|
Yes they are. If you need speed then you could do a screen capture into a memory DIB then you can access the DIB bits directly.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
I met a trouble.
If client1 connect to client2, client1 can send message to client 2. but why i cant send message from client2 to client1? and why i cant connect client2 to client1?
Thanks
Minihotto
-- modified at 5:12 Saturday 2nd September, 2006
|
|
|
|
|
Are u using Platform sdk or mfc?
If sdk use the sokcet value which is returned by the accept function to send back to the client.
If use the object whose reference is passed to the Accept function on the sever side.
KIRAN PINJARLA
|
|
|
|
|
hello, I am new.
I have a question.
I want to write a program that the client is also the server.
But it's not like the client and server problem, and i dont konw which one will connect to the other side first.How do I solve this problem?
Can somebody help me?
|
|
|
|