|
can u give the code which u try there...
i think thats bcz of expiring the scope of the object...how u call the dialogs..?? be specific..and give the code if u can..
WUSIWUG
|
|
|
|
|
Hi renjith,
Please see more Update detail in my new post, it will explain where is the real problem. Here is some parts of my codes:
a) In OnInit() of Main.cpp:
{
f_Main = true;
CWnd::KillTimer(TimerNumb);
TimerNumb = CWnd::SetTimer (1,5000, NULL);
}
b) In OnTimer() of Main.cpp:
{
cnt++;
// Toggle every Timer trigger
if(!f_toggle)
{
f_toggle = true;
ListControl(f_toggle);
}
else
{
f_toggle = false;
ListControl(f_toggle);
}
}
c) In ListControl(bool flag):
{
LVITEM listItem;
listItem.mask = LVIF_TEXT;
listItem.iSubItem = 0;
// Only Refresh Screen when in the Main GUI
if(f_Main)
{
m_cnt = cnt;
m_list.DeleteAllItems();
if(ON)
{
m_toggle.SetCheck(true);
int row = 0;
UpdateData(false);
while(row < 10)
{
listItem.iItem = row;
listItem.pszText = "dummy";
m_list.InsertItem (&listItem);
m_list.SetItemText (row, 0, "Hello");
m_list.SetItemText (row, 1, "Hello");
m_list.SetItemText (row, 2, "Hello");
row++;
}
}
else
{
m_toggle.SetCheck(false);
UpdateData(false);
}
}
UpdateData(false);
}
|
|
|
|
|
Please mail me your workspace..
My ID is rrenjith@m2comsys.com
WUSIWUG
|
|
|
|
|
Hi,
I have more detail about the problem:
1) It still work, but when the Main Dialog going back "once" the Timer event still 5 seconds ... but happen "twice" (even)! Because of that, if it the list ON next time it still ON (not toggle)
2) If the GUI coming back the "second time" the Timer still 5 seconds but happen tripple (odd), now the listctrl is toggled!
*) That means the more switching Dialog, when the Main dialog coming back: the more event happen in the same 5 seconds interval!
I did try to kill the Timer, before trigger again, but failled! Here what I did in OnInit() of Main Dialog
CWnd::KillTimer(TimerNumb); // kill previous Timer
TimerNumb = CWnd::SetTimer (1,5000, NULL); // re-trigger
**) I did monitor the TimerNumb, and it equals 1 at any time!
***) If I set a flag & not re-trigger SetTimer(), it will not work any more (after switching to other dialog & coming back) ... I do not know why the Timer is gone, even I do not kill it any where???
if(!f_reset) TimerNumb = CWnd::SetTimer (1,5000, NULL);
f_reset = true;
With these situation, might be someone can help me how to do the task in the first place?
Many thanks,
|
|
|
|
|
I hope this isn't too hard - but how can I get the source of a HTML page given the IHTMLDocument2 pointer to it? I know I can get the body which supports the innerHTML property but that only gives me the source of the body - the head section is not there.
Anyone?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Nevermind - found it out myself:
<br />
IHTMLDocument2Ptr piDoc = ...;<br />
IPersistStreamInitPtr piPersistStreamInit;<br />
IStreamPtr piStream;<br />
HGLOBAL hGlobal = NULL;<br />
<br />
::CreateStreamOnHGlobal( NULL, TRUE, &piStream );<br />
piDoc->QueryInterface( IID_IPersistStreamInit, (void**)&piPersistStream );<br />
piPersistStream->Save( piStream, FALSE );<br />
<br />
::GetHGlobalOnStream( &hGlobal, piStream );<br />
<br />
size_t nNumBytes = ::GlobalSize( hGlobal );<br />
if ( nNumBytes > 0 )<br />
{<br />
BYTE* pBytes = reinterpret_cast< BYTE* >( ::GlobalLock( hGlobal ) );<br />
if ( pBytes[0] == 0xFF && pBytes[1] == 0xFE )<br />
{<br />
LPCWSTR pszwHTML = reinterpret_cast< LPCWSTR >( pBytes + 2 );<br />
}<br />
else<br />
{<br />
LPCSTR pszHTML = reinterpret_cast< LPCSTR >( pBytes );<br />
}<br />
::GlobalUnlock( hGlobal );<br />
}<br />
<br />
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I am writing an application right now in VB 6.0. I was just wondering if someone could help with this. Upon the FormLoad() function, I need the program to call a notepad file (main.ini) and read the third line and replace a variable inside of my program. Can somebody please please help me????
Thanks again,
Bob
|
|
|
|
|
Bad forum . Warning: VBers hated here .
Pavel
Sonork 100.15206
|
|
|
|
|
BHBAD2002 wrote:
Can somebody please please help me????
Yeah! I can tell ya to not cross-post and ask in the appropriate forum. Like say, it's a VB question, so maybe your luck will change in the, gee I don't know, the Visual Basic / VB.NET forum maybe.
Jeremy Falcon
Imputek
<nobr>"In fact it is quite simple, men and women both only want one thing - what they can't have!" - phykell
|
|
|
|
|
I think it will need ADOX, but are there any links/samples that show how to merge database1 and database2 to create a final database. The number of fields in each db is different, and some of them are distinct, though some overlap.
Thanks,
ns
|
|
|
|
|
Do you mean merging seperate databases or seperate tables? Can you provide more information about your database format etc.
Michael
Programming is great. First they pay you to introduce bugs into software. Then they pay you to remove them again.
|
|
|
|
|
EAch access database has one table. SOme of the fields overlap. I need to merge these two different databases, so that the new one has all the fields (union of), and whatever field was not present in database 1, should have entries "abc", likewise if the field wasnt present in database2, those records should have entries "abc" too. I suppose one could at first check and see which fields are different, then use ADOX for each database to add the new fields and populate them. So now we have two dbs with identical fields (different number of records of course). Now how to merge these two databases so the final one has one table in it which is the sum of the tables from db1 and db2.
Hope this is clearer...
Thanks,
ns
|
|
|
|
|
Do you just need the result or do you actually need a program that does this.
If itst the result you're looking for. Do it in Access by importing data from one DB into the other ( or import both into a new DB). Create a table with all the fields you want. Use Insert queries to move the data from the old tables to the new one.
Even if you need to be able to repeat the process. I'd recommend doing this in Access. Just write a VBA script to do the job.
|
|
|
|
|
Unfortunately I have to do this with code as a feature of another program. I'm using MFC...
|
|
|
|
|
Its too bad you have to do this in VC++. That will be the most ineffective language to use.
Your original post posed this question:
are there any links/samples that show how to merge database1 and database2 to create a final database
I can't imagine that there are. That's a pretty odd thing to do to databases. Using MFC or anything else, the process will be as I described earlier. I have seen code samples of creating a new database and tables from VC, but I can't remember exactly where. With a little effort you should be able to find examples of each of the steps.
Good luck,
Bill
|
|
|
|
|
I have a list control object and I add a notification handler for double-clicks (VC.NET). The problem is that I never receive the notification.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
AFAIK, WM_LBUTTONDBLCLK won't work for list box'es!
Use the following:
ON_LBN_DBLCLK(IDC_MYLISTBOX, OnDblclkMyListBox)
If you are using Wizards, it generates this code. There shouldn't be any problems.
Mustafa Demirhan
http://www.macroangel.com
Sonork ID 100.9935:zoltrix
<nobr>They say I'm lazy but it takes all my time
|
|
|
|
|
Is there a possibility to create a MetafileDC without clip region ? All metafiles derived from ClientDC or ScreenDC have an implicit "desktop-size" clip region.
My problem:
Metafiles, created from our graphic displays, do not include all graphical objects, if the graphic display has dimensions larger desktop size. Missing are WMF-based objects, which are drawn by PlayEnhMetafile(). Debugging shows, that these objects are processed and that PlayEnhMetafile() does not return an error.
I assume, that the WMF data is clipped, if these objects' origin are outside the device dependent clip region.
The problem would be solved, if I could define a MetafileDC with a clip region equal to the dimensions of the graphic display.
|
|
|
|
|
You create an enhanced metafile by CreateEnhMetaFile (CreateMetaFile is only leftovers for Win16 compatibility)?
This call creates one HDC.
I see no mention in the documentation that it should in any way or form clip to the desktop size. But if it does, you might try a call to SelectClipRgn with a NULL region.
|
|
|
|
|
Using ATL Server for Web Service may be a choice for speed when comparing with other Web Service methods, but when I
using it to make a test, I met a strange problem, My idea is put the image processing methods on the Server, the client can load image data, and then access the server for processing. since only for testing, I define only one method:
HRESULT SobelProcessH([in]LPSTR lpImage,[out,retval]lpImageOut)
I also presented the realization for this SobleProcessH function on the server, then I add a project for WebSetup, build them, so the service is done, when I begin to create a client project to access the service, the problem came out:
first I added a client project, then I added Web Reference for the Web Service, after that the proxy builded and output a .h file for me, but in that .h file, I found the SobelProcessH function having three parameter other than two,another parameter
int lpImage_size
was found in the function.
you know I define the function with two parameter in the server side, why did this happen? what kind of type should I use for transfer image in the functions based on SOAP and XML?
victorswan
|
|
|
|
|
Hi:
we can use winpopup.exe to send net message to other peer in win9x,while in winNT/2000,we use "net send ...".
Winpopup.exe use windows mailslot to read/write message,the question is how winNT/2000 read/write message from network? does it use namedpipe?
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
I'm pretty sure "net send" uses SMB (the horror).
A starting point might be Q168893.
For more info I'd point you to the samba project (no url, but googling should get you there).
|
|
|
|
|
No, it also uses NetBios(), which actually means it uses mailslots.
The "net send" thing is there since the very first days of Windows for Workgroups and interoperable between all OS that support SMB (they all use the same mailslot for it).
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
I read long ago, and forgot... one way to integrate the platform SDK help into VS help, thus one can access it directly pressing F1. Does anybody know how to or whether is it still possible with the latest SDKs?
Thanks,
Javier
|
|
|
|
|
The last PSDK I downloaded (July) included a menu item under Start/Programs/Microsoft Platform SDK called Visual Studio Registration. The function Register PSDK... worked well in VS6. I don't know if it works with VS.NET, but it's worth a try.
|
|
|
|