|
Thanks for your quick reply
Where did CUpdateThread come from?
I would like to have my message responding method within the CDialog-derived class that is posting the message.
dlb
|
|
|
|
|
--dlb-- wrote:
Where did CUpdateThread come from?
My bad.
|
|
|
|
|
Hi, i need to know how to make my app check wether its connected to the internet. I need this cause my app needs to check for updates and i don't want the dial up dialog (for dial-up connections) appearing every 5 minutes. How can i stop it from popping up, so that it only checks for updates when it really is already connected to the internet?
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
calling the InternetGetConnectedState function should not popup a dialup box.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
Have you tried any of these:
http://www.pcausa.com/resources/InetActive.txt
|
|
|
|
|
Hi,
Im writing a program in C++, using the windows.h header file to develop an application. Im capturing images from a camera and then saving them in a default folder.
I want to allow the user to be able to browse through their file directories and choose which folder they want the images to be saved to. But, I cant find a simple solution. I would have thought there would have been a defualt control that allowed you to do this. But all the ones I have seen require you to set imagelists and things for the bitmaps to use for the folders.
I would GREATLY appreciate any help with this problem. Ive looked around on msdn, and on this site too. What is the easiest way to do it? Apart from simply asking the user to paste the folder path into a text box.
Cheers for any help
|
|
|
|
|
rbeat100 wrote:
I want to allow the user to be able to browse through their file directories and choose which folder they want the images to be saved to.
Look up SHBrowseForFolder() in MSDN Library
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
ShBrowseForFolder is what you are looking for, search around codeproject for samples, and/or how-to.
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Thanks to you both for the quick responce
Ill give it a try.
|
|
|
|
|
try this code:
BOOL BrowseForDir(char *cpPathName, HWND hParent)
{
BOOL bRetval = FALSE;
BROWSEINFO sBI;
memset(&sBI,0,sizeof(BROWSEINFO));
sBI.hwndOwner = hParent;
sBI.pidlRoot = NULL;
sBI.pszDisplayName = cpPathName;
sBI.lpszTitle = "Select the folder To Save To:";
sBI.ulFlags = BIF_RETURNONLYFSDIRS;
sBI.lpfn = NULL;
LPITEMIDLIST pidl = SHBrowseForFolder(&sBI);
if (pidl)
{
SHGetPathFromIDList(pidl,cpPathName);
bRetval = TRUE;
}
return bRetval;
}
|
|
|
|
|
basementman wrote:
try this code:
Do you mean it doesn't work?
Can't try it but here is my code:
BROWSEINFOA bi;
memset(&bi, 0, sizeof(bi));
bi.hwndOwner = this->GetSafeHwnd();
bi.lpszTitle = "Select your dir";
LPITEMIDLIST itemList = SHBrowseForFolder(&bi);
if(!itemList)
return;
char* pathName = new char[1024];
if(!SHGetPathFromIDList(itemList, pathName))
{
::MessageBox(NULL, "AAARRGH!! Invalid path!!!", "Error", MB_OK | MB_ICONERROR);
return;
}
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Hi.
I have two classes derived from CObject. They are leaking memory somehow.
What's wrong?
Memory Leaks!
0 bytes in 0 Free Blocks.
273 bytes in 6 Normal Blocks.
0 bytes in 0 CRT Blocks.
0 bytes in 0 Ignore Blocks.
268 bytes in 3 Client Blocks.
Largest number used: 3260 bytes.
Total allocations: 4732 bytes.
EXPLORER.DLL Terminating!
DLG.DLL Terminating!
WEB.DLL Terminating!
The thread 0xEB4 has exited with code 0 (0x0).
<br />
<br />
class CModulExplorer : public CObject<br />
{<br />
DECLARE_SERIAL(CModulExplorer)<br />
public:<br />
CModulExplorer();<br />
virtual ~CModulExplorer();<br />
virtual void Serialize(CArchive& ar);<br />
<br />
HICON hSIcon;<br />
HICON hLIcon;<br />
BOOL bSystemFolder;<br />
CString sDefaultName;<br />
CString sNodeName;<br />
CString sPath;<br />
};<br />
<br />
class CModulWeb : public CObject<br />
{ <br />
DECLARE_SERIAL(CModulWeb)<br />
public: <br />
CModulWeb();<br />
virtual ~CModulWeb();<br />
virtual void Serialize(CArchive& ar);<br />
<br />
enum NavigationStyle {WNS_BLANK = 1014, WNS_LAST = 1015, WNS_DEFAULT = 1016};<br />
<br />
HICON hSIcon;<br />
HICON hLIcon;<br />
NavigationStyle ns;<br />
CString sDefaultName;<br />
CString sUrl;<br />
CString sNodeName;<br />
};<br />
<br />
class CMainFrame : public CMDIFrameWnd<br />
{<br />
DECLARE_DYNAMIC(CMainFrame)<br />
public:<br />
CMainFrame();<br />
<br />
public:<br />
CModulExplorer *m_pExplorerCls;<br />
CModulWeb *m_pWebCls;<br />
...<br />
}<br />
<br />
<br />
<br />
IMPLEMENT_SERIAL(CModulExplorer, CObject, 0)<br />
IMPLEMENT_SERIAL(CModulWeb, CObject, 0)<br />
<br />
<br />
CModulExplorer::CModulExplorer()<br />
{<br />
}<br />
<br />
CModulExplorer::~CModulExplorer()<br />
{<br />
}<br />
<br />
void CModulExplorer::Serialize(CArchive& ar)<br />
{<br />
}<br />
<br />
<br />
CModulWeb::CModulWeb()<br />
{<br />
}<br />
<br />
CModulWeb::~CModulWeb()<br />
{<br />
}<br />
<br />
void CModulWeb::Serialize(CArchive& ar)<br />
{<br />
}<br />
<br />
<br />
CMainFrame::CMainFrame()<br />
{<br />
CRuntimeClass* pClass = NULL;<br />
<br />
pClass = RUNTIME_CLASS(CModulExplorer);<br />
m_pExplorerCls = (CModulExplorer*)pClass->CreateObject();<br />
<br />
pClass = RUNTIME_CLASS(CModulWeb);<br />
m_pWebCls = (CModulWeb*)pClass->CreateObject(); <br />
}<br />
<br />
CMainFrame::~CMainFrame()<br />
{<br />
delete m_pExplorerCls;<br />
delete m_pWebCls;<br />
}<br />
|
|
|
|
|
I have found that some ADO methods (Update, Delete)
doesn't work with tables having high number of fields.
Is this problem real ??
How can I manage big tables with ADO ?
Tanks a lot !
|
|
|
|
|
Huh!?
Can't be...
What error do you get? Or what doesn't work exactly?
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
The 80004005 error is generated and the string in the exception is: "Query too complex"
This assertion is generated when I try to update an
existing record or to remove it.
Instead, when I try to add a new record and when I fill
it, or when I browse the big table, none exception is
generated !!!
I really don't know how to solve this problem !!!
|
|
|
|
|
Hm... don't know what i9t can be...
Are you sure that your SQL query is correct?
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Rickard is right. You usually get this error when your SQL statement is wrong but you say that this doesn't happen when you add a new record, so there could be some other reasons. For instance:
1. Make table names and column names shorter.
2. Reduce the number of columns in the table.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Hi,
I have two (or more) sets of icons that I want to use together to form a combination of icons. My icons have transparency, so I want to be able to draw one on top of the other, so that the one on the bottom shows through the transparent areas of the top.
Btw, I want to be able to draw this on any dialog.
Thanks in advance.
|
|
|
|
|
See DrawIcon or DrawIconEx in the doc.
|
|
|
|
|
I have a problem using the WST utility.
I followed all the steps in creation of the exe and linking the wst.lib file to the linker.
i have my .wsp generated files in the c:\wst dir
but the moment i run the command
c:\wst:> wstune /o myfile.wsp
it gives me an error
wstune : using "myfile.wsp"
what could be the problem
can anyone give me the solution.
thanking you
|
|
|
|
|
Hy everybody!
a little question...
I'm creating a invisible window (with create function), but when I do it my current app window loses his focus...
How can I create the window in the way that my current window don't loses his focus?
thanks all!
Cheers!
Ricky
|
|
|
|
|
One solution is to simply focus the parent window right after calling creating the child window.
kuphryn
|
|
|
|
|
For example I have a dialog based project with tab control.
And there is some amount of dialog resources.
When I change tabs I need to include (embed) and switch those dialogs inside the main dialog.
I dig into ICQ dlls and found that they are using the same trick in dialog with tabs.
|
|
|
|
|
If it is possible use the property sheet, it's easier to maintain and to work with...
|
|
|
|
|