|
I have never used this function before, but does the HWND represent the dialog or the owner of the dialog. Anyway, you can always call GetDC to get the DC of a window. The thing that you will need to worry about is if that handle is the dialog or not. If that handle is the parent of the dialog, you can always enumerate through the windows to get your dialog handle, or cache a handle somewhere.
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
I´m developing a program and I need a class for CtreeCtrl, with multiple selection of items and Drag and Drop of them between two CTreeCtrls(or Ctreeview).
Thanks in advance.
Using Visual C++ 6.0.
Windows 2000.
|
|
|
|
|
Is it possible to add a toolbar to a modal dialog?
I tried, but ended up with assertion errors, was just wondering if it can be done!
Thanx
funbag!
skydiving....if at first you don't succeed, you're fecked!
|
|
|
|
|
In theory, no, but I believe in practise it is possible to hack a solution, so long as you don't want them to float.
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
|
|
|
|
|
Hi,
We have a big monolitic ( ), project, that takes half an hour to compile ( Scassi HD, and 500 Mb. Memory), we don´t have time to chop it into smaller pieces ( now it´s not the time for that )...
... But we have like three more computers free, so would it be possible to send to that computers a bunch of files, and that machines could compile them ? ( so if I have 400 files I could compile 50 here, 50 there, 50..., in paralel).
Does can be done on VStudio 6.0 ? And .net ? ... or that´s to good to be true ?
Thanks in advance, Greetings
Braulio
|
|
|
|
|
Hi
i got a serious Problem with the Blocking Sockets Part of WinSock2.
A Java Applet is connecting to my TCP/IP Server (written in C++) - and now they are talking... and it works - ... but everytime the Java Applet sends a Message to the C++ the LAST BYTE doesn´t arrive. Its there when the next message is sent from the Applet - but until then.... no LAST BYTE....
does anybody know how to workaround - or WHY the H**** this is occuring ?
Daniel
|
|
|
|
|
Do you have more information? What protocol do you use on your socket? HTTP, FTP, in-house?
If the protocol you use specifies in its header the number of incoming bytes, make sure you don't miscalculate.
Michel
If I am wrong or said something stupid, I apologize in advance
|
|
|
|
|
I want to record sound with callback function.
I call waveInOpen, waveInPrepareHeader, waveInAddBuffer etc. successfully.
And I can get WIM_OPEN and WIM_CLOSE message in the callback function.
BUT I CAN'T get WIM_DATA message! Why???
BTW: I can get MM_WIM_DATA message when I use threads instead of callback
function, and I can get WOM_DONE message when using callback function waveOutProc.
|
|
|
|
|
Hey!
I found the answer.
I forget to call waveInStart.
|
|
|
|
|
As title.
I'm amumu, and you?
|
|
|
|
|
iS it possible to get the system's image list and use that to a tree control so that it the images in the tree control of Windows Explorer is the same as with the images of the tree control my application??
|
|
|
|
|
How do i capture the whole viewport size of a CScrollView to a bitmap?...
I'm making a paint program and i want to save the whole drawing including the hidden part of the bitmap.... (the part which is not scrolled)...
I tried Bitbliting the ScreenDC into memDC which has a bitmap attached to it
but it only captured the visible part.. worst it also captured the Scrollbars...
|
|
|
|
|
Hi,
I am using AfxMessageBox() API in my application.Sometimes the message box doesn't come up and when I debugged and saw found that the return value is 0 which means that there is no enough memory to display the message box.What do I do to solve this problem?
Thank You.
Yamuna.E.
Yamuna.E.
|
|
|
|
|
Buy more RAM ?
I've NEVER had AfxMessageBox fail, what makes you think it's memory related ? When does it happen ?
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
|
|
|
|
|
Even for me this is the first time AfxMessageBox fails.
MSDN tells that AfxMessageBox on failure returns 0 and that it is due to no enough memory.
I forgot to mention the scenario.
This messagebox I call from within a thread function(via CreateThread) which takes as its parameter the string to be displayed and I am sure there is no problem with string passing.This I made sure by hard-coding the string just to check whether it works fine with hard-coded string value.But even in that case I got the same problem.
But now I tried using MessageBox API instead of AfxMessageBox.Its working fine.But couldn't get the reason behind the problem.
Thank You.
Yamuna.E.
Yamuna.E.
|
|
|
|
|
It's certainly an odd problem. In the future, TRACE or OutputDebugString will allow you to check a variable value in Debug mode without having to bring up a dialog.
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
|
|
|
|
|
Fine Thank You.
Yamuna.E.
Yamuna.E.
|
|
|
|
|
Hi all!
I want to do next: user clicks the button, and Web Browser replaces by richedit control (in a dialog). TROUBLE: after hiding of web browser, its window handle become not valid. Here's a code:
void CCalendarDlg::OnViewEditSwitch()
{
CString strBtnText;
m_btnEditView.GetWindowText(strBtnText);
if(strBtnText == EDIT_BUTTON_TEXT)
{
m_btnEditView.SetWindowText(VIEW_BUTTON_TEXT);
m_Browser.ShowWindow(SW_HIDE);
m_wndRichEdit.ShowWindow(SW_SHOW);
}
else
{
m_btnEditView.SetWindowText(EDIT_BUTTON_TEXT);
m_wndRichEdit.ShowWindow(SW_HIDE);
m_Browser.ShowWindow(SW_SHOW);
}
}
ERROR:
Debug assertion failed here:
BOOL CWnd::ShowWindow(int nCmdShow)
{
ASSERT(::IsWindow(m_hWnd));
if (m_pCtrlSite == NULL)
return ::ShowWindow(m_hWnd, nCmdShow);
else
return m_pCtrlSite->ShowWindow(nCmdShow);
}
Help, please!
|
|
|
|
|
I solve the problem so:
void CCalendarDlg::OnViewEditSwitch()
{
CString strBtnText;
m_btnEditView.GetWindowText(strBtnText);
if(strBtnText == EDIT_BUTTON_TEXT)
{
m_btnEditView.SetWindowText(VIEW_BUTTON_TEXT);
//m_Browser.ShowWindow(SW_HIDE);
m_Browser.SetWindowPos(this, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOZORDER);
m_wndRichEdit.ShowWindow(SW_SHOW);
}
else
{
CRect rc;
m_wndRichEdit.GetWindowRect(&rc);
::MapWindowPoints(HWND_DESKTOP, *this, (LPPOINT) &rc, 2);
m_btnEditView.SetWindowText(EDIT_BUTTON_TEXT);
m_wndRichEdit.ShowWindow(SW_HIDE);
m_Browser.SetWindowPos(this, 0, 0, rc.Width() , rc.Height(),
SWP_NOMOVE | SWP_NOZORDER);
//m_Browser.ShowWindow(SW_SHOW);
}
}
But I'm interested in problem description... Why handle became invalid?
|
|
|
|
|
Is there anyway to test the DLL generated when creating a method which is to be called via CeRapiInvoke()?? I tried to a a LoadLibrary on it and don't get a handle back.
|
|
|
|
|
what are you trying to do exactily ?
Are you trying to use RAPI, if so you should be linking your software to 'rapi.lib' and include 'rapi.h', these come with the Handheld PC SDK. RAPI is no COM complient.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Well....I'm already using RAPI and it works fine with a PDA. What I was asking was if there is a way to debug DLLs designed to be used in conjuction with CeRapiInvoke(). I could create another DLL project and simply reuse the call but I'm trying to debug the x86 DLL generated by eVC.
Paul
|
|
|
|
|
ive tried both of these, and it still aint working
//WideCharToMultiByte(0,0,_ip_name,wcslen(_ip_name)+1,tempbuf_ip,256,0,0);
MultiByteToWideChar(CP_ACP, 0, tempbuf_ip, -1, (WCHAR*)_ip_name,256);
this is my code.
char *tempbuf_ip;
WCHAR _ip_name[256];
GetDlgItemText(hwnd, IDC_IP, tempbuf_ip, 256);
//WideCharToMultiByte(0,0,_ip_name,wcslen(_ip_name)+1,tempbuf_ip,256,0,0);
//MultiByteToWideChar(CP_ACP, 0, tempbuf_ip, -1, (WCHAR*)_ip_name,256);
and then _ip_name points to:
if( FAILED( hr = CreateHostAddress( _ip_name ) ) )
{
//blah
}
CreateHostAddress points to a WCHAR*;
HRESULT CreateHostAddress(WCHAR* pwszHost)
-Thanks for any help
|
|
|
|
|
You are trying to convert to BSTR. #include <comutil> ( from memory, or comdef, maybe ? ) and cast to _bstr_t.
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
|
|
|
|
|
Well first off, there isn't any memory behind the tempbuf_ip pointer. Try defining tempbuf_ip as char tempbuf_ip [256].
After that,
MultiByteToWideChar(CP_ACP, 0, tempbuf_ip, -1, _ip_name,256);
should work just fine.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|