LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Will there CVI API functions that search fo a given path of the exists file ? such as 'DirectoryExists'

Solved!
Go to solution
 Hi:
      I'm sorry about that  reply to you later, I'm learn to CVI first, can you tell me how to add library files to my project?
 
 
Now i have a new question,the same as
'Change language dynamically in cvi'
i try the NI Example Finder that comes with CVI: running it on localize returns intgraph.cws,but i can't find the Interface Localization Tool (localui.fp)
 
Download All
0 Kudos
Message 11 of 16
(1,793 Views)
 Hi:
      I'm sorry about that  reply to you later, I'm learn to CVI first, can you tell me how to add library files to my project?
 
 
Now i have a new question,the same as
'Change language dynamically in cvi'
i try the NI Example Finder that comes with CVI: running it on localize returns intgraph.cws,but i can't find the Interface Localization Tool (localui.fp)
 
Download All
0 Kudos
Message 12 of 16
(1,793 Views)
 Hi:
      I'm sorry about that  reply to you later, I'm learn to CVI first, can you tell me how to add library files to my project?
 
 
Now i have a new question,the same as
'Change language dynamically in cvi'
i try the NI Example Finder that comes with CVI: running it on localize returns intgraph.cws,but i can't find the Interface Localization Tool (localui.fp)
 
0 Kudos
Message 13 of 16
(1,793 Views)
Solution
Accepted by topic author GD.Huang

Adding a library to a project it's easy: go to Edit >> Add files to project >> Library menu function and find the correct library in CVI installation; you should find the library in <CVIdir>\SDK\Lib\msvc\ folder (or msvc64 if you are to create a 64-bit executable).

 

With reference to localization, I suggest you open a new thread.

In any case, which is the problem you are finding? Are you able to run the supplied example?

The instrument is located in <CVIdir>\toolslib\localui\ folder and you should be able to load it in the Instrument menu: did you succeed in doing so?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 14 of 16
(1,785 Views)

RE:

Adding a library to a project it's easy: go to Edit >> Add files to project >> Library menu function and find the correct library in CVI installation; you should find the library in <CVIdir>\SDK\Lib\msvc\ folder (or msvc64 if you are to create a 64-bit executable).

 

With reference to localization, I suggest you open a new thread.

In any case, which is the problem you are finding? Are you able to run the supplied example?

The instrument is located in <CVIdir>\toolslib\localui\ folder and you should be able to load it in the Instrument menu: did you succeed in doing so?

 

hi,thank you so much!

Yes,i have found that project,but that example shows that it will LoadLocalize before the program execute. I want it loadLocalize when my programrunning and the user can change the language at any time.

void CVICALLBACK menu_English_Select_Click (int menubar, int menuItem, void *callbackData, int panel)
{

    char    langFilePath[MAX_PATHNAME_LEN];
    int     appLanguage;
    int     i,panelHandle_main, dialog, error = UIENoError;

    //if (InitCVIRTE (0, argv, 0) == 0)    /* Needed if linking in external compiler; harmless otherwise */
        //return -1;    /* out of memory */

    //if ((GetAppLanguage (&appLanguage)) < 0)
        //return -1;
	appLanguage = 1;                         //Can i do this?
	
    GetLocalLanguageFilePath (appLanguage, langFilePath);
	//if ((error = LocalizePanel (panelMain , langFilePath)) < 0)
//Below line: error always return -6000,not zero. why? if ((error = LoadLocalizedPanel (0, "test.uir", panelMain , langFilePath, &panelHandle_main)) < 0) { if (error == UIEFileWasNotFound) { char errBuf[ERR_MSG_LEN]; sprintf (errBuf, "Error loading panel. Cannot find the \nlanguage file \"%s\".", langFilePath); MessagePopup ("Error", errBuf); } //return -1; } DisplayPanel (panelHandle_main); }

 

 

0 Kudos
Message 15 of 16
(1,777 Views)

That's why I suggested to open a new thread: we are going far away with respect to the original argument Smiley Wink

 

Localizing the panel while the program i running means calling LocalizePanel on panels already present in memory. New panels can be loaded with LoadLocalizedPanel as shown in the sample project.

 

Note that as explained here by Luis G you are limited when using a localized program in that calling DefaultPanel or DefaultCtrl can in some case revert some controls to their original locale.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 16 of 16
(1,773 Views)