|
IT WAS THE LOCATION OF THE Markup.h HEADER FILE!!!!!!!!
I put Markup.cpp and Markup.h in a subdirectory called "xml".
I added the path to my project settings, and it didn't complain. After 4 hours of this, I thought... "lets try to move the files up a directory"
Is it time to go home yet?!?!?!?!!?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
My app is a non-MFC .exe file (it opens a dialog box and then do stuff...) and i would like it to act as an activex component for IE.
I've created a CLSID and stored the correct info in the registry. It seems to work fine except for one thing: when the app is downloaded on the first time, everything works fine. But after that, when the app is run from the previoulsy downloaded version, the app launches correctly but IE seems to freeze for about 30 seconds.
Anyone has an idea where this comes from ?
...DaMP...
|
|
|
|
|
Hy,
I ported a small application from Visual C++ 6 to .NET and now on some computers it crashes when it shows a "Save" dialog.
The problem is that i've tried it on about 10 computers and only on 2 of them crashed, on the others works perfectly.
The OS on the "crash" comptuer is NT4 with Service Pack 6.
I was wondering if anybody knows what's happening or heard of similar situations. I've heard of similar problems, but don't know any real answer, so any help is really welcomed.
Thanx in advance.
|
|
|
|
|
OK. I have an application icon that is 32x32 pixels and has 16 million color depth. I open the icon in Visual Studio 6 (and .NET) and it doesn't look correct. I understand that Visual Studio can't edit high color icons, however I need to have these icons displayed on the caption bar of a dialog based application, as well as in a ListView. I tried using LoadIcon to display this correctly and it doesn't work.
By the way, I am trying to displayt his high color icon transparently. The icon in the caption bar has an orange background when its supposed to be transparent. Apparently the LoadIcon only works with 256 color icon images.
Anyone have any suggestions?
Regards,
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|
|
Did you look here[^]?
That may help.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I saw this, but I don't think it will help with the caption bar of a dialog based application. I thought Windows XP handled drawing these icons automatically, and would dither them down to the right image if that size/bit depth was not present in the .ico file.
Is there a standard MFC call that will set the icon for the application like the SetIcon call in MFC?
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|
|
Don't use LoadIcon() . LoadIcon() is a hold-over from the 16 color 32x32 Win3.1 days. Use LoadImage() .
Also, unless you have rather large title bars, you may wish to use a 16x16 icon. If the 32x32 image is used in the listview, then keep that too. Once again, LoadImage() is smarter about this.
Finally, keep in mind that 24bit color icons occasionally cause problems on systems prior to WinXP - 256 colors are usually enough for such a small image, and work on all versions.
---
Shog9
I see the way the salesmen stare into the sun
I stood and watched them as they fell off one by one...
|
|
|
|
|
Is there away for me to create a function with the same name and the program calls my API instead of the windows API.
Thanks
|
|
|
|
|
Anthony9887 wrote:
Is there away for me to create a function with the same name and the program calls my API instead of the windows API.
I don't think this would be very good practice. Put your similar function in a seperate namespace and access it that way.
i.e.:
instead of the program calling:
::OpenFile(lpFN,lpOpBuf,uStyle);
You would call:
YourNamespace::OpenFile(lpFN,lpOpBuf,uStyle);
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hi,
to make a socket closed gracefully, I set the SO_LINGER on and call shutdown() before closesocket(). But the MSDN said The shutdown function does not block regardless of the SO_LINGER setting on the socket.
does it mean no unsent data will be sent when shutdown() with SD_SEND flag?
Thanks.
Kerry Chou
|
|
|
|
|
My version of MSDN reads for shutdown:
If the how parameter is SD_SEND, subsequent calls to the send function are disallowed. For TCP sockets, a FIN will be sent after all data is sent and acknowledged by the receiver.
To me this says that every send call that has succeeded up to this point is indeed transmitted to the destination.
What even more confirms this is a later section reading:
To assure that all data is sent and received on a connected socket before it is closed, an application should use shutdown to close connection before calling closesocket.
The fact that the call does not block might simply mean it's asynchronous.
|
|
|
|
|
My COM component needs to do some blocking operation, so i implement this operaion as a separate worker thread inside component. Now when operation completes, i want to fire event from the control. But i don't want my worker thread to fire this event. Instead i want my COM's primary thread to fire it. Is it possible ?? How can worker thread communicate with COM's primary thread ???
|
|
|
|
|
If your main thread gets blocked until the worker thread finishes, then I don't see the point of the worker thread. Just put it all on the same thread.
As far as ways of communicating, here's one: create an Event (see CreateEvent or CEvent)in the main thread and pass it to the worker thread. When it's finished, have it signal the event (SetEvent). In the mean time the main thread will be blocked until the event is signaled (WaitForSingleObject). Once that occurs, it will know that it's time to fire the control's event.
Regards,
Alvaro
All you need in this life is ignorance and confidence, and then success is sure. -- Mark Twain
|
|
|
|
|
Hello All!
I have a class derived from CView with a public variable defined like a CListBox m_listbox.
When I try to create this listbox dynamicaly in runtime in ON_COMMAND like :
m_listbox.Create(WS_CHILD|....,CRect(0,0,0,0),this,LDC_LIST)
I recieved an erorr,although build was ok. I recieve an error even befor I come inside of Create
when I override Create(..).
When I declare listbox like local variable in method it is passes Create(..) without any problem but ofcource not shown.
This algorithm was working when I create this Listbox dynamicaly in class derived from Richedit.
Parameter for Create (dwFlags, CRect, CWnd*, ID) but and Richedit and CView were derived from CWnd.
So where can be a problem? I couldnt find any solution all last night ...
Thanks for help
Alex.
Visual C++ .NET
Windows XP Professional
|
|
|
|
|
Just a guess, but is the value of LDC_LIST already used by a different control?
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
Thanks. No, I have already check this.. And in this way why it was working with local variable..
Alex
|
|
|
|
|
Can you post all the code that does a call to create, the overridden Create function (if you have one) and the declaration of the variable as well. That may help us spot the problem.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
So:
*------SampleView.h
CSampleView::CView
public:
CAB4LisBox m_listbox;
*------SampleView.cpp
ON_COMMAND(ID_AUTOCOMPLETE, OnAutocomplete)
void SampleView::OnAutocomplete()
{
.......
if(!m_listbox.hWnd)
m_listbox.Create(CRect(0,0,0,0), this);
}
Where :
bool CAB4LisBox::Create (CRect rect, CWnd* pParentWnd)
{
dwFlags = WS_CHILD|WS_OWNERDRAW|HAS_STRINGS.....; <---- Here Breakpoint => not stop
return CListBox::Create(dwFlags,rect,pParentWnd,IDC_LIST); error befor.
}
In case :
void SampleView::OnAutocomplete()
{
.......
CAB4LisBox m_listbox;
if(!m_listbox.hWnd)
m_listbox.Create(CRect(0,0,0,0), this);
}
working->Have entered into Create,breakpoit works, but list not dispalyed.
Sorry for not full coding, I havent it with me now, so wrote as remember.
Alex
|
|
|
|
|
|
When i disconnect my Networkcable from WindowsXP the Trayicon tolds me that "A Network cable is unplugged".
That is a status that i need in a Dialer with "seamless connectivity function". Does anyone know how to get these status? Doesent find anything about it in MSDN.
Only in MprAdminInterfacGetInfo is something, but that is for Serveradministration by remote connection.
best regards bateman
|
|
|
|
|
REQUIREMENT:: Application shud be sized to full monitor irrespective of the monitor size and current system resolution.
My APPLICATION:: Application is having four formviews in tabcontrol with many controls(AcitveX Lables and Buttons) on each forma view. My application is developed for best view in 15 inch and 800*600 resolution.
MY PROBLEM: i have written code to catch when resolution ic changed.and accorind to the new resolution m changing the each contols's client rect and moving the corresponding control to new client react. but reafreshing si becoming problem and some controls are painting over other controls.
AdiNarayana.vemuru
|
|
|
|
|
can any one send me code/url for DES Encrypyion/Decryption.
|
|
|
|
|
|
HI,
In this piece of code, On button click i disable that button and sleep for some time. But even though the button is disabled, if user clicks on it, the number of clicks are buffered and On button CLick code repeatedly processed.
Sample code :
OnButton1()
{
static int count=0;
this->GetDlgItem(IDC_BUTTON1)->EnableWindow(false);
/* Some print messages*/
sleep(1000); /* in reality this could actually some code*/
/* to access the b ack-end data*./
this->GetDlgItem(IDC_BUTTON1)->EnableWindow(true);
count++;
}
if the buttons is continuously clicked , even if after the button gets disabled, say 5 times, then the OnButton1() code gets processed that many number of times [Count becomes 5].
I don't want the Dialog to process the BN_CLICKED messages from the disabled button.
Could any one help me out.
Thanks.
|
|
|
|
|
You have to look at the problme in the point of view of the thread executing the code. In your case its the user interface thread. This means that during the sleep() command you are not processing any message in the message queue. So what happens in the thread is disable,wait, enable, process other messages.
What you need to do is disable the button and wait in a message processing loop for the time required. Then the additional button presses will be ignored.
A typical way to do this would be to do:
MSG msg ;
while (::PeekMessage(&msg, NULL, 0, 0, PM_NOYIELD | PM_REMOVE))
{
::TranslateMessage(&msg) ;
::DispatchMessage(&msg) ;
}
You will need to setup the correct timing of this to last the time required.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|