|
Try experimenting with SetRedraw()
(2b || !2b)
|
|
|
|
|
use InsertItem(&Item) where item is a LVITEM structure and has stateMask = 0
this does exactly what you want, it inserts the new item without focusing on it.
ORi.
|
|
|
|
|
Hi,
I tried your solution. But, it does not work when the items are being added in the beginning.
|
|
|
|
|
Two questions:
I created a (xsd) schema (one global elements and several subs.)
Using MSXML4 Beta2 (for the xsd) I added the schema to the cache on a new blank DOM.
When I try to add elements to the new DOM object, it doesn't appear to reference the type object so that when I ask for its typed value (nodeTypedValue) it comes back with a string not the type I gave it in the schema.
Anyone have any experience with this, and can tell me what I shoud have done?
Where do you guys put your schemas? Resource files?
Thanks in advance.
C++/C# Student.
Wither Thee VB.Net.
|
|
|
|
|
Hi,
I am using a MFC SDI, for simple OLE embedding.
I get A MSWORD Application object, and call SetDisplayScrollBar(true). The scroll bars temporarily appear, before repainting kills them.
Can anyone offer any advice? Difficult to know how to try and resolve this one!
Cheers
Richard
|
|
|
|
|
Its when a call is made to my ole container COleClientItem::SetItemRects. Which occurs when i do a resize.
Any help at all, even if its just a stab in the dark, would be greatly appreciated.
|
|
|
|
|
I'm building an FTP client using sockets and in a non-MFC project. The problem I'm having is that I can never accept a data connection from the server. I can create a command connection and execute commands. when doing a LIST, to receive file list I'm creating a listening socket, calling bind on the listening port and when I receive response code 150( setting up data connection..) I'm trying to accept() the connection. Yet this never works for me. In blocking mode, I never get the control back and using async sockets, I just never get the connection...what am I doing wrong? Any code will be helpful...
Also has anyone used Xitami webserver 4.2b? it never seems to send out 3xx code after passing username, while authorizing...why?
TIA.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
If you are using an Active FTP connection, try Passive.
|
|
|
|
|
Is it possible to reliably detect from the WIN32 level the current parallel port settings (and whether one is available) including mode (ECP, EPP, etc.)? If so, does anyone know the best way to go about this?
Thanks!
|
|
|
|
|
Look at Win32_ParallelPort in Platform SDK: Windows Management Instrumentation. You'll find a detailed information about the Parallel Port, and also, any other device installed.
|
|
|
|
|
If I try use dll in dll by attach his lib and header files to ny dll project, When I try to use the function of the attached dll it gives me the error:
--------------------Configuration: MyDLL - Win32 Debug-------------------
Linking...
Creating library Debug/MyDLL.lib and object Debug/MyDLL.exp
MyDLL.obj : error LNK2001: unresolved external symbol _LMOpenDev@4
Error executing link.exe.
Why ??? Who Can Help me ?? Please !!!
|
|
|
|
|
are you sure you included the correct lib file in the libraries part of linker settings?
|
|
|
|
|
I've just started writing custom control after reading excellent article on this site.
http://www.codeproject.com/miscctrl/customcontrol.asp
New class mostly looks like what in that article. But in OnPaint(), I want to get current font being set to that control and print text with it, so I do this;
void CLogViewCtrl::OnPaint()
{
CPaintDC dc(this);
RECT rect;
CFont *pOldFont;
CFont *pFont = GetFont();
GetClientRect(&rect);
pOldFont = dc.SelectObject(pFont);
dc.SetTextColor(RGB(0,0,0));
dc.SetBkMode(TRANSPARENT);
dc.TextOut(0,0,"Code Project is great!");
dc.SelectObject(pOldFont);
}
Then, I can do this like;
m_LogWindow.SubclassDlgItem(IDC_LOGWINDOW,this);
m_LogWindow.SetFont(&m_FixedFont,0);
I did that in OnInitDialog() of parent Window but, font was not changed. Trust me m_FixedFont is OK and same method is working for normal controls. I added
m_LogWindow.GetFont();
right after that .SetFont() line, but return font handle was NULL. Why??? I'm sure sending right font handle to that CWnd derived control by WM_SETFONT but it will return NULL with WM_GETFONT! I'm very confused.
Do I need to add special handling code for that? Simple CWnd window won't keep font handle? When I look at CEdit's source code, there is no code for Set/Get font handlings. Can anyone help me?
(Please don't tell me adding CFont data member to my class.)
reiko
|
|
|
|
|
Do I need to add special handling code for that? Simple CWnd window won't keep font handle? When I look at CEdit's source code, there is no code for Set/Get font handlings.
Yes, you have to handle WM_GETFONT/WM_SETFONT yourself. Win32 controls are doing this for you. If you derive from plain CWnd, there's no such functionality in place.
In the Platform SDK docs, at "UI Services/Windows User Interface/Controls" you'll find the topics describing the default message processing done by controls. In the combobox section, for example, you'll find that combo "saves the specified font handle in an internal structure" during the WM_SETFONT processing.
When I look at CEdit's source code, there is no code for Set/Get font handlings.
This code lives outside the MFC - the Win32 edit control handles the message.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Now I understand what I should do.
I wonder how many people have this question trying to write custom control from scratch.
Thanks.
reiko
|
|
|
|
|
how can i set a defaule value for ActiveX control's method
|
|
|
|
|
Question is not clear. What do you mean by value of a method? Is it about default arguments?
|
|
|
|
|
How to find the users that logged on one domain?
sandos
|
|
|
|
|
Hi
iam using a picture control for showing bitmaps and gif files .but if the picture is big then i wanna show it in scolling manner without resizing my control.
is there any other way(or any other controls) which i can show bmp/gif with scrolling enabled
thanx in advance
buddie
Software Engineer
|
|
|
|
|
What type of app are you bulding? Is it dialog based or SDI/MDI, or don't you use MFC at all?
(2b || !2b)
|
|
|
|
|
Have a look at Microsoft article Q218972. The IPicture interface works fine for me. You would also be able to support JPEG files if you used it.
Hope this helps.
Steve.
|
|
|
|
|
I have an SDI app with static SplitterWnd with two panes. If I load a CFormView in both of them everything works fine. But if I load a CFrameWnd into one of the panes I get an Assertion Error (I think it's either CMainFrame::AssertValid() or CFrameWnd::AssertValid() ) when exiting the app. What am I doing wrong? Do I have to add any member functions to my CFrameWnd class? I've been trying to solve that problem for two days and I'm desperate. Please help me!
btw: In Release mode everything works alright.
Semlo
|
|
|
|
|
Doesn't anyone have a hint for me?
Do you need more detailed information?
please someone help me!
Semlo
|
|
|
|
|
Where do you get the assert? The call stack should show after the break.
Basically, I don't think you can put a CFrameWnd inside a splitter - I think CSplitterWnd expect its children to be CView derivatives. Don't ask me why! If you want to make a convoluted UI with views and splitters inside other views and splitters I suggest you use Zoran Todorovic's Visual Framework (http://www.codeguru.com/advancedui/VisualFx.shtml).
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thanks a lot for your answer, Steen!
This really helps me a lot! You guessed right, I want to create a nested splitter. It should look like this:
------------------------------
|*CForm* |***************|
|*View** |***************|
|***1***|***************|
|---------|*****CView***** |
|*CForm* |***************|
|*View** |***************|
|***2***|***************|
-------------------------------
As i have been thinking about putting tabs in "CFormView 2" pane Zoran Todorovic's Visual Framework probably is the perfect solution for me. Thanks for the hint!
Anyway, if someone knows an easier (shorter) way of creating nested splitter please let me know!
Semlo
|
|
|
|