|
I created ListCtrl on Btn Click as child of dialog.
But controls that are already exist on the dialog they are getting diaply over the List control?
How to resolve this issue?
|
|
|
|
|
Change the position of listctrl using MoveWindow Or SetWindowPos.
|
|
|
|
|
This is not I am expecting
|
|
|
|
|
Hi,
Is there any one to solve this issue?
|
|
|
|
|
A much better solution would be to create the control at design time and then just show/hide it when necessary.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Can you show how you created the control? The fact that it's custom draw is probably not the issue here.
|
|
|
|
|
this->CreateEx(WS_EX_TOPMOST,WS_CHILD | WS_VISIBLE |LVS_REPORT |LVS_NOCOLUMNHEADER|LBS_HASSTRINGS|LVS_EX_TRACKSELECT|WS_TABSTOP ,rect, pWnd,nID);
this->SetWindowPos(&wndTop,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE); // here I m setting this control on the top.
|
|
|
|
|
Hi,
I am facing a problem related to window handle.
I have loaded two different OCXs in different instances of the same container application(OLE Server).
In OnCreate() method of second OCX control I am calling the AfxGetMainWnd()function.
It is called after calling the base class function of OnCreate() method.
Now trying to run both instances simultaneously.
The problem is sometimes AfxGetMainWnd()function returns the pointer to a window of first OCX control which is loaded in the first container instance just before. Why it happens?
Thankx in advance.
Regards,
SUnil
|
|
|
|
|
One of my program in VC++ uses the MS SQL Server 2000 as the DB and the app was coded in VC++ 6.0. The DB part was governed by the MFCs CRecordset and so on. The data is populated through the sequence as follows
1.CRecordset::AddNew();
2.Fill all the columnar data of the record
3.CRecordset::Update()
The problem now surfaces is, when the app running if the Optimization Job is done then the 3rd step throws the following SQL Error(By SQL Profiler)
Msg 16943, Level 16, State 4 Could not complete cursor operation because the table schema changed after the cursor was declared.
Please help me out in fixing this. Thanks in advance.
|
|
|
|
|
I really hope someone can offer some suggestions on this because I'm going bonkers here. I've spent days trying to hunt down this problem and I can't find it.
I have two combo boxes that are populated from atlas data. The first is a list of US states and countries. Once that selection is made, the second combo box is populated with a list of the cities in the selected state or country.
The code for the two is line-for-line identical - or as identical as it can be except for adding different strings. The combo box styles are identical, the event handling is identical. But one works (the state/country selection) and one has problems (the city selection).
In the state/country combo box, you can press the down arrow and move through the items. In the city combo box, the selection won't move with the arrow - or rather, it appears not to move. If you accept a selection and close the dialog, you find that the selection actually did change. You only can move one position with the arrow, and only the first time you try it. After that it appears stuck.
Also, when you make a selection with the mouse in the city combo box, you don't get what you select. You get a selection a few items off. The mouse selection works fine in the state/country combo box.
I have been over this code a million times and I can't see why one works and the other does not. Does anyone have any idea what the problem might be?
Thanks in advance.
|
|
|
|
|
Just a thought. If you made the "line-by-line identical" bits by cut/paste/edit, maybe you missed one combobox reference in the edit part. Very easy to do and difficult to see[1], particularly if the names are similar (using something like ComboBox1 and ComboBox2 almost guarantees a problem).
[1] Difficult to see yourself that is, but often sticks out like dogs' ****s to someone else!
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
It's not practical to post the code. It's a long, complicated program. My next move will be to try to reproduce it in a test program. Maybe that will help.
I was hoping someone here would have an idea of what could even cause this kind of selection problem in a combo box. I have no idea.
|
|
|
|
|
I found the answer in an article on Newcomer's site:
http://www.flounder.com/updatedata.htm
I went through my program and commented out all instances of UpdateData(). Voila – problem gone. I may need to clean up a few problems using the control variables, but the problem that’s been driving me insane is solved. The cursor is unstuck.
|
|
|
|
|
In the application wizard, next to the last screen there is an option to have a Properties window added to your MFC Doc/View app. It is static, what does it take to make it functional?
Old dog learning new tricks!
|
|
|
|
|
Roger65 wrote: what does it take to make it functional?
Ehum, some programming?
I recommend you implement some type of publish/subscribe pattern[^] where anyone who thinks he's got the focus, can publish a set of properties. The properties window will be a subscriber.
|
|
|
|
|
Hi!
I got the following linker error:
Error 1 error LNK2001: unresolved external symbol "public: void __thiscall player::writeNameOnTexture(void)" (?writeNameOnTexture@player@@QAEXXZ) battingTeam.obj
How do I resolve this error?
|
|
|
|
|
It means the linker didn't find a body for the function. Did you forget to write the function body ?
|
|
|
|
|
It means that the public method void writeNameOnTexture(void) of the class player could not been found. Probably you forgot to write down the body of it.
|
|
|
|
|
T.RATHA KRISHNAN wrote: How do I resolve this error?
Did you try here?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I want to create a sidebar for windows xp using vc++. Sidebar is similar to vista sidebar.
I tried google to get idea, but everybody giving details about gadgets not side bar.
Anybody have any details about how to create a sidebar ?
|
|
|
|
|
|
|
Hi all,
i have written a code to download a webpage using WinInet api's. My code is as follows
InternetCanonicalizeUrl(site,sCompareURL.GetBufferSetLength(MAX_BUFFER_SIZE),&dwLen,ICU_BROWSER_MODE);
HINTERNET Ihandle = InternetOpen("Internet Explorer6.0.2900.2180", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, NULL);
HINTERNET hFile = InternetOpenUrl(Ihandle,site,NULL,0,0,0);
BOOL bRet = InternetReadFile(hFile, szBuffer, MAX_BUFFER_SIZE, &nSize);
if(!bRet || nSize <= 0)
break;
szBuffer[nSize] = '\0';
m_sHtml += szBuffer;
This code is working fine, but i want to implement time out in this, i.e i the specified page is not download in specified time then time out shold be displayed. How can i implement this?
Thanks in advance
|
|
|
|
|
You may try to set an option via InternetSetOption[^]
(the INTERNET_OPTION_RECEIVE_TIMEOUT flag looks promising, but I never made a test).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I know that if use the SMTP protocol, I should use the socket to create link with server.
And then
HELO SERVER
USER
PASS
but if I donot use the socket and I want to achieve the SMTP protocol , how should I do ?
Can someone give me suggestion?
|
|
|
|