|
Star_dust wrote: LINK : fatal error LNK1104: cannot open file "DebugBuildOfWFC.lib"
I've never used WFC before but from the error message, build the debug build of the WFC library. Make sure it's named DebugBuildOfWFC.lib and make sure that the linker can find it on one of the paths.
|
|
|
|
|
Thank you for your response, but how can I BUILT THE DEBUG of the WFC library?
I builted the wfc.lib . I have two *.lib files in WFC directory (WFC.lib, UnicodeSTLWFC.lib) I don't know how to make the DebugBuildOfWFC.lib
|
|
|
|
|
It should be one of the configurations for the project.
|
|
|
|
|
Hi everybody. Long time no messaging. I got an easy question. How can you make a window with a thin (2D) border? BECAUSE I DID THIS IN THE PAST! Less than 3 weeks ago! And now I can't do it any more. It's incredible! I'm totally frustrated! I tried combining so many flags that I think I went through all the possible combinations except the right one.
Take for example this simple way to create a window in a standard Win32 application. This shoud create that 2D window but it's still 3D!!! I remember that in the past when I removed that WS_THICKFRAME attribute, it looked 2D. But it isn't working any more. Aaaaaaaaargh!!!!!
<br />
LRESULT CALLBACK WindowEngine (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}<br />
<br />
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)<br />
{<br />
MSG Msg;<br />
WNDCLASSEX wceData;
HWND a;<br />
<br />
wceData.cbSize = sizeof(wceData);<br />
wceData.style = 0;<br />
wceData.lpfnWndProc = WindowEngine;<br />
wceData.cbClsExtra = NULL;<br />
wceData.cbWndExtra = NULL;<br />
wceData.hInstance = hInstance;<br />
wceData.hIcon = NULL;<br />
wceData.hCursor = LoadCursor(NULL, IDC_ARROW);<br />
wceData.hbrBackground = NULL;<br />
wceData.lpszMenuName = NULL;<br />
wceData.lpszClassName = "testClass";<br />
wceData.hIconSm = NULL;<br />
RegisterClassEx(&wceData);<br />
<br />
a = CreateWindowEx<br />
(<br />
NULL,<br />
"testClass",<br />
"Some title",<br />
WS_OVERLAPPEDWINDOW &~ WS_THICKFRAME,<br />
10,<br />
10,<br />
100,<br />
200,<br />
NULL,<br />
NULL,<br />
NULL,<br />
NULL<br />
);<br />
<br />
ShowWindow(a, 1);<br />
<br />
while(GetMessage(&Msg, NULL, 0, 0) > 0)<br />
{<br />
TranslateMessage(&Msg);<br />
DispatchMessage(&Msg);<br />
}<br />
return 0;<br />
}<br />
-= E C H Y S T T A S =-
The Greater Mind Balance
Blending C++ with COM ^
-- modified at 17:14 Tuesday 11th July, 2006
|
|
|
|
|
Hope this helps (taken from MS Win32 Developer's Reference)
CreateWindow dwStyle parameter
Axonn Echysttas wrote: WS_THICKFRAME
Creates a window that has a sizing border. Same as the WS_SIZEBOX style.
Axonn Echysttas wrote: thin (2D) border
WS_BORDER Creates a window that has a thin-line border.
WS_CAPTION Creates a window that has a title bar (includes the WS_BORDER style).
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Hi Richard. Nope, unfortunately it doesn't help. Did you try WS_BORDER with the code above? If you put that WS_BORDER style, the window will still have a title bar. There is not noticeable difference between WS_BORDER and WS_CAPTION.
Pf... totally weird. WS_POPUP | WS_BORDER creates something of a 2D window but I am definitely sure that I was able to create a window with caption, maximize, minimze buttons AND 2D ASPECT! And now I can't do it no more. Aarggggghh! I'm so pissed off! I gotta dug up from the grave some of my old code apparently.
-= E C H Y S T T A S =-
The Greater Mind Balance
Blending C++ with COM ^
|
|
|
|
|
I need a way of limiting the user to enter only integers. The code below goes in an endless loop if any character other than a digit is entered on the screen. I can not use the isdigit() or isalpha() functions as they can only be used for character types. How should I change my test condition to accommodate this? The data2 variable is of type int.
while ((data2 <= 0) || (data2 > 12))
{
cout << "Please subunit number: ";
cin >> data2;
cin.getline(buffer, 99, '\n');
}
-- modified at 16:52 Tuesday 11th July, 2006
|
|
|
|
|
Harold_Wishes wrote: while ((data2 <= 0) || (data2 > 12))
{
cout << "Please subunit number: ";
cin >> data2;
cin.getline(buffer, 99, '\n');
}
Do you mean to have your range of valid values to be (-inf, 0) U (13, inf)? I think you mean to do this:
while (data2 >= 0 && data2 < 12)
{
cout << "Please subunit number: ";
cin >> data2;
cin.getline(buffer, 99, '\n');
}
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
I want to allow integers greater than zero and less than 12. Initially I used the && operator. But when I type in a number out of this range, it jumps out of the while loop and never asks me to enter a valid number. Oddly enough, it worked with the || operator with the screen prompting me as appropriate for numbers out of range. But the program fails in both cases if I type in a non-numeric value.
|
|
|
|
|
Harold_Wishes wrote: I want to allow integers greater than zero and less than 12.
(data2 <= 0) || (data2 > 12)
That will allow all integers below or equal to 0 or greater than 12, but reject anything that is from 1 to 11. What you want is: (data2 >= 0 && data2 < 12) .
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Personally, I'd let the user enter whatever and not read anything until he or she hits enter. After he or she hit enter I'd try and decide if what they typed was a valid number; doing something like
<code>
char buff[1024]; //whatever the user entered
unsigned int value;
int charsRead;
bool validEntry = false;
while(!validEntry) {
//prompt the user
//get a line from the user via whatever method...
if (sscanf(buff, "%u%n", &value, &charsRead) == 1) {
//can further compare charsRead w/ strlen if you want, ie
//test strlen(buff) == charsRead
//
validEntry = true;
}
}
</code>
earl
-- modified at 19:14 Tuesday 11th July, 2006
|
|
|
|
|
earl wrote: Personally, I'd let the user enter whatever and not read anything until he or she hits enter.
That is what cin does ... with far less code.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi all could any one show me how to collect the bold part data from a webbrowser controle . I want to collect those data and place them in a listview and use the color code to color the name in listview. I be happy if some one show me how this can be done. The nubmer of rows in the table are dynamic.Thanks
Note: i want to extract the name and color1 and color2 data from webbrowsser controle as shown in pic
[IMG]http://i5.photobucket.com/albums/y180/method007/extractData.jpg[/IMG]
webbrowser html code:
<html><br />
<br />
<head><br />
<meta http-equiv="refresh" content="60"><br />
</head><br />
<br />
<br />
<p><ul><table border=1 cellpadding=4<br />
<br />
<tr><th>Name</th> <th> color </th> <th> color2 </th> </tr><br />
<tr><td><font color="0800">tony</font></td> <td>32768</td> <td>0800</td><br />
<br />
<tr><td><font color="FF0FF">cindy</font></td> <td>16711935</td> <td>FF0FF</td><br />
<br />
<tr><td><font color="800FF">sarah</font></td> <td>16711808</td> <td>800FF</td> <br />
<br />
</table><br />
</body><br />
</html>
|
|
|
|
|
See here. Use "TD" instead of "FONT" for pcVal .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
david i am new to visual c++ 6 . i came from visual basic 6 and it is hard for me to use that code. could u tell me step by step how to use that code. I do not know how to implement it. i already have an mfc form with webbrowser on it that loads a specific webpage . I do not know how use your code to extract that data i want. could u tell me how to use u code ? where to place and how to feed it with my html ....
|
|
|
|
|
method007 wrote: could u tell me step by step how to use that code.
You'll need this in your CDialog -derived class:
BEGIN_EVENTSINK_MAP(CMyDialog, CDialog)
ON_EVENT(CMyDialog, IDC_EXPLORER, 259 , OnDocumentCompleteExplorer, VTS_DISPATCH VTS_PVARIANT)
END_EVENTSINK_MAP() Then put that other code into:
void CMyDialog::OnDocumentCompleteExplorer(LPDISPATCH pDisp, VARIANT FAR* URL); After the DocumentComplete event has been received, the OnDocumentCompleteExplorer() method can then be used to extract the data.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
david i am lost here. i do not know what class u are talking about !! I have no idea where to place u code!!! what does this code do. I even do know how to add a listview to my project so it place the extracted data into it!!
|
|
|
|
|
method007 wrote: i do not know what class u are talking about !! I have no idea where to place u code!!!
Isn't your project a dialog-based application? Put the code in your CDialog -derived class (i.e., CFindUserDlg ).
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
My project is MFC as u see in the pic . I have no idea where i have to put your code!!! what part should i put your code and what your does without listview !!!! see the pic and tell me wha should i do ? i am dong this in visual c++ 6.
unfortuney the way u explain is like i am 10 years experienced c++ prorammer which i am not ,i just started!!
[IMG]http://i5.photobucket.com/albums/y180/method007/project.jpg[/IMG]
could u just make a project and add a webbrowser with a html code that i gave u and show me hwo to extract that data and place it in listview.That way i do not have to explain over and over what i have in mind!!
-- modified at 17:05 Tuesday 11th July, 2006
|
|
|
|
|
method007 wrote: unfortuney the way u explain is like i am 10 years experienced c++ prorammer which i am not ,i just started!!
I think you need to get more experience in general C++/MFC before doing this, Adding and Extracting HTML from a web browser is not a really complex task, but it needs to have some more knowledge.
have a look at those articles :
http://www.codeproject.com/miscctrl/#HTML+Browser+Controls[^]
it should help you a lot.
M.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
method007 wrote: I have no idea where i have to put your code!!!
As I mentioned already, put the code in your CDialog -derived class (i.e., CFindUserDlg ). If this is troubling for you, perhaps you need to start with a less ambitious project. It makes no sense to dive into a project such as this when even the basics of VC++ are new to you. Start with something simple so that you can get comfortable with the IDE. Otherwise you'll just frustrate yourself (and others).
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
David i do not have CFindUserDlg !!! as u see in that pic i have FindUserDlg.h and FindUserDlg.cpp . Which one and what part ? Furthermore, i do not see any part of this code refrencing a url . How it will do the work if it does not access a url !!!
<br />
You'll need this in your CDialog-derived class:<br />
<br />
<br />
BEGIN_EVENTSINK_MAP(CMyDialog, CDialog) //{{AFX_EVENTSINK_MAP(CMyDialog) ON_EVENT(CMyDialog, IDC_EXPLORER, 259 /* DocumentComplete */, OnDocumentCompleteExplorer, VTS_DISPATCH VTS_PVARIANT) //}}AFX_EVENTSINK_MAPEND_EVENTSINK_MAP()<br />
Then put that other code into:<br />
<br />
<br />
void CMyDialog::OnDocumentCompleteExplorer(LPDISPATCH pDisp, VARIANT FAR* URL);<br />
After the DocumentComplete event has been received, the OnDocumentCompleteExplorer() method can then be used to extract the data.
-- modified at 9:38 Wednesday 12th July, 2006
|
|
|
|
|
method007 wrote: David i do not have CFindUserDlg !!! as u see in that pic i have FindUserDlg.h and FindUserDlg.cpp .
The files (FindUserDlg.h and FindUserDlg.cpp) contain the class (CFindUserDlg ). Open the files to verify.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok here is the content of FindUserDlg.cpp . What should i put there and where?
<br />
class CFindUserDlg : public CDialog<br />
{<br />
public:<br />
CFindUserDlg(CWnd* pParent = NULL);
<br />
enum { IDD = IDD_FINDUSER_DIALOG };<br />
CString m_nick;<br />
CWebBrowser2 m_wbrow;<br />
<br />
protected:<br />
virtual void DoDataExchange(CDataExchange* pDX);
<br />
protected:<br />
HICON m_hIcon;<br />
<br />
virtual BOOL OnInitDialog();<br />
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);<br />
afx_msg void OnPaint();<br />
afx_msg HCURSOR OnQueryDragIcon();<br />
afx_msg void OnButton1();<br />
DECLARE_MESSAGE_MAP()<br />
<br />
public: <br />
int GetPosByNick(CString szNick); <br />
<br />
};
|
|
|
|
|
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButton1();
afx_msg void OnDocumentCompleteExplorer(LPDISPATCH pDisp, VARIANT FAR* URL);
DECLARE_EVENTSINK_MAP()
DECLARE_MESSAGE_MAP()
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|