|
Please help me!
This is not answer to my question. This is very very urgent.
Thanks & regards,
Promise
|
|
|
|
|
David was asking you to expand on the information you have given in order to have a better understanding of your problem.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I'm glad to see that at least one person understood where I was going with my inquiries!
Maybe I shouldn't have been so hasty to drop out of mind-reading school.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
For point 2. Have you tried setting up accelerator keys? Have one that handles ESC.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hello.
Could you please help me. I need to customize regular Folder view. I
need to split it in two parts:
1)To have regular detailed view on the top.
2)To have another view which will show some additional information
about the file selected in the detailed view at the bottom.
Is it possible to achive that using Shell Extensions?
Thank you.
|
|
|
|
|
Hi,
I'm writing a Flight Simulator DLL, the DLL creates a thread that runs a UI that runs as a child of FS.
Now not any problem in FS window mode, but when I switch to full screen mode and click on the UI (which is shown on top of FS in full screen), windows deactivates the flight simulator by minimizing it and also minimizing the UI.
Without a thread it was working, but I wanted a sep thread for the UI since code behind the UI is doing expensive work.
I create the dialog as follows:
MyEnumWindowsProcCls Cls;
Cls.dwProcessId = GetCurrentProcessId();
Cls.hWnd = 0;
Cls.dwThreadId = 0;
EnumWindows(EnumWindowsProc,(LPARAM)&Cls);
fsWnd_ = new CWnd();
fsWnd_->Attach(Cls.hWnd);
dlg->Create(IDD_MAIN, fsWnd_);
The EnumWindowsProc catches the FS window:
BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam)
{
static MyEnumWindowsProcCls* pCls=(MyEnumWindowsProcCls*) lParam;
DWORD dwProcessId;
DWORD dwThreadId;
dwThreadId=GetWindowThreadProcessId(hWnd,&dwProcessId);
if (dwProcessId==pCls->dwProcessId)
{
char clas[512];
GetClassName(hWnd,clas,sizeof(clas));
HWND hWndParent=(HWND)GetWindowLong(hWnd,GWL_HWNDPARENT);
if (hWndParent==NULL)
if (strcmp(clas,"FS98MAIN")==0)
{
pCls->hWnd = hWnd;
pCls->dwThreadId = dwThreadId;
return FALSE;
}
}
return TRUE;
}
Anybody an idea of what I'm doing wrong? Is it possible at all to create a child window in another thread?
Thx
Kenny
|
|
|
|
|
Kenny Moens wrote:
Is it possible at all to create a child window in another thread?
Yes, but the secondary thread will need its own message pump. Check out this article for more detail.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
That's what I did already :s
|
|
|
|
|
Are you only accessing the window from within the thread that creates it? If not you are likely to have problems as Thread Local Storage is used extensively in windows.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi all,
I am working on converting some images into BMP format and the given images are in *.LL1 and *.LT1 formats. After converting them into BMP I have to display them in an interface that I am goin to build. (i.e when I select an Image file of any of those two formats fromt he 'open' menu item then it should display the image on a seperate window after doing all the process of changing the format into BMP. ( I am having the header information of the other two formats, but i don't know if it helps)
Anybody having ideas or suggestions of how to convert an image format in VC++, plz lemme know and I appreciate ur help.
I hope I am clear in problem description.
thanks in advance,
Pavan.
|
|
|
|
|
I have an options dialog in an app I'm building (an intranet bug reporter/tracker). I would like to be able to put an option in for the user to select whether or not they want the app to run at startup. How can I programmatically create a shortcut and place it in the user's startup folder if they choose this option? Thanks in advance
[insert witty comment here]
bdiamond
|
|
|
|
|
Check out the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
To create a link, check out the IShellLink interface.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Does anyone have some code snippets, or a suitable URL, to assist me in watermarking my C++ (unmanaged) code ?
Programming from a spec is like walking on water ......
Its Easier once frozen
|
|
|
|
|
hmmm... to be precisely.. these kind of questions are not very popular here...
you can't just watermark "C++ code"... you have to watermark the whole exe/dll/sys/etc file.
Don't try it, just do it!
|
|
|
|
|
The only time I've ever used the word "watermark" was in the context of an image within Word. How is it being used here?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
maybe he's talking about obfuscating his code ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I've seen enough of that without adding watermarks to the mix. Some folks just naturally write obfuscated code.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I want to receive characters from the serial com with 115200baud. In general my code works but
it has a small bug and I don't know why. Maybe someone can help me.
My problem is: Sending >820bytes by a commercial program to my code, my code receives just 820
bytes only. After the 820bytes WaitCommEvent() doen't recognize any incomming characters any more.
Here is my code:
================
* Open com port:
m_hPort = CreateFile(sFile, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);<br />
<br />
m_DCB.DCBlength = sizeof(DCB);<br />
GetCommState(m_hPort, &m_DCB);<br />
<br />
m_DCB.BaudRate = m_stCalibration.BaudRate;<br />
m_DCB.ByteSize = m_stCalibration.ByteSize;<br />
m_DCB.Parity = m_stCalibration.Parity;<br />
m_DCB.StopBits = m_stCalibration.StopBits;<br />
m_DCB.fDtrControl = DTR_CONTROL_DISABLE;<br />
m_DCB.fRtsControl = RTS_CONTROL_DISABLE;<br />
SetCommState(m_hPort, &m_DCB);<br />
SetCommMask(m_hPort, EV_CTS | EV_DSR | EV_ERR | EV_RXCHAR | EV_TXEMPTY);<br />
<br />
m_pListenerThread = AfxBeginThread(listener, this, THREAD_PRIORITY_HIGHEST, 0, CREATE_SUSPENDED, NULL);<br />
<br />
m_pListenerThread->m_bAutoDelete = FALSE;<br />
m_pListenerThread->ResumeThread();
* Read thread function:
listener (void)<br />
{<br />
DWORD dwBytesRead;<br />
DWORD dwBytesWritten;<br />
DWORD dwEventMask;<br />
BYTE szBuffer[MSGFRAME_MAX_LEN];<br />
DWORD dwOverlappedResult;<br />
DWORD dwLastError;<br />
BOOL bResult;<br />
DWORD dwDontCare;<br />
<br />
memset(szBuffer, 0, MSGFRAME_MAX_LEN);<br />
<br />
SetCommMask(m_hPort, EV_RXCHAR);<br />
WaitCommEvent(m_hPort, &dwEventMask, &m_stReadOver);<br />
while(1)<br />
{<br />
if(WaitForSingleObject(m_stReadOver.hEvent, 1000) == WAIT_TIMEOUT)<br />
{<br />
checkCalibration();<br />
continue;<br />
}<br />
<br />
dwOverlappedResult = GetOverlappedResult(m_hPort, &m_stReadOver, &dwDontCare, FALSE);<br />
if (dwOverlappedResult != FALSE)<br />
{<br />
bResult = ReadFile(m_hPort, szBuffer, 1, &dwBytesRead, &m_stReadOver);<br />
if(bResult != FALSE && dwBytesRead == 1)<br />
{<br />
m_stRingBuffer.RingBuffer[m_stRingBuffer.dwEnd].yChar = *szBuffer;<br />
m_stRingBuffer.dwEnd = m_stRingBuffer.RingBuffer[m_stRingBuffer.dwEnd].dwNext;<br />
m_pRingBufferFilled->SetEvent();<br />
<br />
}<br />
else if (bResult == FALSE && GetLastError() != ERROR_IO_PENDING)<br />
{<br />
}<br />
<br />
ResetEvent(m_stReadOver.hEvent);<br />
WaitCommEvent(m_hPort, &dwEventMask, &m_stReadOver);<br />
}<br />
}<br />
return;<br />
}
Thanks in advance )
Michael
|
|
|
|
|
Hi,
How to get the target file for a particular shortcut icon. This SHGetShortcutTarget API is only for CE OS. Is it possible to get the target for other OS.
Thanks is Advance
Baskar
|
|
|
|
|
Check out IShellLink::GetPath() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I am working in windows programming, in that I cant use this method (IShellLink::GetPath()). Is there any API to find out.
Baskar
|
|
|
|
|
IShellLink is an (AP) interface. Why is it that you think it cannot be used? Here are a few examples of how it can be used:
http://www.codeproject.com/shell/CShortcut.asp
http://www.codeproject.com/shell/UtilShortcuts.asp
http://www.codeproject.com/shell/create_shortcut.asp
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i have 3 arrays red[288][352], green[288][352], and blue[288][352]. How do i display this image it in a window in a simple manner. thanks.
|
|
|
|
|
use this little code
CCleintDC dc(this);
COLORREF ref;
int i=0;j=0;
for(;i<288;i++)
for(j=0;j<352;j++)
{
ref=RGB(red[i][j],green[i][j],bluew[i][j]);
dc.SetPixel(i,j,ref);
}
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Can I declare a global variable in a DLL?
My variable is a object of Internal class that NOT exported.
Also my global object will use internally.
My dll is a "Regular DLL with MFC statically linked".
Does it cause a problem?
|
|
|
|